Neither cat nor mp3wrap are working for me. They merge the files, but the when playing the resulting file, the audio length information is wrong. That is, it show the length of the 1st part (the part which was the 1st file), then the length of the 2nd ... . And so on.

Other alternative that might work? In the past I was happy with ffmpeg but it was deprecated.

  • Since when is ffmpeg deprecated? A few more programs that might work: cutmp3 and quelcom (haven't verified they'll actually join two mp3 files). – derobert Apr 26 '16 at 18:44
  • @derobert: I don't know how long. But Ubuntu is clear about this when I try to run ffmpeg: THIS PROGRAM IS DEPRECATED This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes). – Pierre B Apr 29 '16 at 19:41
  • That's a warning from libav's ffmpeg-compatability-wrapper. You could use avconv, but really—the libav fork is dead, ffmpeg is not. You should just ignore the warning. ffmpeg is not deprecated. – derobert Apr 29 '16 at 19:44
  • 1
    This askubuntu post covers the ffmpeg deprecation warning in detail. So this SuperUser post might be a good answer to this problem. – fcbsd Nov 8 '17 at 17:09
  • Note that as of in Aug 2018, it is not deprecated. You can reach ffmpeg community through irc channels: #ffmpeg and #ffmpeg-devel ffmpeg.org/contact.html and their github on github.com/FFmpeg/FFmpeg – Jun Aug 31 '18 at 22:21

I use sox. In order to concatenate mp3 files :

 sox file1.mp3 file2.mp3 file3.mp3 output.mp3

Sox can also be used to perform many other sound operations.


To avoid license problems, some Linux distributions don't have sox mp3 support by default. But normally there is a package...

  • fedora: sudo dnf install sox-plugins-freeworld
  • debian & friends sudo apt-get install libsox-fmt-mp3 (untested...)

may I suggest the linux version of audacity? very user friendly and it is structured for audio files

  • But requires a GUI. Think the OP is after a command line utility. Good suggestion otherwise – ivanivan Aug 31 '18 at 22:39
  • Audacity is not an ideal choice, EXTREMELY slow when you use very long files. Encoding of mp3s is only single threaded and can take a long time. On a decent quad core, 10 hours of mp3 encoding took up to a whole hour, the CPU was probably 20% used during that time. – nigratruo May 2 at 1:29

ffmpeg -i "concat:1.mp3|2.mp3|3.mp3" -acodec copy output.mp3

If you use Python, you can use a subprocess

import subprocess

subprocess.call(['ffmpeg', '-i', 'concat:1.mp3|2.mp3|3.mp3', '-acodec', 'copy', 'output.mp3'])

You can also have the paths to your mp3 in a file.

# audio-to-process.txt
file '/path/to/mp3-1'
file '/path/to/mp3-2'
file '/path/to/mp3-3'


ffmpeg -f concat -safe 0 -i audio-to-process.txt -c copy output

The -safe 0 flag is not needed if the file paths are relative.

ffmpeg concatenate api API page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.