Opened 3 years ago

Last modified 5 months ago

#7449 open defect

copyts fails if PCR near rollover

Reported by: Nick Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: copyts dts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When the -copyts option is used and the PCR is near the rollover point (doesn't need to rollover, just be near it) ffmpeg appears to drop every video frame and fails to produce video output.

ffmpeg version 3.4.4 (Ubuntu 18.04)

Command: ffmpeg -i pcr_near_rollover.ts -copyts -c:v libx264 -c:a copy output.ts

Input media: https://download.silicondust.com/tmp/pcr_near_rollover.ts

The output file is small containing the audio but no video. Debug output shows a large number of "cur_dts is invalid" messages and "dropping frame 0" messages.

Removing -copyts produces valid video.

Supply an input file with a PCR further away from the rollover produces valid video.

Change History (6)

comment:1 by Carl Eugen Hoyos, 3 years ago

Keywords: dts added; pcr removed

Is the issue reproducible with current FFmpeg git head, the only version supported here?

Why are you using -copyts if not using it produces better results?

comment:2 by Mista_D, 13 months ago

Component: undeterminedavformat

Looks like a similar problem still exists in 4.3.1
must have been fixed 7 years ago, it seemed: https://trac.ffmpeg.org/ticket/3176
no?

comment:3 by Balling, 13 months ago

Status: newopen

No, I doubt 738ebb4a0e0c8fbdc83b44cf30b8c9b7ac866270 can fix rollover. Do you have the source file?

comment:4 by Carl Eugen Hoyos, 12 months ago

Version: 3.4git-master

Looks like a long-time regression.

comment:6 by Balling, 5 months ago

I will just point out that rollover happens at 0x1FFFFFFFF that is decimal 8589934592. Yet in #7876 it happens at 8589931780 and in #8689 it happens in 8586744840.

What is also funny is this: https://github.com/FFmpeg/FFmpeg/commit/ef7b117b7be8a81d6b245cadf096cbe4b1a12987

Last edited 5 months ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.