


The -safe 0 can be omitted here if the path is relative. The file paths in the file can be absolute or relative, and then you can use FFmpeg to stream-cop y or re-encode (re-encode) the multiple files as followsįfmpeg -f concat -safe 0 -i mylist.txt -c copy output.wav Note that the # here is a comment statement. The protocol, on the other hand, requires the containers to be in the same format as well.ĭemuxer reads a list of files from a fixed format file, and FFmpeg can then process these files together.Ĭreate the file mylist.txt containing all the files you want to concatenate. It can be used mainly to merge multiple media files.Ĭoncatenating multiple files of the same encodingįFmpeg has two ways to concatenate identical files.ĭemuxer is more flexible, it needs the same encoding and the container format can be different.

The concat demuxer was introduced in FFmpeg 1.1. This is where FFmpeg's concat demuxer comes into play. For example, merging multiple videos into one video file, merging multiple audio files and one long audio file. FFmpeg can use the -i parameter to input one or more files, but there are times when there is some need to concatenate multiple files into one file.
