Page 1 of 1

Creating a single unbroken audio file in Linux

Posted: Thu Mar 25, 2010 1:04 am
by sam500
I listen to a lot of DJ mixes and because my Sony walkman doesn't support gapless playback, I was hoping to rip these discs to a single mp3 file.

Does anyone know of any applications out there that have this feature? I've been using EAC for general ripping but I don't believe that it supports this function...

Re: Creating a single unbroken audio file in Linux

Posted: Thu Mar 25, 2010 1:33 am
by Missed
Try Audacity.

Re: Creating a single unbroken audio file in Linux

Posted: Thu Mar 25, 2010 6:34 pm
by RedWagon
depending on the way the audio file is written this might work:

Code: Select all

cat song1.mp3 song2.mp3 > together.mp3
a command like this is usually used to put two text files together, but can also be used to stick together .mpg files (like on a home dvd where everything's broken up). I don't know if it will work, but if it does, this is the simplest way possible. Just make sure whatever you put after the > doesn't already exist because if it does, it's getting overwritten.

Try it out with two songs and let me know the results, I'm kind of curious if this works or not. Might try it once I get home and have some sound files to play with...

Re: Creating a single unbroken audio file in Linux

Posted: Fri Mar 26, 2010 12:56 am
by Kaye
RedWagon,

I just came across this and that's interesting to me.. Is cat written to handle mpg in this way or is it just a fluke that it can work that way? I feel like the mp3 metadata would interfere with the combination of the two files. I haven't tried anything, just throwing in my two cents :P

Re: Creating a single unbroken audio file in Linux

Posted: Fri Mar 26, 2010 4:49 pm
by RedWagon
Just a fluke. Trying to explain what cat does exactly is getting into some seriously deep Linux stuff (over my head right now) but it basically starts at the beginning of a file and feeds it into standard output. By using > you can redirect that output from the terminal to another file as kind of a roundabout copy. I've actually used this method to retrieve photos off a bad flash drive when cp wouldn't work.
For putting files together if you have cat read multiple files and redirect all of them to one file they'll all just be jammed together end to end. Depending on the type of file this can be used to join different files but now that you mention it, .mp3 does have a lot of metadata so it probably wouldn't work...

Re: Creating a single unbroken audio file in Linux

Posted: Fri Mar 26, 2010 10:37 pm
by sam500
Thank you all for your suggestions. Haven't had time to give them a go yet but will post the result when I do.

Re: Creating a single unbroken audio file in Linux

Posted: Sat Mar 27, 2010 2:25 pm
by Kaye
An interesting result with cat.. it does combine the two files (so the result file is the size of the two smaller files combined), but because of the way the metadata is read, the result ends up effectively being a copy of the first file that you passed as an argument. So technically they are combined, but you can only access the first .mp3. Even stripping the metadata from the second .mp3 wouldn't be enough, you would also have to alter the metadata of the first file to give it the correct length and such. It's definitely possible, but a little more complicated than just passing it through cat.

Re: Creating a single unbroken audio file in Linux

Posted: Mon Mar 29, 2010 10:12 pm
by sam500
Ok, so I finally came across this thread: http://ubuntuforums.org/archive/index.php/t-819965.html

Apparently Rubyripper has an option in its preferences to 'Rip CD to single file'. However I have RR installed and I can't say I've come across this option.

It looks like ABCDE ripper is my best bet. Just need to pluck up some courage and open that terminal window!

Thanks for all your help.