This is question 80 from my up and coming FFMPEG book, come join the mailing list to stay informed on more FFMPEG tutorials and announcements about the book. Here
Merging audio with FFMPEG is one of the most searched questions on the internet and couldn’t be any easier. The only difference is a txt file with a list of mp3 tracks must be made before the merging can begin. Below is an example list inside the file “file.txt”:
file 'track1.mp3' file 'track2.mp3' file 'track3.mp3'
Next, using concat in the following one-liner, all 3 mp3 files can be merged into one long track:
$ ffmpeg -f concat -i file.txt -c copy full.mp3
concat or concatenate, is the process of combining media files. In this example, exactly the same codec and parameters are required for joining.
In this example, ffmpeg lacks a specific media file as an input but a list from a external list (file.txt), this -f is used to “force” and input file.
Indicates the argument that combines multiple media files
Indicates the forces an input or output
Sign up for the emailing list to get notified when the
“FFMPEG BIBLE: 100 Questions Answered – Edit Audio & Video Like a Pro”
book comes out!