关于使用FFmpeg进行视频拼接

关于使用FFmpeg进行视频拼接

    • 方案
      • 使用concat demuxer
      • 使用concat协议
        • 更多支持
        • 其他方案
      • 使用concat滤镜
    • 失败
    • 其他工具
      • MP4Box
      • MKVMerge
      • MEncoder
    • 额外知识
      • 管道
      • h264_mp4toannexb & aac_adtstoasc
    • 参考资料
    • 修改历史

方案

http://trac.ffmpeg.org/wiki/Concatenate

使用concat demuxer

FFmpeg读取不同格式使用不同的demuxer,而concat也被视为一种"格式"。

https://ffmpeg.org/ffmpeg-formats.html#concat

This demuxer reads a list of files and other directives from a text file and demuxes them one after the other, as if all their packets had been muxed together.
The timestamps in the files are adjusted so that the first file starts at 0 and each next file starts where the previous one finishes. Note that it is done globally and may cause gaps if all streams do not have exactly the same length.
All files must have the same streams (same codecs, same time base, etc.).

个人理解,concat demuxer从文本文件读取文件和操作列表,然后将其视为一整个文件来进行读取。
值得一提的是,concat demuxer能在

你可能感兴趣的:(关于使用FFmpeg进行视频拼接)