FFmpeg error: “Application provided invalid, non monotonically increasing dts to muxer in stream 0”
Steps to reproduce:
① Visit the GitHub mirror of “Codex FFmpeg” at https://github.com/GyanD/codexffmpeg/releases?q=2024 and download the FFmpeg build archive https://github.com/GyanD/codexffmpeg/releases/download/2024-03-11-git-3d1860ec8d/ffmpeg-2024-03-11-git-3d1860ec8d-full_build.7z (currently the latest build) and unpack the file bin\ffmpeg.exe from that 7-Zip archive.
② Run the following command on Windows:
ffmpeg -hide_banner -f lavfi -i testsrc=d=1:s=1920x1080:r=24,format=yuv420p -an -sn -map_metadata -1 -map_chapters -1 -crf 60 -b:v 0 -c:v libsvtav1 -svtav1-params keyint=20s:scd=1:lookahead=120:tune=0:preset=7:lp=4 -f null NUL
③ Notice that the following version of the encoder is being used and thus mentioned in the textual output of that command:
SVT-AV1 Encoder Lib v1.8.0-47-g8b39b41d
④ Notice the following error:
Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23 >= 15
(The last part is not always 15, I have also seen 13 there.)
⑤ Visit the GitHub mirror of “Codex FFmpeg” at https://github.com/GyanD/codexffmpeg/releases?q=2024 and download the FFmpeg build archive https://github.com/GyanD/codexffmpeg/releases/download/2024-03-04-git-e30369bc1c/ffmpeg-2024-03-04-git-e30369bc1c-full_build.7z (the previous weekly build) and unpack the file bin\ffmpeg.exe from that 7-Zip archive.
⑥ Run the same command on Windows:
ffmpeg -hide_banner -f lavfi -i testsrc=d=1:s=1920x1080:r=24,format=yuv420p -an -sn -map_metadata -1 -map_chapters -1 -crf 60 -b:v 0 -c:v libsvtav1 -svtav1-params keyint=20s:scd=1:lookahead=120:tune=0:preset=7:lp=4 -f null NUL
⑦ Notice that the following version of the encoder is being used and thus mentioned in the textual output of that command:
SVT-AV1 Encoder Lib v1.8.0-45-g3e8def74
⑧ Notice the following error:
Application provided invalid, non monotonically increasing dts to muxer in stream 0: 23 >= 15
(The last part is not always 15, I have also seen 9 or 13 there.)
⑨ Visit the GitHub mirror of “Codex FFmpeg” at https://github.com/GyanD/codexffmpeg/releases?q=2024 and download the FFmpeg build archive https://github.com/GyanD/codexffmpeg/releases/download/2024-02-26-git-a3ca4beeaa/ffmpeg-2024-02-26-git-a3ca4beeaa-full_build.7z and unpack the file bin\ffmpeg.exe from that 7-Zip archive.
⑩ Run the same command on Windows:
ffmpeg -hide_banner -f lavfi -i testsrc=d=1:s=1920x1080:r=24,format=yuv420p -an -sn -map_metadata -1 -map_chapters -1 -crf 60 -b:v 0 -c:v libsvtav1 -svtav1-params keyint=20s:scd=1:lookahead=120:tune=0:preset=7:lp=4 -f null NUL
⑪ Notice that the following version of the encoder is being used and thus mentioned in the textual output of that command:
SVT-AV1 Encoder Lib v1.8.0-34-gf916708f
⑫ Also notice that the error about “non monotonically increasing dts” is gone.
Is that reproducible on your machine?
Is that a libsvtav1 problem? (If not, then please report it to FFmpeg devs.)