blueshift
17th December 2007, 20:03
I am trying to use MPEG-4 ASP video produced by a hardware encoder chip that gives me PES packets. If I remove the 32-byte PES header (00 00 01 E0 start code) the data looks a lot like a reference file I have, but I note that there are a variable number of zero bytes at the end of each PES packet, e.g. 26 bytes on one packet I'm looking at.
The video plays back in VLC but glitches, either as raw concatenated packets minus the 32-byte header, or multiplexed into an AVI. I am trying to work out if the zeroes at the end of the packets are a problem.
I have looked at ISO/IEC 13818-1 and -2 documents but can't find a length value at a lower level than the PES header, which includes the trailing zeros. The docs are pretty heavy going though and I may have missed something.
A reference MPEG4 in AVI file that I have has no trailing zeros at the end of its packets, another thing that makes me wonder if I'm doing it wrong.
Could anyone point me to a spec, or tell me if the trailing zeroes are allowed, or how to calculate the correct length of valid data I should be using..
Thanks! this is a real headache.
The video plays back in VLC but glitches, either as raw concatenated packets minus the 32-byte header, or multiplexed into an AVI. I am trying to work out if the zeroes at the end of the packets are a problem.
I have looked at ISO/IEC 13818-1 and -2 documents but can't find a length value at a lower level than the PES header, which includes the trailing zeros. The docs are pretty heavy going though and I may have missed something.
A reference MPEG4 in AVI file that I have has no trailing zeros at the end of its packets, another thing that makes me wonder if I'm doing it wrong.
Could anyone point me to a spec, or tell me if the trailing zeroes are allowed, or how to calculate the correct length of valid data I should be using..
Thanks! this is a real headache.