gopro

How to join multiple MP4 files from a GoPro with ffmpeg

I recently shot some footage with a GoPro, and realized after the fact the GoPro 'chapters' the footage around 4 GB, so I ended up with a number of 4 GB files, instead of one larger file. There are various reasons for this, but in the end, I really wanted one long file, so it would be easier to synchronize with footage from another camera and my audio recorder.

2023 Update: The following one-liner works a bit faster, and doesn't require creating all the intermediate files as the original method below did:

ffmpeg -f concat -safe 0 -i <(for f in *.MP4; do echo "file '$PWD/$f'"; done) -c copy output.mp4

This command assumes you're running the command within the same directory as all your GoPro .MP4 files, and there are no other .MP4 files in that directory.

So I found this answer on StackOverflow, which had exactly the commands I needed: