Page 1 of 2

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

Posted: Tue 27 Dec 2005, 05:17
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.)

Posted: Tue 27 Dec 2005, 07:08
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

Posted: Wed 28 Dec 2005, 05:17
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. :(

Posted: Wed 28 Dec 2005, 05:23
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

Posted: Wed 28 Dec 2005, 08:10
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)

Posted: Wed 28 Dec 2005, 13:27
by Guest
lame -m mono --preset 24 in.wav out.mp3

lame -h

Posted: Wed 28 Dec 2005, 15:24
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

Posted: Thu 29 Dec 2005, 01:24
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

Posted: Tue 04 Apr 2006, 21:41
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...

Posted: Tue 04 Apr 2006, 22:02
by MU

Posted: Tue 04 Apr 2006, 22:55
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...

Posted: Tue 04 Apr 2006, 23:04
by MU
what for errors do you get when running
lame -m mono --preset 24 /root/test.wav /tmp/out.mp3
in a consolewindow?

Posted: Tue 04 Apr 2006, 23:27
by bugman
No errors, worked fine.

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

Posted: Tue 04 Apr 2006, 23:29
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?

Posted: Tue 04 Apr 2006, 23:31
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

Posted: Tue 04 Apr 2006, 23:33
by MU
no, I have no mlame here, just lame (Puppy 108)

Posted: Tue 04 Apr 2006, 23:38
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!

Posted: Tue 04 Apr 2006, 23:38
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

Posted: Wed 05 Apr 2006, 00:57
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!!

Posted: Wed 05 Apr 2006, 01:12
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