[Mp4-tech] Mp4 file having h264 as video

Dave Singer singer apple.com
Wed Dec 21 08:59:03 ESTEDT 2005


Hi
you have a problem with your file.  Your sample entry says that NAL 
Units have 4 byte length fields, and that the first sample has 4305 
bytes.  If we look at offset 32 in the file (the first chunk offset 
you record) we find 0x10d1, which is the length of the first NAL 
Unit, which is also 4305.  But the sample size should be the size of 
the *entire* sample, all the NAL Units (possibly more than one) and 
their length fields.  You forget the length field.
As a result, we're getting 0x10f1 as the position of the second file 
format sample, instead of 0x10f5, and we're taking 0x52eafec0 as the 
length of the first NAL Unit in the second sample (which is too 
large, of course), and then the NALU header from the length (0x917, 
which is 2327, which again is the size recorded in the sample to size 
table), and so on.
If I fix the sample size table by adding 4 to all 5 of the entries in 
a hex editor, your file plays just fine.
Hope this helps, best wishes
At 9:31  +0000 21/12/05, INDERPAL SINGH GANDHI wrote:
>
>Dear experts,
>
>I have created one mp4 file which has the H.264 as the video. I have 
>just modified the 'stsd' entry for 'avc1' under 'stbl' according to 
>the ISO/IEC 14996-15. Rest all the entries, like 'sdtp', 'sbgp' etc, 
>were optional so i did not create those. Am saving the AVC Sample to 
>'mdat' as recommended by 14996-15 too.
>
>Now the quicktime player 7.0.3, which supports the h.264, is not 
>able to play this file. The quictime's window opens but all the 
>buttons (play, pause, forward etc )remain inactive.
>
>And when i play it with VLC Player version 0.8.4, It only plays the 
>first frame and after that it crashes. The encoded bit stream is 
>correct coz if i just give the encoded bitstream (test.h264) to vlc 
>player, it plays fine.
>
>
>My file has only 5 frames. First is the I frame and the rest P.
>Number of slices per picture is 1. It has 8 bytes of SPS and 4 bytes 
>of PPS header.
>SPS = 67 42 00 1E B6 82 C4 C4
>PPS = 68 CE 3C 80
>
>I have attached my mp4 file with this mail.
>Please have a look into the bitstream. I am not able to pinpoint the problem.
>It will be of great help if you could suggest me the needful.
>
>Thanks in Advance
>Inder
>
>
>
><http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3>
>
>Attachment converted: DaveG49:test 1.mp4 (    /    ) (0002BE8C)
>_______________________________________________
>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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/mp4-tech/attachments/20051221/b13aad2a/attachment.html


More information about the Mp4-tech mailing list