How to concatenate multiple segments of the same video into a single file

Many video recorders (eg. GoPro cameras and many phones) split video files into 2 (or 4) GB pieces. To concatenate these pieces into a single file (without reencoding them), you can use ffmpeg's "concatenate" demuxer:
ls -1 G*0060.MP4 | sed -r "s/(.*)/file '\1'/g" > list.txt
ffmpeg -f concat -i list.txt -c copy GOPR0060.joined.MP4

P.S.: of course to do this, you need to run ffmpeg on a filesystem that supports files with larger than 4 GB files (i.e. not fat or fat32, but something better ... like HFS+ for Macs or ExFAT for Windows or ext2/ext3/ext4 (etc.) for Linux).

Syndicate content