Opened 3 years ago

Closed 3 years ago

#9501 closed defect (fixed)

adelay+areverse filters pair create wrong files, giving warning " Non-monotonous DTS in output stream"

Reported by: ramires Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: adelay areverse
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Some combinations of adelay and areverse filters in -filter:a chain lead to wrong output files, with encoder messages like "Non-monotonous DTS in output stream 0:0; previous: 5448, current: 3661; changing to 5449. This may result in incorrect timestamps in the output file.".

How to reproduce:

%ffmpeg -i input.flac -filter:a "adelay=1000|1000,areverse" output.opus
ffmpeg version n4.4-190-g7e0d640edf-20211024 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10-win32 (GCC) 20210408 
...
[libopus @ 000001f07bd6d5c0] Queue input is backward in time
[opus @ 000001f07bd6bac0] Non-monotonous DTS in output stream 0:0; previous: 5448, current: 3661; changing to 5449. This may result in incorrect timestamps in the output file.
...

foobar2000 --> Utilities --> "Verify integrity" says:
"Warning: Nonsense Ogg granulepos value, file is not properly seekable
Warning: Reported length is inaccurate : 2:15.942771 vs 2:16.013500 decoded"

%ffmpeg.exe -i input.flac -filter:a "areverse,adelay=1000|1000" output.opus
[OK]
%ffmpeg.exe -i input.flac -filter:a "adelay=1000|1000,areverse,adelay=0|0" output.opus
[OK]

But for

%ffmpeg.exe -i input.flac -filter:a "adelay=1000|1000,areverse,adelay=1000|1000,areverse" output.opus
[OK]

foobar2000 --> Utilities --> "Verify integrity" says:
"Warning: Reported length is inaccurate : 2:17.000000 vs 2:17.000813 decoded"

%ffmpeg.exe -i input.flac -filter:a "adelay=1000|1000,areverse,adelay=2000|2000,areverse" output.opus
...
[libopus @ 000001f2d76ad600] Queue input is backward in time
[opus @ 000001f2d76abb00] Non-monotonous DTS in output stream 0:0; previous: 54489, current: 52662; changing to 54490. This may result in incorrect timestamps in the output file.
... 

Similar messages appear when AAC and AC3 output codecs are used.

Change History (1)

comment:1 by Elon Musk, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.