[FFmpeg-trac] #7247(ffmpeg:new): FFmpeg seems to be generating wrong PCR timing time to time on MPEGTS

FFmpeg trac at avcodec.org
Tue Jun 5 10:33:26 EEST 2018

#7247: FFmpeg seems to be generating wrong PCR timing time to time on MPEGTS
             Reporter:  vitouso      |                     Type:  defect
               Status:  new          |                 Priority:  minor
            Component:  ffmpeg       |                  Version:
             Keywords:  PCR, mpegts  |  unspecified
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
 Summary of the bug:
 If you convert almost any MPEGTS video file to MPEGTS using -c copy option
 (does not mean much sense I know, but with more complex mapping this can
 be usefull for example to remove some audio streams and so on), there will
 appear couple of issues.

 First issue I can see - PCR clock is generated only about once every
 500msec - it suppose to be generated once every 100msec I guess.
 BTW - some older version like ffmpeg-20150507-git-9253cc4-win32-static did
 this well

 2nd issue - time to time ffmpeg will generate packet with booth PCR and
 OPCR flags set and it seems to me, that this packed is not correct.
 I may be wrong, but in such a case I would expect, that header will be
 followed by 48 bits of PCR and than 48 bits of OPCR -> however it does not
 looks like this. It does not relate to either original PCR or current PCR.
 Same think had happened in the older tested version ffmpeg-20150507-git-
 9253cc4-win32-static just more offten.

 For tests I had upload 3 files there:

 SourceVideo.ts is original file I had tested, BadVideo1.ts is generated by
 2015 version of ffpmeg, BadVideo2.ts by version 4.0
 In this 2nd file there is one packet like this - packet ID is 105601.  In
 older version, there are multiple packets, for example - 4124, 16438,
 17708, 21548 and so on - note some of them does not have even OPCR flag
 I think it almost does not matter what video file will be used, it just
 have to be at least 1minute or longer to found some error with ffmpeg 4.0

 How to reproduce:
 % ffmpeg -i SourceVideo.ts -y -c copy -f mpegts BadVideo.ts
 Version ffmpeg-20180603-2bd24d4-win64-static
 but also tested on older versions from 2015 - result is similar, even
 errors does appear on the different positions
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.

Ticket URL: <https://trac.ffmpeg.org/ticket/7247>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list