[Mp4-tech] MP4 file parser
Magnus Hoem
magnus.hoem popwire.com
Tue Aug 24 10:01:31 EDT 2004
See answers inline,
On Aug 24, 2004, at 8:19, MRUKANT POPAT wrote:
> hi Dave & community,
>
> Thanx for your reply.
>
> The 14496-1 spec says following about stsc atom:-The table is
> compactly coded.
> Each entry gives the index of the first chunk of a run of chunks with
> the same
> characteristics; by subtracting one entry here from the previous one,
> you can
> compute how many chunks are in this run. You can convert this to a
> sample count
> by multiplying by the appropriate samples-per-chunk.
>
> query 1:-What does it mean by similar
> characteristics among chunks. How is it decided.
Similar characteristics means that is has the same number of samples
per chunk and belongs to the same sample description. I.e. the two
stsc-entries would have been the same.
>
> query 2:-I am sending mp4dump of an mpeg-4 file. The stsc atom inside
> it
> compactly codes the table in stsc atom, in the sense each entry gives
> the index
> of the first chunk of a run of chunks with the same characteristics.
> Now looking
> at this file I concluded that-> 1) There are three groups of chunk
> 2) First group (say g1) having only 1 chunk
> 3) Second group(say g2) having 352-1=351 chunks
> 4) Third group (say g3) having 353-352=1 chunk. Thus total number of
> chunks is 1+351+1=353
> 5) Now number of samples in all chunks can be found by
> samples-per-chunk in
> stsc, so,
> 5.1) In g1 number of samples is 1*1=1
> 5.2) In g2 number of samples is 351*2=702
> 5.3) In g3 number of samples is 1*1=1
> 5.4) Thus, total number of samples in file is 1+702+1=704
There was no attached dump, but I assume that the stsc looks like this
(first chunk : samples per chunk : sample desc. ID);
1 : 1 : 1
352 : 2 : 1
353 : 1 : 1
Your inpterpretation of the table is a bit off. This means that there
chunk 1->351 has 1 sample per chunk, chunk 352 has 2 samples and from
chunk 353->end you have 1 sample per chunk again. The number of chunks
is derived from stco (and is 654). This gives 351 * 1 + 1 * 2 + 302
(the rest of the chunks...) * 1 = 655 samples (as stated in stsz).
> query 2.1:- But the stsz atom which gives size of all the
> samples, lists only 655 sample size. whereas according to me it should
> list 704 samples.
> WHAT COULD BE THE REASON FOR THIS?
> Also the stco atom which gives offset of all the
> chunks, lists 654 chunk offsets. whereas according to me it should
> list 353 chunks. AM I RIGHT. IF WRONG, WHERE AM I WRONG?
I think this question has been answered. ;-)
Best regards,
Magnus
>
>
> regards,
> MRUKANT
>
>
>
> On Mon, 23 Aug 2023 Dave Singer wrote :
>> At 6:52 AM +0000 8/21/04, MRUKANT POPAT wrote:
>>> hi all,
>>> I have some queries on MPEG-4 file parser.
>>> I have read chapter 13 of 14496-1 which describes MPEG-4 file format.
>>> I also came across 14496-12 (ISO Base Media file format).
>>> I have certain queries after reading both documents, which I hope you
>>> guys can help me solve.
>>>
>>> query1:- I have understood that ISO Base Media file format is
>>> superset
>>> for all media file formats. Am I right? If not how does it differ
>>> from
>>> other media file format?
>>
>> This is such a general question I am not sure how to answer it.
>>
>>>
>>> query2:- If I implement parser for MPEG-4 files, does it have to look
>>> for atoms mentioned in 14496-12 (ISO Base Media file format) or the
>>> atoms mentioned in chapter 13 of 14496-1.
>>
>> If you are looking at a full spec. in chapter 13, that pre-dates the
>> making of part 12. I['d suggest lookign instead at parts 12 and 14.
>> Yes, you should look at all atoms mentioned in parts 12 and 14.
>>
>>>
>>> regards,
>>> MRUKANT
>>>
>>>
>>>
>>> <http://clients.rediff.com/signature/track_sig.asp>
>>>
>>> _______________________________________________
>>> NOTE: Please use clear subject lines for your posts. Include [audio,
>>> [video], [systems], [general] or another apppropriate identifier to
>>> indicate the type of question you have.
>>>
>>> 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
> _______________________________________________
> NOTE: Please use clear subject lines for your posts. Include [audio,
> [video], [systems], [general] or another apppropriate identifier to
> indicate the type of question you have.
>
> 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
**********************************************
Popwire Technology
Magnus Hoem
Research Engineer
magnus.hoem popwire.com
Kungsbroplan 3A
SE-112 27 Stockholm, Sweden
Phone: +46 8-506 667 34
Mobile: +46 733-25 44 34
http://www.popwire.com
***********************************************
This message, including any attachments may contain confidential and
privileged material; it is intended only for the person to whom it is
addressed. Its contents do not constitute a commitment by Popwire except
where provided for in a written and undersigned agreement.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 5274 bytes
Desc: not available
Url : /pipermail/mp4-tech/attachments/20040824/236f1ce3/attachment-0001.bin
More information about the Mp4-tech
mailing list