ffmpeg 合并 ts 问题

2022-10-19 14:31:09 +08:00
 Huelse

我尝试使用 concat 合并一个 m3u8 文件,其中都是 ts 源,这些 ts 源是可能有问题的(缺帧之类的),因此会出现较多Non-monotonous DTS错误,最终导致合并的时长和原来的时长不一致(我这个例子中差了 7 秒)

命令: ffmpeg -y -f concat -safe 0 -protocol_whitelist 'file,http,https,tcp,tls' -i list.txt -video_track_timescale 90000 -c copy output.ts

错误:

frame= 1650 fps=352 q=-1.0 size=   15872kB time=00:01:05.92 bitrate=1972.3kbits/s speed=14.1x    
[mp4 @ 0xe21580] Non-monotonous DTS in output stream 0:0; previous: 6131430, current: 6131430; changing to 6131431. This may result in incorrect timestamps in the output file.

我希望实现的是确保这个视频时长和原来一致,缺帧的地方能补上一帧,不知道这种需求能否实现?谢谢!

781 次点击
所在节点    程序员
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/888114

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX