V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Huelse
V2EX  ›  程序员

ffmpeg 合并 ts 问题

  •  
  •   Huelse · 2022-10-19 14:31:09 +08:00 · 777 次点击
    这是一个创建于 571 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我尝试使用 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.
    

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

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2737 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:27 · PVG 18:27 · LAX 03:27 · JFK 06:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.