How can I split a mp3 file?

69,634

Solution 1

Audacity

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

Sound Juicer

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

Solution 2

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:

# start time to end time:
ffmpeg -i input.mp3 -vn -acodec copy -ss 00:00:00 -to 00:01:32 output.mp3

# start time + duration time:
ffmpeg -i input.mp3 -vn -acodec copy -ss 00:00:00 -t 00:01:32 output.mp3

# start of record till end time:
ffmpeg -i input.mp3 -vn -acodec copy -to 00:01:32 output.mp3

# start time till end of record:
ffmpeg -i input.mp3 -vn -acodec copy -ss 00:01:32 output.mp3

one can also include milliseconds with e.g. 00:00:00.000.

Solution 3

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.

Solution 4

you can try something like:

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

Solution 5

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

Screenshot

Share:
69,634

Related videos on Youtube

Javier Rivera
Author by

Javier Rivera

Updated on September 17, 2022

Comments

  • Javier Rivera
    Javier Rivera over 1 year

    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.

    • djeikyb
      djeikyb about 13 years
      Was the cd originally one big splob of a file, or does it have individual tracks when it's in a cd player?
    • dovid
      dovid over 8 years
    • earthmeLon
      earthmeLon over 7 years
      Just a heads up that using a .cue file to load this and play each track individually is another option.
    • FairMiles
      FairMiles almost 7 years
      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.
  • Javier Rivera
    Javier Rivera about 13 years
    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
    Javier Rivera about 13 years
    No. The truth is that I just used the mp3split-gtk GUI. I'll look at them.
  • Javier Rivera
    Javier Rivera about 13 years
    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
    Javier Rivera over 12 years
    Please see comments to jet answer.
  • Etheryte
    Etheryte over 10 years
    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.
  • ACK_stoverflow
    ACK_stoverflow almost 8 years
    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.
  • frakman1
    frakman1 about 5 years
    @Adobe I like this approach. Do you know if you can specify milliseconds granularity? I have a need to chop off the first part of several mp3s that all start with the same unwanted sequence.
  • Adobe
    Adobe about 5 years
    @frakman1 do you mean to specify milliseconds? Like this: ffmpeg -i a.ogg -ss 00:01:02.500 -t 00:01:03.250 -c copy x2.ogg (source)
  • frakman1
    frakman1 almost 5 years
    @Adobe. Yes, that's exactly what I meant. Thank you for the example with milliseconds. Perhaps you can update your answer to include both versions.
  • jchook
    jchook over 4 years
    If you want to script it then ffmpeg can help
  • oleksa
    oleksa about 4 years
    here is my little parsing part implemented as bash script