Wiki source for WavRec

Show raw source

[[HomePage]] > [[ComponentHowTo Components and HowTos]] > [[HowToMultimedia Multimedia]]

{{image url=""}}
====Recording with wavrec command====

I knew it would be very feasible to **convert cassettes to mp3 files**, but I'd never done it before.

Now that I've done it and worked out a system, I'd like to share with you all what I've learned and how I did it.

After trying several techniques it became obvious that the cl utility wavrec (included with Puppy) is the way to go for making the initial recording. The basic problem with the graphical programs is mostly that the files are potentially huge, and it takes a lot of time and resources for these programs to handle and save huge files.


Usage: wavrec [options] output_file


-h This info (or use --help)
-q Quiet mode (no messages)
-s rate Sampling rate
-x Debug mode
-S Stereo (undoes -M)
-M Mono (undoes -S)
-t secs Set time limit
-b bits Set number of bits (8/16)
-k key Set IPC Key for lock
-R Remove and recreate semaphore locks.
-l Lock for play.
-u Unlock for play.
-L Lock for record.
-U Unlock for record.
-d dev Override default of /dev/dsp
-V Display version and Copyright info (or use --version)

I was recording mono cassettes and the options I used were as follows:

# wavrec -s 44100 -M -t 1800 -b 16 00.wav

If I was recording stereo, I'd use these arguments:

# wavrec -s 44100 -S -t 1800 -b 16 00.wav

Basically, what I did was set my walkman on the desk and plugged it into the sound card input with a male - male four foot 1/8" stereo adapter cord.

The first step one needs to do is calibrate and adjust the volume of the recording. In order to get any sound at all I had to use Puppy's Xtmix, then enable 'IN GAIN' and adjust the volume settings.

A quick technique for the calibration process is enter these commands on the command-line:

# wavrec -s 44100 -S -t 8 -b 16 test.wav;wavplay test.wav

This will record for 8 seconds and then playback for 8 seconds.

Note: if you have a powerful output device, I'd recommend starting out with low volume levels. The reason why is: I don't know how much power the sound card input can handle. Play it safe. My walkman only has power to drive dynamic earphones, so I needed the volume very high.

Adjust the recording time so that it is longer than the anticipated playing time so you don't fall short and have to start over.

One nice thing is wavrec takes very little cpu usage so you can record in the background and have most of your computer's resources for other tasks.

At the end of your preset recording time wavrec will stop and return to the command prompt. You will have very big file which needs to have silence trimmed off the end of the recording.

I tried a few graphical editors to open these files, but it takes them forever and a day to open, edit and save a 300 MB file. Some won't open these files because they are too big.

In any event I discovered a command line utility called wavsplit. Wavsplit will trim the silence in just a few seconds. I'll make a dotpup package post it with all the other dotpups.



WAVSPLIT version 1.1.0 (
Licensed under GPL by author Tobias Weihmann
Hour patch by Sacha Bartok (
Modified for frames, hours, seconds, decimal seconds by Alan Fitch

Usage: wavsplit [options] wavfile split split split...

-q --quiet Quiet mode (no messages)
-H --Hours Use Hours
wavsplit [options] wavfile hr:min:sec [hr:min:sec]...
-f --frames FPS use Frames
FPS (frames per second) must be either 12, 24, 25, or 30
wavsplit [options] wavfile min:sec:fr [min:sec:fr]...
-s --seconds Use Seconds
wavsplit [options] wavfile sec [sec]...
-h --help This info

You can combine both Hours and frames options

wavsplit --frames 30 file.wav 32:21:15 45:10:0
wavsplit --Hours file.wav 1:32:21:59.2 1:45:10:0.3
wavsplit --seconds file.wav 300.1 500.2


You can break the file in several pieces if you want. All I needed to do was trim the silence from the ends.

My command string would look like this example:

# wavsplit -H 00.wav 00:23:14

What wavsplit does is make a subdirectory based on the basename of the wav file. It puts the split files in that subdirectory. It doesn't modify the original.

The question is: "How do you know where to split the file?"

I used xmms (a dotpup package) on the command line like this:

xmms 00.wav &

Xmms has a slider that makes it very simple to find the end of the recording. It also displays the position in minutes and seconds so it makes it simple to know precisely where to split the file.


Once you have your wav files all ready for decoding you can use lame or bladeenc. Lame is included with puppy and bladeenc can be downloaded.

The common command string for lame is:

# lame -h inname.wav outname.mp3

You can also use:

# lame -h *.wav

Note: the -h switch is for high quality, for this type of recording you will get smaller files by omitting the -h switch with probably no noticable loss of quality.

The command for bladeenc (not included with Puppy) is:

# bladeenc *.wav

This decoding process is time consuming and uses plenty of cpu power at low priority.

See also [[TheRenegadeProgramm11Wine proposals for the use of Wine]] in this difficult matter!

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki