当我使用ffmpeg将m3u8转换为mp4时,得到一些警告,
ffmpeg -i xx.m3u8 -c copy demo.mp4
变暖是
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.
我该怎么办才能解决它?
ffmpeg -i xx.m3u8 -c copy -bsf:aac_adtstoasc demo.mp4
似乎解码时间戳被打破了。您可以尝试“-fflags + igndts”来基于PTS重新生成DTS:
直接点ts文件:: ffmpeg -fflags + igndts -i xx.ts -map 0:0 -map 0:2 -c:v copy -c:copy copy.mp4