#11307(avcodec:new): [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 -------------------------------------+------------------------------------- Reporter: microchip | Type: defect Status: new | Priority: normal Component: avcodec | Version: git- Keywords: truehd | master truehd_core Atmos | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Summary of the bug: How to reproduce: Run it on any video containing TrueHD+Atmos audio {{{ % ffmpeg -i input -vn -c:a copy -bsf:a truehd_core output.thd [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241380 >= 241380 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241385 >= 241385 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241390 >= 241390 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241395 >= 241395 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241400 >= 241400 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241405 >= 241405 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241410 >= 241410 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241415 >= 241415 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241420 >= 241420 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241425 >= 241425 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241430 >= 241430 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241435 >= 241435 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241440 >= 241440 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241445 >= 241445 ffmpeg version N-117812-gbbb0fdedb7 built on 17-novembre-2024 }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 -------------------------------------+------------------------------------- Reporter: microchip | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: truehd | Blocked By: truehd_core Atmos | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Description changed by microchip: Old description:
Summary of the bug: How to reproduce: Run it on any video containing TrueHD+Atmos audio {{{ % ffmpeg -i input -vn -c:a copy -bsf:a truehd_core output.thd
[truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241380 >= 241380 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241385 >= 241385 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241390 >= 241390 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241395 >= 241395 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241400 >= 241400 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241405 >= 241405 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241410 >= 241410 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241415 >= 241415 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241420 >= 241420 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241425 >= 241425 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241430 >= 241430 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241435 >= 241435 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241440 >= 241440 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241445 >= 241445
ffmpeg version N-117812-gbbb0fdedb7 built on 17-novembre-2024 }}}
New description: Summary of the bug: Trying to strip Atmos from TrueHD results in spamfest in terminal How to reproduce: Run it on any video containing TrueHD+Atmos audio {{{ % ffmpeg -i input -vn -c:a copy -bsf:a truehd_core output.thd [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241380 >= 241380 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241385 >= 241385 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241390 >= 241390 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241395 >= 241395 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241400 >= 241400 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241405 >= 241405 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241410 >= 241410 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241415 >= 241415 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241420 >= 241420 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241425 >= 241425 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241430 >= 241430 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241435 >= 241435 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241440 >= 241440 [truehd @ 0x1d768440] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 241445 >= 241445 }}} ffmpeg version N-117812-gbbb0fdedb7 built on 17-november-2024 -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 -------------------------------------+------------------------------------- Reporter: microchip | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: truehd | Blocked By: truehd_core Atmos | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Balling): I checked a file I had (.m2ts). https://disk.yandex.ru/i/_bIh8MxWs5J_6A It does not happen on it and Atmos is stripped. Please provide actual sample file. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 -------------------------------------+------------------------------------- Reporter: microchip | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: truehd | Blocked By: truehd_core Atmos | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by microchip): The reported messages only appear if you output to .thd extension (audio- only TrueHD file). If using something else like mkv or mp4, they do not appear. In both cases (output to .thd audio only file or mkv/mp4 container) the Atmos is stripped. I guess this is normal when outputting to .thd ? -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 -------------------------------------+------------------------------------- Reporter: microchip | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: truehd | Blocked By: truehd_core Atmos | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Balling): I outputed to thd without ac3 stream, yes. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 -------------------------------------+------------------------------------- Reporter: microchip | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: truehd | Blocked By: truehd_core Atmos | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Balling): Please provide the sample file. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 -------------------------------------+------------------------------------- Reporter: microchip | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: truehd | Blocked By: truehd_core Atmos | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Balling): This is not a bug, mkv container has only millisecond precision timestamps and there are 1200 frames per second in TrueHD, the time stamps will have to be identical. It is what it is. On the other hand mkv actually does not have dts or pts, it has only durations, so maybe you have to offset the dts when they come out the same, but that is a cosmetic issue. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 ------------------------------------+----------------------------------- Reporter: microchip | Owner: (none) Type: defect | Status: open Priority: minor | Component: avcodec Version: git-master | Resolution: Keywords: thd | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Changes (by Balling): * keywords: truehd truehd_core Atmos => thd * priority: normal => minor * status: new => open Comment: ffmpeg -i mzero_truehd_sample.mkv -c:a copy fawfafa.thd prints () {{{ [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 97 >= 97 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 102 >= 102 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 107 >= 107 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 112 >= 112 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 117 >= 117 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 122 >= 122 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 127 >= 127 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 132 >= 132 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 137 >= 137 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 142 >= 142 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 147 >= 147 [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 152 >= 152 and then ends [truehd @ 0000029225d65e80] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 63227 >= 63227 }}} so each of them has a difference of 5 just like in your example, the fix here is to use (see link on patchwork above) The default value of 1/1000 is good **for most use-cases**, but there might be scenarios where it is not (e.g. **TrueHD packets** have a duration < 1ms, so different packets will **end up with the same timestamp** when using 1/1000). If the user has set a timestamp precision, then that should be honoured; **but if not, then we might use a different value than 1/1000** (in the future; I know that currently no code path that makes use of this exists). I doubt this will be implemented. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 ------------------------------------+----------------------------------- Reporter: microchip | Owner: mkver Type: defect | Status: open Priority: minor | Component: avcodec Version: git-master | Resolution: Keywords: thd | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Changes (by Balling): * owner: (none) => mkver Comment: Actually I think it is a real bug, because while durations in mkv are only milliseconds, it is supposed to offset dts if multiple packets are provided under same millisecond. Can you comment, mkver? -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11307: [truehd_core] Application provided invalid, non monotonically increasing dts to muxer in stream 0 ------------------------------------+----------------------------------- Reporter: microchip | Owner: mkver Type: defect | Status: open Priority: minor | Component: avcodec Version: git-master | Resolution: Keywords: thd | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Comment (by microchip): Actually, I don't know what to think of this. It only occurs when output to .thd audio. I never have a use for this since my outputs are in mkv where it does not occur. I accidentally came across this when I was testing something else. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11307#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg