用 FFmpeg 合并多个视频(Windows concat 拼接)

在命令行把几个格式相同的视频片段拼接成一个完整视频,无需视频编辑软件。

Windows视频转换FFmpeg低风险
新建 list.txt,每行写 file 'clip1.mp4' 列出所有片段,然后运行 ffmpeg -f concat -safe 0 -i list.txt -c copy merged.mp4。

01命令

命令
$ ffmpeg -f concat -safe 0 -i list.txt -c copy merged.mp4

02作用说明

先在与视频相同的文件夹里建一个 list.txt 文本文件,逐行列出要合并的文件:file 'clip1.mp4'、file 'clip2.mp4' 等。concat demuxer 只在数据流层面拼接,配合 -c copy 几秒就能完成且完全无损。各片段必须使用相同的编码、分辨率和帧率,否则需要先转码或改用 wiki 中的 filter 拼接方法。

03风险

风险低风险
使用条件FFmpeg is not preinstalled on Windows — install it first with: winget install --id Gyan.FFmpeg
!注意: 片段参数不一致时合并出的文件可能花屏或无法播放,这种情况请去掉 -c copy 让 FFmpeg 重新编码。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • Concatenating media files
    FFmpeg Trac Wiki · community · 2026-09-17
    依据: Documents the concat demuxer (-f concat -safe 0 -i list.txt) and the -c copy no-re-encode merge, plus the re-encode fallback for files with different parameters.

最后验证: 2026-09-18 · 分类: 媒体