Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to merge mp3 files? [closed]

Tags:

audio

mp3

I've got many, many mp3 files that I would like to merge into a single file. I've used the command line method

copy /b 1.mp3+2.mp3 3.mp3 

but it's a pain when there's a lot of them and their namings are inconsistent. The time never seems to come out right either.

like image 523
Dan Williams Avatar asked Sep 15 '08 13:09

Dan Williams


1 Answers

David's answer is correct that just concatenating the files will leave ID3 tags scattered inside (although this doesn't normally affect playback, so you can do "copy /b" or on UNIX "cat a.mp3 b.mp3 > combined.mp3" in a pinch).

However, mp3wrap isn't exactly the right tool to just combine multiple MP3s into one "clean" file. Rather than using ID3, it actually inserts its own custom data format in amongst the MP3 frames (the "wrap" part), which causes issues with playback, particularly on iTunes and iPods. Although the file will play back fine if you just let them run from start to finish (because players will skip these is arbitrary non-MPEG bytes) the file duration and bitrate will be reported incorrectly, which breaks seeking. Also, mp3wrap will wipe out all your ID3 metadata, including cover art, and fail to update the VBR header with the correct file length.

mp3cat on its own will produce a good concatenated data file (so, better than mp3wrap), but it also strips ID3 tags and fails to update the VBR header with the correct length of the joined file.

Here's a good explanation of these issues and method (two actually) to combine MP3 files and produce a "clean" final result with original metadata intact -- it's command-line so works on Mac/Linux/BSD etc. It uses:

  • mp3cat to combine the MPEG data frames only into a continuous file, then
  • id3cp to copy all metadata over to the combined file, and finally
  • VBRFix to update the VBR header.

For a Windows GUI tool, take a look at Merge MP3 -- it takes care of everything. (VBRFix also comes in GUI form, but it doesn't do the joining.)

like image 99
joelhardi Avatar answered Sep 26 '22 05:09

joelhardi