如何修复输出流 0:1 中的非单调 DTS;使用 ffmpeg 时

xia*_*xin 14 ffmpeg m3u8

当我使用ffmpeg转换m3u8为 时mp4,我收到一些警告,

ffmpeg -i xx.m3u8 -c copy demo.mp4
Run Code Online (Sandbox Code Playgroud)

警告是

Non-monotonous DTS in output stream 0:1; previous: 3277744, current: 3276712; changing to 3277745. This may result in incorrect timestamps in the output file.
Non-monotonous DTS in output stream 0:1; previous: 3277745, current: 3277736; changing to 3277746. This may result in incorrect timestamps in the output file.
Run Code Online (Sandbox Code Playgroud)

我该怎么做才能解决它?

Cha*_*mar 7

ffmpeg -i xx.m3u8 -c copy -bsf:a aac_adtstoasc demo.mp4
Run Code Online (Sandbox Code Playgroud)

似乎解码时间戳被破坏了。您可以尝试“-fflags +igndts”基于PTS重新生成DTS:

直接点ts文件::

ffmpeg -fflags +igndts -i xx.ts -map 0:0 -map 0:2 -c:v copy -c:a copy demo.mp4
Run Code Online (Sandbox Code Playgroud)

  • 根据此问题的“解码时间戳(DTS)和呈现时间戳(PTS)”:/sf/ask/423103131/ (3认同)
  • “根据PTS重新生成DTS”?这些缩写是什么意思? (2认同)
  • 这个答案似乎引用了https://forum.videohelp.com/threads/390057-FFMpeg-non-monotonous-DTS-in-output-stream-error#post2527823 (2认同)