PES length on video stream warning - revisited

Begonnen von Jaan, März 12, 2015, 02:34:12

« vorheriges - nächstes »

Jaan

Last May I when I upgraded my Hauppauge Capture software, I began getting the PES length on video stream warning on all its files when I opened them for editing. Believing there could be no harm in it, I always accepted TS Doctor's patch - and that seemed to cause no problem. I continued to use Capture's export function (which uses ffmpeg) to make MP4 files from my edited .ts files. The captured file has MPEG audio at 192 kbits/sec, and Capture has ffmpeg convert that to AAC. I noticed at the same time that the AAC was coming out at 128k rather than 192 as it had previously. I took this to be an unrelated change made by Hauppauge, but I was wrong. No bitrate is specified to ffpeg; it is supposed to output the same audio bitrate as the input. Running ffmpeg from a shell window for information about the edited .ts files, I see the audio bitrate correctly reported as 192k, but I also see "PES packet size mismatch" errors reported. Converting these files to MP4 with ffmpeg through the Hauppauge Capture GUI gives 128k audio, not 192 as it should. The raw capture files not fixed with TS Doctor come out at 192k. So do files I edit with TS Doctor if I decline the PES length patch (And ffmpeg does not report PES length mismatch.) Furthermore, in one test I trimmed a captured file for beginning and end, declining the PES length patch. Then, I fixed that file again with TS Doctor, allowing the PES length patch but making no other changes. FFmpeg reported no PES length mismatch problems, and it converted correctly with 192k audio.

Conclusion: When TS Doctor is used to edit a file with PES length patching at the same time, it introduces some small irregularity into the "fixed" file that causes ffmpeg to report PES length mismatch errors and to revert to 128k audio bitrate rather than matching the input bitrate. This does not occur when the editing for length is done with the PES length patch option declined - even if, thereafter, the PES length is patched in a separate pass. (The problem also does not occur for short test files ~ 30 seconds. This may be related to the observation that ffmpeg reports about 5 PES packet size errors in a 45 minute stream.)

Cypheros

#1
All broadcasters I know, set PES length to zero for H264 video streams because the PES length is a 16 bit value with the maximum of 65535 Bytes (old standard for MPEG2 video). That is too small for most H264 PES packets, so it should be set to zero (any length).


www.cypheros.de