I have a big mp3 file which comes from ripping a full CD. I would like to split it into one file per song. It will be great to find a software that can split the file automatically, detecting the start and the end of each song.

Extra background:

I have tried mp3splt and audacity. The first one fails to autodetect the songs and audacity seems to be unable to do it.

I would like to burn the songs to a CD (mp3 format) to play then in my car radio. It will not support any fancy stuff, it doesn't even have an USB connector.

  • Was the cd originally one big splob of a file, or does it have individual tracks when it's in a cd player? – djeikyb Feb 23 '11 at 0:31
  • see magicode.me/mp3-cut – dovid Jan 18 '16 at 14:38
  • Just a heads up that using a .cue file to load this and play each track individually is another option. – earthmeLon Jan 8 '17 at 19:17
  • Audacity can detect songs by identifying silences between them. However, it is better to then split them with mp3splt so they are not decoded+re-encoded. See my workflow as an answer below. – FairMiles Jun 17 '17 at 23:10
up vote 13 down vote accepted

You can split your large mp3 into small pieces by using the "split" or "split new" function in audacity, then can move apart the portion of audio that you wish to mix down into a different file in order to export it.

In the next screenshot, I have made a new Stereo Track in order to put the split audio into a different track (for visual purposes only), then I moved the second part of the audio to that track and I have selected a portion of audio which can be exported into a new file.

enter image description here

You don't have to split the audio in order to export the portion of audio into a different file, you can simply select the audio and choose "Export Selection" in the File Menu.

In the next screenshot I am doing as I said in the words above.

enter image description here

If you yet have the CD, ripping audio with a file per song can be done by using "Sound Juicer", which will allow you to choose how to rip the media from the CD. This way you will have an mp3 file per song. And the task to mix down all the songs into a large file will be easily achieved by Audacity, just in case you need to do it so.

Sound Juicer can be installed via synaptic or by diving into the website at: http://burtonini.com/blog/computers/sound-juicer

A screenshot are placed here in order to you see Sound Juicer in action. (Sorry, I don't have a CD to rip off right now, so the playlist is empty)

enter image description here

Audacity is BAD for that - since it re-encodes mp3 and the quality gets downgraded. I use ffmpeg for cutting mp3 - I believe it doesn't do re-encoding:

ffmpeg -i InputFile -vn -acodec copy -ss 00:00:00 -t 00:01:32 OutputFile
  • Please see comments to jet answer. – Javier Rivera Aug 26 '11 at 9:28
  • It's arguable that a single lossy transcode can be heard when played back from a car stereo, but this should be the way to go, regardless of use. – Nit Jan 9 '14 at 17:22
  • 2
    FYI these arguments will ALMOST work with "avconv", if you're on a distro that has replaced ffmpeg with libav. The caveat is that you have to put the -ss argument before the -i argument. Also, note that the argument to -t is duration, not seek time. – ACK_stoverflow Jun 11 '16 at 18:24

You say you've tried mp3splt but have you read the full manpage?

I ask because the -s silence mode can take parameters to help it determine silence.

Here a man page example with optional parameters:

mp3splt -s -p th=-50,nt=10 album.mp3
  • th: threshold level (dB) to be considered silence
  • nt number of tracks

There's also a -c CDDB database query mode. If this is a known CD, you can pull the track listing from online. This will also name tracks correctly and (I think) it'll even set the tags up.

It is an incredibly powerful tool and one of your best options for preserving quality... So don't write it off straight away.

  • 2
    No. The truth is that I just used the mp3split-gtk GUI. I'll look at them. – Javier Rivera Feb 23 '11 at 8:06
  • Bad luck. The only option not available in the GUI is to give it the number of tracks. But it just ignored it and found the same number of tracks that from GUI. – Javier Rivera Feb 23 '11 at 8:31

you can try something like:

ffmpeg -i /path/music.mp3 -t 00:10:00 -ss 00:20:00 -acodec copy /path/save.mp3

  • Sure, but I will need to manually find each song time. It will be faster to do it with audacity, at least I can see the wave. – Javier Rivera Feb 23 '11 at 8:06

mp3splt works well. How well depends on what you have to start with and what you expect for results. More inputs = more outputs. If you know the number of songs contained in the large mp3 files, this helps to tell you the number of output files is correct. You MUST have silence sections between your songs in the large mp3 file. The key for mp3splt is to find the correct value for "th". If "th" is too low, you may have too many outputs, so all your songs are fragmented. If too high, your songs will not be split, and you may may have more than 1 song per split. Let's assume you have a large file and nothing else: eg no index for titles or times.

My large file is named "artist.ogg" Here is the command I used:

mp3splt -s -p th=-40 artist.ogg

This resulted in 34 songs split correctly, each named serially as artist_silence_01.ogg -xx.ogg etc.

Again, if you have too many splits, try "th=-48". If too few, try "th=-36".

From these output files, you will need now to rename them into the song titles you want and add labels to the file properties. [I know of no macro for this, so must be a manual process].

hope this helps.

update PS. So far, mp3splt works for mp3 and ogg files. I have no success yet for m4a files.

I can recommend mp3DirectCut. Does lossless conversion and runs fine under Wine:

Screenshot

The following answer on stack overflow is probably relevant:

https://stackoverflow.com/questions/36074224/how-to-split-video-or-audio-by-silent-parts

Summarising this answer, you can use ffmpeg to identify silent regions:

ffmpeg -i "input.mov" -af silencedetect=noise=-30dB,d=0.5 -f null - 2> vol.txt

And then split up the files using Adobe's recipe:

ffmpeg -i InputFile -vn -acodec copy -ss 00:00:00 -t 00:01:32 OutputFile

This will require a little parsing on your part

I got quality results (though not completely automatic) with Audacity + mp3splt.

If you don't have a .cueor a .cddb file with song limits (e.g., it is not a recognized album), you can:

  1. Manually label the track in Audacity as explained in its manual, probably helped by previous silence autodetection (with Analyze > Silence Finder…, see here) for a first guess at notorious breaks
  2. Export the labels (with File > Export Labels…, see here) to a simple text file, and
  3. Feed the .txt file to mp3splt under option -A (as mp3splt -A labels.txt Album.mp3).

It will quickly (no decoding + re-encoding) output a file for each segment using each label name as filename.

Just be careful to use region labels (and not point labels, see here) to mark the beginning and end of each song in Audacity.

protected by Community Mar 27 '15 at 10:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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