Merging mp3 files

Sometimes things are easier than ones might have thought. I wanted to merge some mp3 files in the shell and found that this can simply be done using cat.

$ cat my_file_1.mp3 my_file_2.mp3 my_file_3.mp3 > combined_files.mp3

Forgiving players like mplayer can handle the resulting files without any issue. Still, it’s recommended to fix the file header e.g. using avconv.

$ avconv -i combined_files.mp3 -acodec copy combined_files_fixed.mp3

One thought on “Merging mp3 files”

Leave a Reply

Your email address will not be published. Required fields are marked *