Lame encoding from .wav to .mp3
I am no audio expert but given that the "ripping and encoding" tool I used to use "Grip" is no longer available within the Ubuntu repositories, I have had to resort to something else. Grip as an application has not been updated much since it was released and this along with other applications need to be continually bettered and updated. I liked "Grip" a lot and was saddened that it is no longer available in the Ubuntu repositories.
I had thought I would use another Gnome or KDE app but decided that perhaps I should use the command line instead. Using the command line does have some disadvantages in as much the ripping and encoding of CD's directly is not possible - not in this tutorial anyway!
You need to use something like "K3b" to copy and convert the filename.cdr into filename.wav files. Most software CD duplication apps will do this, K3b is only one example. Place these files into a directory of your choice in your /home/>name< so you can easily select and edit each of the files.
Open a new console or Terminal and change the directory to that folder containing the filename(s).wav, files copied from CDRom.
This command if run will find all .wav files within a selected directory. It will select and process each of the named files producing an output much like that found below. Copy the above command as is and paste into the terminal window press enter to run it should not require any editing.
LAME 3.98.4 64bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 19383 Hz - 19916 Hz
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=0)
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
7808/7808 (100%)| 0:15/ 0:15| 0:15/ 0:15| 13.322x| 0:00
32 [ 42] *
40 [ 0]
48 [ 0]
56 [ 0]
64 [ 0]
80 [ 1] %
96 [ 0]
112 [ 0]
128 [ 0]
160 [ 32] %
192  %%%%%*********
224  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*******************
256  %%%%%%%%%%%%%%%***
320 [ 133] %%
kbps LR MS % long switch short %
225.4 68.8 31.2 99.5 0.2 0.2
Writing LAME Tag...done
I can explain most of the commands used and will attempt to do so in the paragraph below.
for f in *.wav;
do lame -q 0 --vbr-new -V 0 "$f" `basename $f .wav`.mp3;
The command above consists of three parts, the "for" loop the command itself and the loop return. Each new command is terminated by by a semi-colon ";" before the next command is run.
for f in *.wav; This counts each instance of .wav and stores it's value f, counting begins at zero.
(do) preceeds the command you are about to use, it is used within (for) loops
(lame) is the command to be executed and would or may be followed be command line options
(-q 0) select the slowest and best algorithm to use
(--vbr-new V 0) adopts the variable bit rate and selecting V 0 for the best quality
("$f") The quotes are use when filename includes spaces or special characters
(`basename $f .wav`.mp3) the proceeding variable is replaced with basename and assigned back to $f of the file rather than it's basename.wav it also appends the new .mp3 to the basename.
(done) will do one of two things depending on whether files remain in it, in which case it returns to do another loop or terminates the program.
I did not locate the command I wanted so I had to adapt from snippets I found on the web else where, and I put together myself. The command itself does work, at least it does in Ubuntu, but should work equally well on other Debian systems. Essentially what we have is a script of three lines with each line being terminated by a semi colon ";" the semi colon allows us to place all three lines on one line, this method can be used for any combinations of commands you might want to use eg