MAN page from Old RedHat 6.X cdrecord-1.8a27-1.i386.rpm
CDDA2WAV
Section: User Commands (1)
Index NAME
cdda2wav - a sampling utility that dumps CD audio data into wav soundfiles
SYNOPSIS
cdda2wav[
-cchans][
-s][
-m][
-bbits][
-rrate][
-adivider][
-ttrack[
+endtrack]][
-iindex][
-ooffset][
-dduration][
-x][
-q][
-w][
-v][
-V][
-J][
-R][
-Psectors][
-F][
-G][
-T][
-e][
-ppercentage][
-nsectors][
-lbuffers][
-N][
-J][
-H][
-g][
-B][
-Ddevice][
-Aauxdevice][
-Iinterface][
-Oaudiotype][
-Cinput-endianess][
-Eoutput-endianess][
-Mcount][
-Sspeed][
audio.wav]
DESCRIPTION
cdda2wavcan retrieve audio tracks from CDROM drives (see README for a list of drives) that arecapable of reading audio data digitally to the host(
CDDA).Other drives may have been added as well when you read this.
OPTIONS
- -D device --device
- usesdeviceas the source for CDDA reading:For example /dev/cdrom for thecooked_ioctlinterface and Bus,ID,Lun for the generic_scsiinterface. This has to correspond with the interface setting (see below).The setting of the environment variableCDDA_DEVICEis overridden by this option.
- -A auxdevice --auxdevice
- usesauxdeviceas CDROM drive for ioctl usage.
- -I interface --interface
- specifies the interface for CDROM access:generic_scsior (on Linux systems)cooked_ioctl.
- -c channels --channels
- uses1for mono, or2for stereo recording,orsfor stereo recording with both channels swapped.
- -s --stereo
- sets to stereo recording.
- -m --mono
- sets to mono recording.
- -x --max
- sets maximum (CD) quality.
- -b bits --bits-per-sample
- sets bits per sample per channel:8,12or16.
- -r rate --rate
- sets rate in samples per second. Possible values are listed with the-Roption.
- -a divider --divider
- sets rate to 44100Hz / divider. Possible values are listed with the-Roption.
- -R --dump-rates
- shows a list of all sample rates and their dividers.
- -P sectors --set-overlap
- sets the initial number of overlapsectorsfor jitter correction.
- -n sectors --sectors-per-request
- reads sectorsper request.
- -l buffers --buffers-in-ring
- uses a ring buffer with bufferstotal.
- -t track+endtrack --track
- selects the start track and optionally the end track.
- -i index --index
- selects the start index.
- -o offset --offset
- startsoffsetsectors behind start track (one sector equivalents 1/75 seconds).
- -O audiotype --output-format
- can be wav(for wav files) oraiff(for apple/sgi aiff files) oraifc(for apple/sgi aifc files) orauorsun(for sun .au PCM files) orcdrorraw(for headerless files to be used for cd writers).
- -C endianess --cdrom-endianess
- sets endianess of the input samples to 'little', 'big' or 'guess' to override defaults.
- -E endianess --output-endianess
- sets endianess of the output samples to 'little' or 'big' to override defaults.
- -d duration --duration
- sets recording time in seconds or frames.Frames (sectors) are indicated by a 'f' suffix (like 75f for 75 sectors).0sets the time for whole track.
- -B --bulk
- copies each track into a seperate file.
- -w --wait
- waits for signal, then start recording.
- -F --find-extremes
- finds extrem amplitudes in samples.
- -G --find-mono
- finds if input samples are in mono.
- -T --deemphasize
- undo the effect of pre-emphasis in the input samples.
- -e --echo
- copies audio data to sound device e.g./dev/dsp.
- -p percentage --set-pitch
- changes pitch of audio data copied to sound device.
- -v level --verbose-level
- prints verbose information about the CD.Levelis a sum of powers of two in the range 0 up to 63. Each power of two controls the type of information to be reported.
| Power | Description
|
| | 1 | show table of contents
| | 2 | show a summary of the recording parameters
| | 4 | determine and display index offsets
| | 8 | retrieve and display the media catalog number MCN
| | 16 | retrieve and display all Intern. Standard Recording Codes ISRC
| | 32 | show the table of contents in start sector notation
| | 64 | show the table of contents with track titles (when available)
|
|
- -N --no-write
- does not write to a file, it just reads (for debugging purposes).
- -J --info-only
- does not write to a file, it just gives information about the disc.
- -H --no-infofile
- does not write an info file and a cddb file.
- -g --gui
- formats the output to be better parsable by gui frontends.
- -M count --md5
- enables calculation of MD-5 checksum for 'count' bytes from a beginning of atrack.
- -S speed --speed-select
- sets the cdrom device to one of the selectable speeds for reading.
- -q --quiet
- quiet operation, no screen output.
- -V --verbose-SCSI
- enable SCSI command logging to the console. This is mainly used for debugging
- -J --version
- display version of cdda2wav on standard output.
- Defaults depend on the
- Makefileandenvironment variablesettings (currentlyCDDA_DEVICE).
ENVIRONMENT VARIABLES
CDDA_DEVICEis used to set the device name. The device naming is compatible with JörgSchilling's cdrecord package.
DISCUSSION
cdda2wavis able to read parts of an
audioCD or
multimediaCDROM (containing audio parts) directly digitally. These parts can bewritten to a file, a pipe, or to a sound device.
cdda2wavstands forCDDAtoWAV(whereCDDAstands for compact disc digital audio andWAVis a sound sample format introduced by MS Windows). Itallows copyingCDDAaudio data from the CDROM drive into a file on your ram-, hard-, floppy-or whatever-disk in WAVor other formats.
The latest versions try to get higher real-time scheduling priorities to ensuresmooth (uninterrupted) operation. These priorities are available for super usersand are higher than those of 'normal' processes. Thus delays are minimized.Please note that you need newer kernels and c libraries to take advantage of this feature.
If your CDROM (not yet for SCSI drives) is on device/dev/cdromand it is loaded with an audio CD, you may simply invokecdda2wavand it will create the sound fileaudio.wavrecording the whole track beginning with track 1 in stereo at 16 bit at 44100Hz sample rate, if your file system has enough space free. Otherwiserecording time will be limited. SCSI drives have to use different devices(see filesREADMEandREADME.INSTALLfor details).
HINTS ON OPTIONS
- Options
- Most of the options are used to control the format of the WAV file. Inthe following text all of them are described.
- Select Device
- -D deviceselects the CDROM drive device to be used.The specifier given should correspond to the selected interface (see below).CHANGE!For the cooked_ioctl interface this is the cdrom device descriptor as before.The SCSI devices used with the generic SCSI interface however are nowaddressed with their SCSI-Bus, SCSI-Id, and SCSI-Lun instead of the genericSCSI device descriptor!!!One example for a SCSI CDROM drive on bus 0 with SCSI ID 3 and lun 0 is -D0,3,0.
- Select Auxiliary device
- -A auxdeviceis necessary for CD-Extra handling. For Non-SCSI-CDROM drives this is thesame device as given by -D (see above). For SCSI-CDROM drives it is theCDROM drive (SCSI) device (i.e. /dev/sr0) corresponding to the SCSI device (i.e.0,3,0). It has to match the device used for sampling.
- Select Interface
- -I interfaceselects the CDROM drive interface. For SCSI drives use generic_scsi(cooked_ioctl may not yet be available for all devices):generic_scsiandcooked_ioctl.The first uses the generic SCSI interface, the latter uses the ioctl ofthe CDROM driver. The latter variant works only when the kernel driver supportsCDDAreading. This entry has to match the selected CDROM device (see above).
- Enable echo to soundcard
- -ecopies audio data to the sound card while recording, so you hear it nearlysimultaneously. The soundcard gets the same data that is recorded. Thisis time critical, so it works best with the-qoption. To usecdda2wavas a pseudo CD player without recording in a file you could usecdda2wav -q -e -t2 -d0 -Nto play the whole second track. This feature reduces the recording speedto at most onefold speed. You cannot make better recordings than your sound cardcan play (since the same data is used).
- Change pitch of echoed audio
- -p percentagechanges the pitch of all audio echoed to a sound card. Only the copyto the soundcard is affected, the recorded audio samples in a fileremain the same.Normal pitch, which is the default, is given by 100%.Lower percentages correspond to lower pitches, i.e.-p 50 transposes the audio output one octave lower.See also the scriptpitchplayas an example. This option was contributed by Raul Sobon.
- Select mono or stereo recording
- -mor-c 1selects mono recording (both stereo channels are mixed),-sor-c 2or-c sselects stereo recording (doubles file size). Parameter swill swap both sound channels.
- Select maximum quality
- -xwill set stereo, 16 bits per sample at 44.1 KHz (full CD quality). Notethat other format options given later can change this setting.
- Select sample quality
- -b 8specifies 8 bit (1 Byte) for each sample in each channel;-b 12specifies 12 bit (2 Byte) for each sample in each channel;-b 16specifies 16 bit (2 Byte) for each sample in each channel (Ensure thatyour sample player or sound card is capable of playing 12-bit or 16-bitsamples). Selecting 12 or 16 bits doubles file size. 12-bit samples arealigned to 16-bit samples, so they waste some disk space.
- Select sample rate
- -r samplerateselects a sample rate.sampleratecan be in a range between 44100 and 900. Option-Rlists all available rates.
- Select sample rate divider
- -a dividerselects a sample rate divider.dividercan be minimally 1 and maximally 50.5 and everything between in steps of 0.5.Option-Rlists all available rates.
- To make the sound smoother at lower sampling rates,cdda2wavsums overnsamples (wherenis the specific dividend). So for 22050 Hertz output we have to sum over2 samples, for 900 Hertz we have to sum over 49 samples. This cancelshigher frequencies. Standard sector size of an audio CD (ignoringadditional information) is 2352 Bytes. In order to finish summingfor an output sample at sector boundaries the rates above have to bechoosen. Arbitrary sampling rates in high quality would require someinterpolation scheme, which needs much more sophisticated programming.
- List a table of all sampling rates
- -Rshows a list of all sample rates and their dividers. Dividers can rangefrom 1 to 50.5 in steps of 0.5.
- Select start track and optionally end track
- -t n+mselectsnas the start track and optionallymas the last track of a range to be recorded.These tracks must be from the table of contents. This setsthe track where recording begins. Recording can advance through thefollowing tracks as well (limited by the optional end track or otherwisedepending on recording time). Whether one file or different files arethen created depends on the-Boption (see below).
- Select start index
- -i nselects the index to start recording with. Indices other than 1 willinvoke the index scanner, which will take some time to find the correctstart position. An offset may be given additionally (see below).
- Set recording time
- -d nsets recording time tonseconds or set recording time for whole track ifnis zero. In order to specify the duration in frames (sectors) also, theargument can have an appended 'f'. Then the numerical argument is to betaken as frames (sectors) rather than seconds.Please note that if track ranges are being used they define the recordingtime as well thus overriding any-d optionspecified times.
- Recording time is defined as the time the generated sample will play (atthe defined sample rate). Since it's related to the amount of generatedsamples, it's not the time of the sampling process itself (which can beless or more). It's neither strictly coupled with the time information onthe audio CD (shown by your hifi CD player).Differences can occur by the usage of the-ooption (see below). Notice that recording time will be shortened, unlessenough disk space exists. Recording can be aborted at anytime bypressing the break character (signal SIGQUIT).
- Record a complete audio CD in one go in different files
- -Bcopies each track into a seperate file. A base name can be given. File nameshave an appended track number and an extension corresponding to the audioformat. To record all audio tracks of a CD, use a sufficient high duration(i.e. -d99999).
- Set start sector offset
- -o sectorsincrements start sector of the track bysectors.By this option you are able to skip a certain amount at the beginning ofa track so you can pick exactly the part you want. Each sector runs for 1/75seconds, so you have very fine control. If your offset is so high thatit would not fit into the current track, a warning message is issuedand the offset is ignored. Recording time is not reduced. (To skipintroductory quiet passages automagically, use the-woption see below.)
- Wait for signal option
- -wTurning on this option will suppress all silent output at startup,reducing possibly file size.cdda2wavwill watch for any signal in the output signal and switches on writingto file.
- Find extrem samples
- -FTurning on this option will display the most negative and the most positivesample value found during recording for both channels. This can be usefulfor readjusting the volume. The values shown are not reset at trackboundaries, they cover the complete sampling process. They are taken fromthe original samples and have the same format (i.e. they are independentof the selected output format).
- Find if input samples are in mono
- -GIf this option is given, input samples for both channels will be compared. Atthe end of the program the result is printed. Differences in the channelsindicate stereo, otherwise when both channels are equal it will indicate mono.
- Undo the pre-emphasis in the input samples
- -TSome older audio CDs are recorded with a modified frequency response calledpre-emphasis. This is found mostly in classical recordings. The correctioncan be seen in the flags of the Table Of Contents often. But there arerecordings, that show this setting only in the subchannels. If you know youhave a pre-emphasized recording and want cdda2wav to undo this, you have tospecify this option. A reverse filtering is done before the samples arewritten into the audio file.
- Set audio format
- -O audiotypecan be wav(for wav files) orauorsun(for sun PCM files) orcdrorraw(for headerless files to be used for cd writers).All file samples are coded in linear pulse code modulation (as donein the audio compact disc format). This holds for all audio formats.Wav files are compatible to Wind*ws sound files, they have lsb,msb byte orderas being used on the audio cd. The default filename extension is '.wav'.Sun type files are not like the older common logarithmically coded .au files,but instead as mentioned above linear PCM is used. The byte order is msb,lsbto be compatible. The default filename extension is '.au'.The AIFF and the newer variant AIFC from the Apple/SGI world store their samplesin bigendian format (msb,lsb). In AIFC no compression is used.Finally the easiest 'format',the cdr aka raw format. It is done per default in msb,lsb byte order to satisfythe order wanted by most cd writers. Since there is no header information in thisformat, the sample parameters can only be identified by playing the sampleson a soundcard or similiar. The default filename extension is '.cdr' or '.raw'.
- Select cdrom drive reading speed
- -S speedallows to switch the cdrom drive to a certain level of speed in order toreduce read errors. The actual speedfactor can generally be given completely freely, since there are often lesssettings than factors possible. Details depend very much on the cdrom drives.An argument of 0 for example is often the default speed of the drive,a value of 1 often selects single speed.
- Enable MD5 checksums
- -M countenables calculation of MD-5 checksum for 'count' bytes from the beginning of atrack. This was introduced for quick comparisons of tracks.
- Do linear or overlapping reading of sectors
- -P sectorssets the given number of sectors for initial overlap sampling for jittercorrection. Two cases are to be distinguished. For nonzero values,some sectors are read twice to enable cdda2wav's jitter correction.If an argument of zero is given, no overlap sampling will be used.NEWS!For nonzero overlap sectors cdda2wav dynamically adjusts the setting duringsampling (like cdparanoia does).If no match can be found, cdda2wav retries the read with an increased overlap.If the amount of jitter is lower than the current overlapped samples, cdda2wavreduces the overlap setting, resulting in a higher reading speed.The argument given has to be lower than the total number of sectors per request(see option-nbelow).Cdda2wav will check this setting and issues a error message otherwise.The case of zero sectors is nice on low load situations or errorfree (perfect)cdrom drives and perfect (not scratched) audio cds.
- Set the transfer size
- -n sectorswill set the transfer size to the specified sectors per request.
- Set number of ring buffer elements
- -l bufferswill allocate the specified number of ring buffer elements.
- Set endianess of input samples
- -C endianesswill override the default settings of the input format.Endianess can be set explicitly to "little" or "big" or to the automaticendianess detection based on voting with "guess".
- Set endianess of output samples
- -E endianess(endianess can be "little" or "big") will override the default settings of the output format.
- Verbose option
- -v levelprints more information. A binary mask allows selection of differentinformation.
0keeps quiet
1displays the table of contents
2displays a summary of recording parameters
4invokes the index scanner and displays start positions of indices
8retrieves and displays a media catalog number
16retrieves and displays international standard recording codes
32displays track start positions in absolute sector notation
To combine several requests just add the numbers and give the sum as argument.
- The table of contents
- The display will show the table of contents with number of tracks andtotal time (displayed inmm:ss.hhformat,mm=minutes,ss=seconds,hh=rounded 1/100 seconds).The following list displays track number and track time for each entry.The summary gives a line per track describing the type of the track.track preemphasis copypermitted tracktype chans
Thetrackcolumn holds the track number.preemphasisshows if that track has been given a non linear frequency response.NOTE: You can undo this effect with the-Toption.copy-permittedindicates if this track is allowed to copy.tracktypecan be data or audio. On multimedia CDs (except hidden track CDs) both of them should be present.channelsis defined for audio tracks only. There can be two or four channels.
- No file output
- -Nthis debugging option switches off writing to a file.
- No infofile generation
- -Hthis option switches off creation of an info file and a cddb file.
- Generation of simple output for gui frontends
- -gthis option switches on simple line formatting, which is needed to supportgui frontends (like xcd-roast).
- Verbose SCSI logging
- -Vthis option switches on logging of SCSI commands. This will producea lot of output, which is needed for debugging purposes. The formatis the same as being used with the cdrecord package from Jörg Schilling.I will not describe it here.
- Quiet option
- -qsuppresses all screen output except error messages. Further it avoidsany sub q channel requests for position reports in the recordingdisplay. That reduces cpu time resources and allows feeding a soundcardwith audio data on the fly.
- Just show information option
- -Jdoes not write a file, it only prints information about the disc (dependingon the-voption). This is just for information purposes.
HINTS ON USAGE
Don't create samples you cannot read. First check your sample playersoftware and sound card hardware. I experienced problems with very lowsample rates (stereo <= 1575 Hz, mono <= 3675 Hz) when trying to playthem with standard WAV players for sound blaster (maybe they are notlegal in
WAVformat). Most CD-Writers insist on audio samples in a bigendian format.Now cdda2wav supports the
-E endianessoption to control the endianess of the written samples.
If your hardware is fast enough to run cdda2wavuninterrupted and your CD drive is one of the 'perfect' ones, you willgain speed when switching all overlap sampling off withthe-P 0option. Further fine tuning can be done with the-n sectorsoption. You can specify how much sectors should be requested in one go.
Cdda2wav supportspipesnow. Use a filename of-to let cdda2wav output its samples to standard output.
Conversion to other sound formats can be done using thesoxprogram package (although the use ofsox -xto get byte swaps should be no more necessary; see option-Eto change the output byteorder).
If you really want to sample more than one track in one go intodifferent files, this is currently possible with the-Boption. When recording time exceeds the track limit a new file willbe opened for the next track.
WARNING
IMPORTANT:it is prohibited to sell copies of copyrighted material by noncopyrightholders. This program may not be used to circumvent copyrights.
BUGS
A kernel bug (version < 1.1.20) prevented successful operation of modeselect commands.
Performance may not be optimal on slower systems.
The index scanner may give timeouts.
The resampling (rate conversion code) uses polynomial interpolation, whichis not optimal.
Enhanced CD extra information gathering is incomplete due to lack ofdocumentation. Donations for purchase of a copy of the Blue Book might help.
CD Text extra information gathering is incomplete due to lack of thelatest Red Book additions. Donations for purchase of a copy of the RedBook are welcome.
Cdda2wav should use threads.
The paranoia code is currently disabled.
When using jitter correction with ATAPI cdrom drives, track endingsare not handled correctly.
ACKNOWLEDGEMENTS
Thanks goto Project MODE (
http://www.mode.net/) and Fraunhofer Institut fürintegrierte Schaltungen (FhG-IIS) (
http://www.iis.fhg.de/) for financialsupport.Rammi has helped a lot with the debugging and showed a lot of stamina whenhearing 100 times the first 16 seconds of the first track of the Krupps CD.Paranoia patches contributed by Monty xiphmontAATTmit.edu.
AUTHOR
Heiko Eissfeldt heikoAATTcolossus.escape.de
DATE
25 Mar 1999
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- ENVIRONMENT VARIABLES
- DISCUSSION
- HINTS ON OPTIONS
- HINTS ON USAGE
- WARNING
- BUGS
- ACKNOWLEDGEMENTS
- AUTHOR
- DATE
This document was created byman2html,using the manual pages.