Multimedia File Interface library overview

The Multimedia File Interface (MMFI) library enables an application to merge audio and video media streams into a 3GP format file, and inversely, to split a 3GP format file into two separate media streams.

Using the MMFI library, a Video Access application can:

Video Access merges audio and video streams into a 3GP file by formatting and storing the audio and video buffers resulting from adiRecordMMToMemory or adiRecordMMAsync calls. Video Access splits a file into audio and video streams by extracting the audio and video media tracks from a 3GP file and playing them with the adiPlayMMFromMemory or adiPlayMMAsync calls.

The MMFI library does not perform media transcoding during either merge or split operations.

Input and output formats

There are three types of input or output formats used by the MMFI library to merge streams or split files:

Note: In the MMFI library header files, NMS packetized formats are referred to as native formats.

The following table shows how the types of streams are utilized in a 3GP file.

This audio stream format

Plus this video stream format

Can be in this 3GP File Format

NMS packetized

NMS packetized

3GPP Basic Profile or Streaming Server Profile

Raw AMR-NB IF2

NMS packetized

3GPP Basic Profile

NMS packetized format

The NMS packetized format can be one of the following:

Video bit streams must conform to ITU-T Recommendation H.263 Annex X as defined in ITU-T Recommendation H.263 1998 and 2000 and 3GPP specifications TS.26.111 and TS.26.911.

Video bit streams must conform to ITU-T Recommendation and H.264 and 3GPP specifications TS.26.111 and TS.26.911.

Note: For the H.264 video codec, raw video to 3GP format conversion is not supported.

The library expects an ISO/IEC 14496 simple profile level 0 - 3 bit stream. Time stamping and headers (in particular VOS/VO/VOL headers) are expected to be compliant with ISO/IEC 14496 and 3GPP TS 26.110 /TS 26.111. This information is needed in the correct format to allow the computation of parameters for the 3GP file formatting.

Audio bit streams must conform to ETSI/AMR, Adaptive Multi-Rate speech codec (AMR), in IF2 framing format, in any of the eight AMR compressed data rates.

The NMS packetized formats are supported by adiRecordMMToMemory, adiRecordMMAsync, adiPlayMMFromMemory, and adiPlayMMAsync.

Raw AMR-NB IF2 format

This format consists of a raw AMR-NB IF2 elementary audio bit stream, as supported by adiRecordMMToMemory, adiRecordMMAsync, adiPlayMMFromMemory, and adiPlayMMAsync when using the audio transcoding configuration.

3GP format

The 3GP file format is compliant with the 3GPP TS 26.244 specification and conforms to 3GP file format Basic Profile or 3GPP Streaming Server Profile.

The 3GP file contains one video track (either H.263, H.264, or MPEG-4), one audio track (IF1 AMR NB audio elementary bit stream), or both. It can also contain hint tracks for one or both of the audio and video streams.

3GP merge and split processes

The 3GP merge and split processes are shown in the following illustration using NMS packetized format audio and video streams:

3gp_format.gif

There are two types of format conversions:

NMS packetized to 3GP format conversion

The following table shows how the MMFI converts data from NMS-packetized to 3GP format:

Step

Description

1

Converts video NMS packetized format data into a raw video bit stream. Basic checking on NMS headers can optionally be performed.

2

Converts audio NMS packetized format data into an AMR audio bit stream (AMR-NB IF2 format). Basic checking on NMS headers can optionally be performed.

Note: The MMFI skips this step if the audio data is in raw format instead of NMS packetized format.

3

Converts the IF2 AMR bit stream into IF1 AMR bit stream.

4

Generates a .3gp file with 3GP meta data, the video elementary bit stream (MPEG-4, H.263, or H.264) and the IF1 AMR NB audio elementary bit stream.

The 3GP formatting function does not perform any audio or video bit stream adaptation or transcoding. It only merges audio and video bit streams input into 3GP file format compliant with 3GPP TS 26.244.

The compressed media in a 3GP output file can be optionally limited in size and in duration. The maximum size is specified in bytes, and applies to the total size of the 3GP file or equivalent stream. The maximum time is specified in milliseconds.

3GP to NMS packetized format conversion

The following table shows how the Video Messaging Server Interface converts data from 3GP format to NMS packetized format:

Step

Description

1

Extracts from the .3gp file the video elementary bit stream (H.263, H.264, or MPEG-4) and the IF1 AMR NB audio elementary bit stream.

2

Converts the IF1 AMR bit stream into IF2 AMR bit stream.

3

Converts the IF2 AMR audio bit stream into AMR audio data in NMS packetized format.

Note: The MMFI skips this step if the audio data is to be converted to raw format instead of NMS packetized format.

4

Converts the video bit stream into video data in NMS packetized format.