我尝试使用 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.
我希望实现的是确保这个视频时长和原来一致,缺帧的地方能补上一帧,不知道这种需求能否实现?谢谢!