Creating a single unbroken audio file in Linux

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
sam500
Level 1
Level 1
Posts: 29
Joined: Wed Feb 03, 2010 9:19 am
Location: Tokyo, Japan

Creating a single unbroken audio file in Linux

Post 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...
LMDE
Missed
Level 2
Level 2
Posts: 74
Joined: Thu Sep 06, 2007 4:46 am
Location: New Zealand

Re: Creating a single unbroken audio file in Linux

Post by Missed »

Try Audacity.
User avatar
RedWagon
Level 5
Level 5
Posts: 632
Joined: Tue May 26, 2009 6:41 pm

Re: Creating a single unbroken audio file in Linux

Post 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...
User avatar
Kaye
Level 5
Level 5
Posts: 933
Joined: Fri Feb 06, 2009 5:05 pm
Location: Boston College
Contact:

Re: Creating a single unbroken audio file in Linux

Post 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
"In somnis veritas"
Antivirus or defragging?
Image
User avatar
RedWagon
Level 5
Level 5
Posts: 632
Joined: Tue May 26, 2009 6:41 pm

Re: Creating a single unbroken audio file in Linux

Post 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...
sam500
Level 1
Level 1
Posts: 29
Joined: Wed Feb 03, 2010 9:19 am
Location: Tokyo, Japan

Re: Creating a single unbroken audio file in Linux

Post 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.
LMDE
User avatar
Kaye
Level 5
Level 5
Posts: 933
Joined: Fri Feb 06, 2009 5:05 pm
Location: Boston College
Contact:

Re: Creating a single unbroken audio file in Linux

Post 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.
"In somnis veritas"
Antivirus or defragging?
Image
sam500
Level 1
Level 1
Posts: 29
Joined: Wed Feb 03, 2010 9:19 am
Location: Tokyo, Japan

Re: Creating a single unbroken audio file in Linux

Post 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.
LMDE
Post Reply

Return to “Software & Applications”