[FFmpeg-user] How can I join video files?

John Saturday stozher at gmail.com
Wed Feb 15 17:37:00 CET 2012


Hello, please add this example to FAQ "How can I join video files?"
<http://ffmpeg.org/faq.html#How-can-I-join-video-files_003f>.

Concatenate two VOB files:

ffmpeg -i "concat:VTS_01_1.VOB|VTS_01_2.VOB" -f mpeg -c copy output.mpeg

Concatenate two MKV, MP4 files with H264 video stream:

ffmpeg -i file-01.mkv -f mpegts -c copy -bsf:v h264_mp4toannexb file-01.mpeg.ts
ffmpeg -i file-02.mkv -f mpegts -c copy -bsf:v h264_mp4toannexb file-02.mpeg.ts

ffmpeg -isync -i "concat:file-01.mpeg.ts|file-02.mpeg.ts" -f matroska
-c copy output.mkv

Thanks to all FFMPEG team for hard work!


More information about the ffmpeg-user mailing list