Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fix Non-monotonous DTS in output stream 0:1; when using ffmpeg

Tags:

ffmpeg

m3u8

When I use ffmpeg to convert m3u8 to mp4, I get some warning,

ffmpeg -i xx.m3u8 -c copy demo.mp4

warning is

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.

what should I do to fix it?

like image 358
xiao xin Avatar asked Apr 30 '19 05:04

xiao xin


1 Answers

You can try this:

ffmpeg -i xx.m3u8 -c copy -bsf:a aac_adtstoasc demo.mp4

Per this forum post, you can also try:

It seems that decoding time stamps are broken. You can try "-fflags +igndts" to regenerate DTS based on PTS:

Or point to the .ts file directly, ignore the DTS:

ffmpeg -fflags +igndts -i xx.ts -map 0:0 -map 0:2 -c:v copy -c:a copy demo.mp4
like image 101
Chandan Kumar Avatar answered Nov 16 '22 19:11

Chandan Kumar