Ripping, converting wav to (32 kbps mono) mp3 with RipperX

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

Ripping, converting wav to (32 kbps mono) mp3 with RipperX

#1 Post by Flash »

Flash wrote:Would it be possible to add the choice of "32k mono" to RipperX's mp3 configuration? Currently the lowest choice of bitrate is 56k.
MU wrote:you can try to add the option
-b 32 -m m
in the bottom-field of the mp3-options.

Mark
Mark, it works! At least in 1.0.7(b). It took me about 4 hours to get everything right, but I finally ripped the wav files from a CD to a temporary location on the hd, then converted them to (32 bps mono) mp3 and stored the mp3 files on a USB flash memory, all with RipperX. :D

It looks like I was wrong about how slow RipperX is though. It took at least 12 minutes to convert a 700MB CD to mp3 files with RipperX. RealPlayer did the same thing in less than 4 minutes.

Possibly it's so slow because I have a setting wrong. I've included screenshots of the RipperX configuration settings I used. Perhaps someone can see what I did wrong. (I tried for 2 hours but could not find a way with mtPaint to combine all 4 screenshots into one composite image.)
Attachments
General.jpg
(23.14 KiB) Downloaded 2310 times
Wav.jpg
(18.67 KiB) Downloaded 2244 times
Mp3.jpg
(23.96 KiB) Downloaded 2338 times
Files.jpg
(18.5 KiB) Downloaded 2291 times

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

I had no closer look at ripperX yet.
But often such programs work "sequentially", thats to say they convert one file after the other.
You could speed up things by converting them parallel, not sequentially.
I can't tell you, how much it will speed up things, just try yourself.

One solution:
Install the DragNDrop-icons:
http://www.murga.org/~puppy/viewtopic.php?t=4632

they have an icon to convert mp3 to wav.
This is the opposite of what you need, so patch it to your needs:
Open /usr/local/DragnDrop-Icons/scripts-mp3towav/action1 in leafpad.

replace

Code: Select all

     filename &= ".wav"
     target = savefolder & "/" & filename
     shell("xterm -e \"lame --decode \\\"" & result &"\\\" \\\"" & target & "\\\"\" &")

with

Code: Select all

     filename=cutright(filename , ".wav")
      filename &= ".mp3"
     target = savefolder & "/" & filename
     shell("xterm -e \"lame -b 32 -m m \\\"" & result &"\\\" \\\"" & target & "\\\"\" &")
Now you can rip a CD with ripperX as .wav, and then drag the .wav-Files from ROX to the icon.
Then all files will be converted at same time to mp3.

Mark

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#3 Post by Flash »

Thanks Mark.

RipperX does a fine job of converting wav files to mp3, taking approximately 15 seconds to convert a 3 minute track. Where it seems really sloooow is the step where it rips the wav files from the CD to the hd. Probably 95% of the time was spent ripping the track -- from a brand-new CD -- and 5% converting it to mp3. :(

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

cdparanoia --help

-S --force-read-speed <n> : read from device at specified speed

So in ripperX try the option
-S 12
in config - wav - extra options.
Mark

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#5 Post by Lobster »

In the Puppy recorder I save in Wav format (for pod cast) - do we have an easy way to save or convert to MP3 or ogg vorbis? (I normally have to download Audacity to do this) The best way to find Audacity I believe is at grafpup.com or is it on the wiki pages too?

The reason I ask - a lot of people use MP3 players (which is a compressed format) ogg vorbis is higher compression and better sound and open source but not all MP3 players support playing in this. Ideally I would like to offer pawed casts in triplicate:

wav - for CD players and Windows users players
mp3 - Windows and Mp3 players
ogg vorbis - for elite Puppy users, with speek potential for future usage ) more compression - optimised for speech

Perhaps even a fourth format .au for SUN solaris and Unix users

8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Guest

#6 Post by Guest »

lame -m mono --preset 24 in.wav out.mp3

lame -h

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#7 Post by Lobster »

Would that be G2?
:)

Anyways . . .
This deserves its own wiki page - what else can we convert? And
http://puppylinux.org/wikka/ConvertingFormats

Check out this - one of the hidden gems in Puppy
Start / utilities / calculators / tkconvert
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#8 Post by GuestToo »

you could write a script, and drag wav files to the script (or shortcut to the script)

#!/bin/sh
lame -m mono --preset 24 "$1" /tmp/out.mp3

or

#!/bin/sh
rxvt -e lame -m mono --preset 24 "$1" /tmp/out.mp3

this will create out.mp3 in /tmp

you may prefer a higher or lower bitrate ... or a different preset, or to set your own parameters

bugman

#9 Post by bugman »

you could write a script, and drag wav files to the script (or shortcut to the script)

#!/bin/sh
lame -m mono --preset 24 "$1" /tmp/out.mp3

or

#!/bin/sh
rxvt -e lame -m mono --preset 24 "$1" /tmp/out.mp3

this will create out.mp3 in /tmp

you may prefer a higher or lower bitrate ... or a different preset, or to set your own parameters

Is there a way to do this so the mp3 keeps the name of the original wav, instead of becoming "out.mp3"?


Btw, the Drag 'n' Drop patch shown above doesn't seem to work, I get a brief flurry of activity (a window opens and closes quickly) but no mp3 is made, I must be doing something wrong...

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#10 Post by MU »


bugman

#11 Post by bugman »

Multiconvert, perl downloaded and multiconvert run. More windows open and close very quickly but again no mp3s are made. Is my computer allergic to mp3s? Crikey...

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#12 Post by MU »

what for errors do you get when running
lame -m mono --preset 24 /root/test.wav /tmp/out.mp3
in a consolewindow?

bugman

#13 Post by bugman »

No errors, worked fine.

When I try to use wildcards in a lame command line I get excess arg errors.

bugman

#14 Post by bugman »

btw, lame appears to have a script called mlame to handle batches, but it doesn't work when I try it. Is it included in the puppy version of lame?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#15 Post by MU »

what do you enter exactly?
What error do you get exactly?

hmm.. did you install the xterm I mentioned in the multiconvert-posting?
I think with Puppys xterm it does not work.
Mark

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#16 Post by MU »

no, I have no mlame here, just lame (Puppy 108)

bugman

#17 Post by bugman »

Actually, I just learned something--I can drag and drop my mp3s to /usr/bin/lame and a good mp3 gets made!

My problem is I have over 100 wavs I need to convert, with complex names I wish to keep. It's gonna be a helluva lot easier dnd'ing 100 files than it is to type all that out in a terminal/ Think I'll go that way...

Thanks for your help!

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#18 Post by MU »

you can check, if you installed another version of lame, that causes problems.

which lame

This should report:
/usr/bin/lame

Now look in /root/.usr/bin/ if there also is a lame.
If yes, then it is not puppys lame.
delete that and reboot ( really: /root/.usr/bin/lame ,NOT /usr/bin/lame ).
Then you have back puppys lame, that is in usr_cram.fs.
Mark

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#19 Post by trapster »

Bugman,

In the directory with your .wav's try this:

for i in *.wav; do lame -h $i `basename $i .wav`.mp3; done

This would save the titles also.
If you have spaces in the titles try this before you convert them (it will replace spaces with underscores):

for i in *.wav; do mv "$i" `echo $i | tr ' ' '_'`; done


I use this little script for burning my cd's.

#!/bin/bash
cd /mnt/home/music/mp3
echo "If the files have spaces in the names, we'll remove them now"
sleep 2
for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`; done
echo "Now we need to convert the .mp3's to .wav files"
sleep 2
for i in *.mp3; do lame --decode $i `basename $i .mp3`.wav; done
echo "Files have been converted to .wav"
sleep 2
echo "Now we will burn them to a disc, make sure there is a blank disc in the burner"
echo "The disc tray will open when the burning is complete"
cdrecord dev=ATAPI:0,0,0 -eject speed=2 -pad -audio -text -useinfo *.wav
echo "If the tray has opened, the burn is complete"
sleep 2
echo "Now we'll delete the .wav files that were created for burning"
rm *.wav
sleep 2
echo "The burning process is now complete"


Now if I can only figure out how to extract the titles and artists into an .inf file, I could also have cd text!!
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#20 Post by MU »

for i in *.wav; do lame -h $i `basename $i .wav`.mp3; done

This should with spaces, too:

ls *.wav | while read i; do lame -h "$i" `basename "$i" .wav`.mp3; done

This "piping" avoids problems with spaces.
Mark

Post Reply