I have few video files I'd like to merge.

I'd like to create a single video of them without any compression, just one after another.

How can it be done using FFMPEG?

For the answer we may assume the files are named:


If there a way to automate (Something like Video*.mp4) it would be great.


1 Answer 1

  1. Create a file named FileList.txt with the content:
file full/path/to/Video001.mp4
file full/path/to/Video002.mp4
file full/path/to/Video003.mp4
file full/path/to/Video030.mp4

One could use the full path instead
2. Run ffmpeg -f concat -safe 0 -i FileList.txt -c copy MergedFile.mp4.
3. In case of the error Could not find tag for codec pcm_alaw in stream #1 or something related to PCM audio, know that FFMPEG can't generate an MP4 file with PCM audio. Hence chose another container: ffmpeg -f concat -safe 0 -i FileList.txt -c copy MergedFile.mkv or encode the audio: ffmpeg -f concat -safe 0 -i FileList.txt -c:v copy -c:a aac MergedFile.mkv.

The answer is based on:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.