

Then you can easily concatenate them as shown above. The first step you need to do here is to find all the mp4/avi/wav files in your directory and add them to a file. This is a commonly asked question and it has to do more with shell scripting than actual FFmpeg usage. Remember, you are not re-encoding in this commandline because you are using the copy command. Here, you are using the concat command to read the list of video files that you created ( fileList.txt) and copy the individual files in that order into an output file called mergedVideo.mp4.

ffmpeg -f concat -safe 0 -i fileList.txt -c copy mergedVideo.mp4 Now, you can concatenate them using the following FFmpeg command. each line starts with the keyword file and contains the path of the file within single quotes. In this example, both the files are in the home directory. Here is an example and let us call the list fileList.txt. Then, you need to supply this list to FFmpeg as a commandline parameter. First, you need to create a txt file with the names and paths of all the individual files that you want to concatenate. There are two steps to using this command. That is, they have the same height, width, pixel formats, codecs, etc. You can concatenate these files using the concat demuxer ( documentation) easily if their properties match. Let’s say you have two files file1.mp4 and file2.mp4.
#Ffmpeg windows command line mp4#
Let’s start with the simplest use case which is to concatenate two mp4 files using FFmpeg.
