当我使用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.我该怎么做才能修好它?
发布于 2019-04-30 06:03:59
你可以试试这个:
ffmpeg -i xx.m3u8 -c copy -bsf:a aac_adtstoasc demo.mp4根据这个论坛帖子,您还可以尝试:
解码时间戳似乎被打破了。您可以尝试"-fflags +igndts“来基于PTS重新生成DTS:
或者直接指向.ts文件,忽略DTS:
ffmpeg -fflags +igndts -i xx.ts -map 0:0 -map 0:2 -c:v copy -c:a copy demo.mp4发布于 2022-04-26 22:57:36
我偶然发现了从哈德尔下载的体育视频。m3u8文件具有#EXT-X-不连续性和#EXT-X程序日期-时间指令,而ffmpeg没有正确处理这些指令。因此,我刚刚为ffmpeg创建了.txt文件,只需将段与删除的指令连接起来:
使用浏览器工具查找m3u8
cat ~/Downloads/<m3_u8 downloaded> | grep ".ts$" | awk '{print "file <url path of m3u8 file>" $1}' > files.txt
ffmpeg -protocol_whitelist file,tcp,http,https,tls -f concat -safe 0 -i files.txt -q 0 -c copy video.MTShttps://stackoverflow.com/questions/55914754
复制相似问题