videophool
23rd December 2009, 02:27
I am working on an MP4 parser to parse fragmented MP4. I see the timing information in the Track Fragment Run Box, but the 14496-12 spec is not real clear on computing the pts. The data below is a dump of an fmp4 trun box for an AVC stream. I can see that the AVC GOP is IPBPBPB... and I can compute the dts/pts based on what I see, but I was hoping for a reference to follow. Where can I find this info in the specs (parts 12 & 14, or others)?
| [0] : sample_duration : 834166 (0xCBA76), sample_size : 1233 (0x4D1), sample_flags : Not Available, sample_composition_time_offset : 0 (0x0)
| [1] : sample_duration : 417084 (0x65D3C), sample_size : 36 (0x24), sample_flags : Not Available, sample_composition_time_offset : 834166 (0xCBA76)
| [2] : sample_duration : 834166 (0xCBA76), sample_size : 28 (0x1C), sample_flags : Not Available, sample_composition_time_offset : -417084 (0xFFF9A2C4)
| [3] : sample_duration : 417083 (0x65D3B), sample_size : 26 (0x1A), sample_flags : Not Available, sample_composition_time_offset : 417083 (0x65D3B)
| [4] : sample_duration : 417083 (0x65D3B), sample_size : 27 (0x1B), sample_flags : Not Available, sample_composition_time_offset : -417083 (0xFFF9A2C5)
| [5] : sample_duration : 417083 (0x65D3B), sample_size : 26 (0x1A), sample_flags : Not Available, sample_composition_time_offset : 417084 (0x65D3C)
| [0] : sample_duration : 834166 (0xCBA76), sample_size : 1233 (0x4D1), sample_flags : Not Available, sample_composition_time_offset : 0 (0x0)
| [1] : sample_duration : 417084 (0x65D3C), sample_size : 36 (0x24), sample_flags : Not Available, sample_composition_time_offset : 834166 (0xCBA76)
| [2] : sample_duration : 834166 (0xCBA76), sample_size : 28 (0x1C), sample_flags : Not Available, sample_composition_time_offset : -417084 (0xFFF9A2C4)
| [3] : sample_duration : 417083 (0x65D3B), sample_size : 26 (0x1A), sample_flags : Not Available, sample_composition_time_offset : 417083 (0x65D3B)
| [4] : sample_duration : 417083 (0x65D3B), sample_size : 27 (0x1B), sample_flags : Not Available, sample_composition_time_offset : -417083 (0xFFF9A2C5)
| [5] : sample_duration : 417083 (0x65D3B), sample_size : 26 (0x1A), sample_flags : Not Available, sample_composition_time_offset : 417084 (0x65D3C)