[Mp4-tech] iso base media file format

Dave Singer singer apple.com
Fri Apr 30 10:16:02 ESTEDT 2004


At 10:33 AM +0530 4/20/04, Rajorshi Biswas wrote:
>Hi,
>	This is my first mail to this list. First let me introduce
>myself: I am a student graduating in Information Science. I am
>working on a project involving 3gpp and 3gpp2 stuff.
>And I need help!
>
>	Currently my job is this : I have a .3gp or .3gp2 file. From
>this file, I have to find out several characteristics, such as:
>1. duration, frame-rate, resolution of the h263 or mpeg-4 video.
>2. duration,bit-rate of amr audio.
>3. info of QCELP audio, 3gtext etc.
>
>	I found out from the 3gpp documentation for the .3gp file
>format that the file format is a derivative of the ISO base
>media file format (which is why just the .3gp format description
>was not making much sense), just like mpeg-4.
>I (after much effort) found a copy of the ISO base media
>file format specification.
>
>	Unfortunately, it seems that this format is quite complex
>to understand. Moreover in the very beginning, it refers to the
>"Syntax Description Language" defined in MPEG-4 standard. And
>I just cannot afford the MPEG-4 standard from iso.ch
>
>	Basically I need help in any one of the following:
>
>1. Understanding the Syntax Description Language
>    eg. what does this mean :

It's mostly fairly obvious.
>
>aligned(8) class Box (unsigned int(32) boxtype, optional unsigned 
>int(8)[16] extended_type)

This class is aligned on an 8-bit boundary, and parameterized with a 
boxtype and extended_type (optionally)
>{
>  unsigned int(32) size;
>  unsigned int(32) type = boxtype;

it starts with two 32-bit fields, the size field and the type field; 
the latter has the value of the boxtype parameter
>
>if (size==1)
>{ unsigned int(64) largesize;
>} else if (size==0)
>{ // box extends to end of file }

if teh size field has one of two special values, the actual box size 
is computed specially;  if 0, the box extends to end of file;  if 1, 
then immediately after the type field is a 64-bit size field, holding 
the true box size.
>
>if (boxtype== uuid )
>{ unsigned int(8)[16] usertype = extended_type; }
>
>  }

if teh type is 'uuid', then after the (optional) extended size field 
is the extended type field, holding a UUID.
>
>2. Understanding how to parse a format that is
>a derivative of iso base media file format
>(mpeg-4 or .3gp or .3gp2). I cant understand
>how to parse the boxes at all.

99% of the time you get the size in 32 bits (size includes the size 
and type fields), and then the type field, which is readable.  It 
makes it fairly easy to skip around the file in a hex editor.
You might get the free dumpster utility from apple, and have a look 
at a quicktime .mov file in it and with a hex editor;  .mov and ISO 
files are similar and you might find it clarifies a lot.
>
>
>	Please, please help me or point me
>to relevant information.
>
>	Thanks a lot in advance.
>Rajorshi
>
>
>
>
>
>
>_______________________________________________
>Mp4-tech mailing list
>Mp4-tech lists.mpegif.org
>http://lists.mpegif.org/mailman/listinfo/mp4-tech
>
>Note: Conduct on the mailing list is subject to the Antitrust 
>guidelines found at 
>http://www.mpegif.org/public/documents/vault/mp-out-30042-Antitrust.php

-- 
David Singer
Apple Computer/QuickTime


More information about the Mp4-tech mailing list