Converting Audio and Ripping CDs
During ripping raw audio is typically recorded into .wav format, which is then converted to ogg, flac or some other desired format. Most applications for ripping do both processes in one go. The choice of appropriate software tools depend on the format of input audio (typically CD or direct audio streams).
CLI applications for converting audio/video or ripping are not tied to particular desktops in general. Related GUI applications may require particular toolkit related libraries or may be tied to specific desktop environments in a stronger way.
Users need to be more careful with the license terms of some of the available CLI tools. In particular, the CDDL is not a genuine free and open source license. For more information see this article.
Fedora does not include cdrtools (under the CDDL license) in its repositories.
SoX is a CLI utility for conversion, editing, normalization, playing and recoding of audio content. SoX can support any audio format through a suitable 'libsox-fmt-base'. For example support for Ogg Vorbis is provided by libsox-fmt-ogg. It supports ALSA, LibAO, OSS and other sound architectures too.
The SoX processing chain takes the form :
Input(s) Balancing Combiner Effects Output
See this in the following examples:
#sox recital.au recital.wav
# sox recital.au -r 12000 -1 -c 1 recital.wav vol 0.7 dither
changes the audio sampling rate, sample size, down-mixes to mono, and applies the vol and dither effects.
#sox -r 8000 -u -1 -c 1 voice-memo.raw voice-memo.wav
adds a header to a raw audio file,
#sox slow.aiff fixed.aiff speed 1.027 rabbit -c0
adjusts audio speed using the most accurate rabbit algorithm,
#sox short.au long.au longer.au
concatenates two audio files
cdparanoia is an audio CD ripper. It reads audio CDs and rips the tracks to WAV files.You can select only certain tracks to rip (with the 'span' option), or rip from a given time to another or pass other options. cdparanoia retrieves audio tracks from CDDA-capable CDROM drives (settings are auto-detected). The data can be saved to a file or directed to STDO in WAV, AIFF, AIFF-C or raw format. cdparanoia adds extra-robust data verification, synchronization, error handling and scratch reconstruction capability.
To rip a whole audio CD into audio files:
Query only with exhaustive search for a drive and full reporting of 'autosense':
Extract from track 1, time 0:3.12 to 0:10.00:
It is the same as
Extract from the beginning of the disc to track 3:
#cdparanoia -- -3
The "--" above is to distinguish "-3" from an option flag. You need to be careful about this!
This is the official ogg encoder from Xiph.org. It is included in the vorbis-tools package. oggenc can encode from FLAC, WAV or raw audio to Ogg Vorbis. Common options like target bitrate, quality, minimum and maximum bitrates and others can be passed. Example:
oggenc -b 256 audio_file.flac.
FLAC (Free Lossless Audio Codec) is a lossless audio format with exceptional compression. The tool flac encodes and decodes FLAC files and can also convert WAV (Waveform Audio Format) to FLAC. flac takes many command line options, including those for compression level, tags, analysis, sampling rate, quality, plots and more.
flac -d audio_file.wav
flac -d --best audio_file.wav (severe compression)
Avidemux is useful for simple WYSIWG video editing involving cutting, filtering and encoding. But can also be used for converting audio with no overhead. The default install in Fedora supports plenty of non-patent encumbered free formats including ffmpeg, ogg-vorbis and xvid. It can be extended with a wide variety of codecs to support other formats. It is easy to perform conversion from one format to another and also edit subtitles.
It is basically a CLI program with optional Qt/GTK interfaces and therefore supports a wide set of command-line options. See the manual (#man avidemux) for details.
Custom scripts can be created for future use through its scripting engine. It is done this way (adapted from the man pages):
1. Start avidemux and open a video/audio file.
2. Configure your own encoding settings.
3. Save the settings as 'project' from the 'File' menu with extension ".js".
4. Quit avidemux.
5. Open the project file in a simple editor and delete useless lines. * You need the first line "//AD" and the line "app = new AvideÃ¢ mux()" * and the encoding settings beginning with "app.video.codec(...)".
6. Save this script file with suffix ".js" in the user directory "~/.avidemux/custom". This custom script can be used again from the menu item "Custom".
Task automation can also be accomplished through job queueing.
The basic idea of volume normalization is to 'normalize' variations in the overall sound level. You can end up with such variations while encoding live audio or by recording from old disks. 'wavnorm' and 'SOX' are useful utilities for the purpose.
One very easy way to rip a CD is direct from the file manager (Konqueror or Dolphin). We describe the procedure with respect to Konqueror.
* Insert the CD * Open a Konqueror window and go to audiocd:/ * Open either the Ogg or Mp3 folder and copy the files as usual.
Tracks can be easily copied to a portable player by this method. You can open an audio CD and player in separate windows and just drag the files across.
Codec, Bitrate, Quality and stereo settings can be found in the Control Center. One disadvantage is that you can not directly specify the encoder (other than mp3/ogg) or the command line arguments.
This neat trick is done using kioslaves.
Many other applications are also available for the purpose. SoundKonvertor for example is a frontend to various command-line audio converters. It is easy to use the GUI. But you will need to set the output directory, formats and desired quality at least. SoundKonvertor can be:
* Controlled with greater ease * Extended with plugins and backends like lame, ffmpeg, oggenc, flac, musepack, mplayer, shorten, oggdec, flake, ape, ttaenc, bonk, faad, aften, OptimFROG, lac, LPAC, wavpack, speex, timidity, vorbisgain, cdda2wav and others.
It is possible to convert between formats like ogg, mp3, m4a, mp2, wma, rm, aiff, avi, flac, flv and others. Tags (read and write), Replay Gain, CD ripping and Calculation are also supported.
An understanding of the differences between lossless and lossy formats, open and patent-encumbered formats and tags will be most helpful for getting the most out of this application.
Always prefer open source multimedia formats like Ogg and flac over other patent-encumbered formats like mp3 and rm.
Sound Juicer is an application in GNOME for rippping audio CDs into audio files on your hard disk. The default file format is Ogg Vorbis. While ripping from a commercially produced CD, Sound Juicer displays the music track names by downloading the information from the CDDB database from the Internet. The Sound Juicer Manual is available within the application under the menu entry Help > Contents.
It is the GNOME front-end to avidemux (see the CLI section above).
OTHER DESKTOP ENVIRONMENTS
Most if not all of the other desktop environments do not provide any level of integration with ripping or sound conversion applications. But any of the above mentioned GUI applications can be freely installed into them with minimal overhead.
jRipper is a Java-based CD ripper and audio converter. It can encode and decode WAV, FLAC, MP3, Ogg, and AAC(M4A) formats. It is also usable as a frontend to cdda2wav, flac, oggenc, oggdec, faac, faad and lame. It can load CD track names from freedb.org or by using the cdda2wav program.
You can run jripper in Fedora without actual installation. Simply put the file jripper.jar in a directory (say /abc), open a konsole in the directory and type
java -jar jripper.jar