Opened 5 months ago

#7247 new defect

FFmpeg seems to be generating wrong PCR timing time to time on MPEGTS

Reported by: vitouso Owned by:
Priority: minor Component: ffmpeg
Version: unspecified Keywords: PCR, mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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:
https://rfeftp.rferl.org/?ShareToken=9A1AA158B524542606EA99CBC81D6E8D1E1D47DC

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 set.
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.

Change History (0)

Note: See TracTickets for help on using tickets.