The Linux MP3-HOWTO
By Phil Kerr, phil@plus24.com
v1.61, 2001-12-16
This document describes the hardware, software and procedures needed
to encode, play, mix and stream MP3 sound files under Linux.
______________________________________________________________________
Table of Contents
1. Introduction.
2. Copyright of this document.
3. Where to get this document.
3.1 Translations
4. Acknowledgments.
5. Disclaimer.
6. Hardware Requirements & Performance Issues.
7. Software Requirements.
7.1 Rippers & WAV Recorders
7.2 Encoders
7.3 Players
7.4 Streaming Servers
7.5 Mixing
7.6 ID3 Editors
7.7 Stream Grabbers
7.8 Misc
8. Setting up your system.
8.1 Setting up for Analogue Audio Capture
8.2 Setting up for CD-ROM Audio Capture
8.3 Additional Setting up
9. Encoding from Audio.
10. Encoding from CD-ROM.
10.1 Command Line encoding
10.1.1 RipEnc
10.1.2 CD2MP3
10.2 GUI Based Encoders
10.3 Encoder Performance
11. Streaming MP3's.
11.1 Icecast
11.1.1 Shout
11.1.2 LiveIce
11.2 Fluid
11.2.1 Update for RC1
11.3 Litestream
11.4 Apache::MP3 Module
11.5 Firewall Bypassing
11.6 Bandwidth considerations
11.7 Copyright Issues
12. Listening to MP3's.
12.1 Playing from File
12.2 Playing from MP3 Streams
12.3 Capturing MP3 Streams
12.3.1 Streamripper
12.3.2 wget
12.4 Mixing
12.4.1 eMixer
12.4.2 GDAM
13. ID3 Editing.
13.1 id3ed
13.2 mp3info
13.3 ID3 Genre codes
14. MP3 to Minidisc.
14.1 Analog Recording
14.2 Digital Recording
14.3 Playlists
15. Feedback.
______________________________________________________________________
1. Introduction.
This document describes the hardware, software and procedures needed
to encode, play, mix and stream MP3 sound files under Linux.
It covers:
· Encoding MP3's from a live or external source
· Encoding MP3's from audio CD's
· Streaming MP3's over a network
· Listening to MP3's
· Recording MP3 streams
· Mixing MP3's
· Editing ID3 information
2. Copyright of this document.
This HOWTO is copyrighted 1999, 2000 Phil Kerr.
This document is distributed under the terms of the GNU Free
Documentation License. You should have received a copy along with it.
If not, it is available from http://www.fsf.org/licenses/fdl.html.
3. Where to get this document.
The official version of this document can be obtained from the Linux
Documentation Project .
The homepage for the most recent version of this HOWTO is:
3.1. Translations
This HOWTO has been translated into the following languages:
Please note that translations may be slightly out of date from this
document as, naturally enough, the translations take time.
Korean
By Lee,So-min
French
By Arnaud
Gomes-do-Vale
Hungarian
By Andras Timar
Italian
By Mariani
Dario
Spanish
By Arielo
Dutch
By Reggy Ekkebus
Japanese
By Saito Kan
Slovene
By Jernej
Kovacic
Many thanks to the above translators. If you can translate this
HOWTO, please drop the author an email. Also please state the URL
where the translation will be housed.
4. Acknowledgments.
In writing this HOWTO I have had to draw heavily on the Sound-HOWTO By
Jeff Tranter, and the Sound-Playing-HOWTO By Yoo C. Chung.
Thanks also to the other HOWTO authors whose works I have referenced:
Linux System Administrators Guide By Lars Wirzenius.
Linux Network Administrators Guide By Olaf Kirch.
Multi Disk System Tuning HOWTO By Stein Gjoen.
Also a big thank-you to all who have sent in feedback, comments and
bug-reports.
5. Disclaimer.
Use the information in this document at your own risk.
I disavow any potential liability for the contents of this document.
Use of the concepts, examples, and/or other content of this document
is entirely at your own risk.
All copyrights are owned by their owners, unless specifically noted
otherwise.
Use of a term in this document should not be regarded as affecting the
validity of any trademark or service mark.
Naming of particular products or brands should not be seen as
endorsements.
You are strongly recommended to take a backup of your system before
major installation and backups at regular intervals.
6. Hardware Requirements & Performance Issues.
Digital Audio processing is a resource intensive task that relies
heavily on the processing and I/O capabilities of a system. I would
strongly recommend a Pentium class machine as a minimum.
If you are going to be encoding from an analogue audio source via the
line or microphone input, a PCI soundcard will give the best results.
The I/O performance difference between an ISA and PCI based card is
significant, over 132 MBytes/sec for PCI (quote taken from the PCI-
HOWTO). Naturally, the better the quality of the soundcard in terms
of its signal-to-noise ratio, the better the encoded MP3. I've been
using the Soundblaster PCI128 and just switched over to a Soundblaster
Live Value; both cards give good audio performance, but the Live has
significantly better S/N ratios, good enough for semi-pro audio work.
Remember the old data processing maxim:- garbage in - garbage out!
Creative have a Beta driver for the Soundblaster Live! which can be
downloaded from:
When recording analogue audio to a hard disk, more commonly referred
to as direct to disk or d2d recording, the performance of the disk,
and its interface is critical. If you are using an IDE based based
system, mode 4 or UDMA is preferable as the transfer rate is
sufficiently high enough to provide reliable data transfer without
problems.
The ideal solution would be to use a SCSI based system as the drives
and interface have far better throughput capabilities, a sustained
5MB/sec for SCSI 1 through to 40-80MB/sec for ultra-ultra2/wide SCSI.
IDE can peak at anything from 8.3 MB/s to 66 MB/s for Ultra DMA mode 4
but these speeds are peak, average transfer rates will be slower. If
you can find, or afford, an AV SCSI drive, go for it. AV drives have
had the read/write head system optimised for continuous data
transference; other SCSI and IDE drives normally cannot sustain
continuous data transfer as the write head heats up!
Naturally a drive that has cache will give more consistent results
than one that doesn't, as the cache will act as a buffer if the heads
do lift or it cannot handle the throughput.
If your drive isn't up to spec, your recording will suffer from
dropouts and glitches, where the drive failed to record the signal.
If you are recording one-off events, such as live performances invest
in a good SCSI based disk system.
Another cause of d2d dropouts is a heavily loaded system. Background
tasks can cause the system to momentarily glitch. Its recommended to
run as few background services as you can, especially networked based
services. For more information about setting network services, and
startup scripts please refer to the SAG and NAG guides.
Virtual memory paging will also cause glitches, so run with as much
physical RAM as you can, I'd recommend at least 32 Mb, but you may
well need more.
For those wanting to extract the most out of their system, optimising
the kernel probably wouldn't do any harm either.
For streaming MP3's the better the network card the better the
throughput, naturally a 100Mb interface will give better throughput
than a 10Mb interface :)
While the hardware specifications above will give you a decent system
to encode audio data, don't discount using older, lower spec kit if
that's all you have access to.
It'll be a good challenge for a sys-admin to tweak a low-spec system
to give good results, and the end result will probably be a happier
Linux box.
Another important issue is the audio cabling. Cheap, poor quality
cables and connectors will result in poor recording quality. If your
soundcard has the option to use phono, sometimes referred to as RCA
connectors, use them. Gold plated contacts will also help maintain
audio quality, as will keeping audio cables away from data cables as
there will be a chance of interference between them.
But don't forget, spending a fortune on the best audio cabling will be
lost if the rest of the system hasn't been optimised.
For encoding MP3's from CD-ROM, the speed or type of drive will
determine the time taken to read the raw information from it. A
single speed drive will probably be too slow for all but the most
patient.
Your CD-ROM must be connected to your soundcard if you want to hear
what you are recording, either using the internal connector or by
connecting headphone's to the headphone output, although you will not
be able to listen to MP3's through the CD-ROM headphone socket!
For detailed instructions on setting up soundcards, now would be an
excellent time to read the Sound-HOWTO.
7. Software Requirements.
Converting audio to MP3's is normally a 2 stage process, first the
audio is recorded into a WAV format, then the WAV is then converted
into an MP3. Some utilities will do both processes in one go for you.
The format you wish to encode audio from, CD or direct audio, will
determine what software tools you need to produce the WAV file.
If you are wanting to encode from audio input, you will need a program
that will record from your soundcard's input and save the results in a
WAV format. Below are some useful utilities (most of the comments are
taken from the respective website of the app.)
7.1. Rippers & WAV Recorders
To grab from analog audio line-in. Wavrec
Wavrec is distributed as part of wavplay, which can be downloaded
from:-
To convert CD audio data to WAV format, sometimes known as CD ripping:
CDDA2WAV
Cdparanoia
Cdparanoia is a Compact Disc Digital Audio (CDDA) extraction tool,
commonly known on the net as a 'ripper'. The application is built on
top of the Paranoia library, which is doing the real work (the
Paranoia source is included in the cdparanoia source distribution).
Like the original cdda2wav, cdparanoia package reads audio from the
CDROM directly as data, with no analog step between, and writes the
data to a file or pipe in WAV, AIFC or raw 16 bit linear PCM. Compared
to cdda2wav, it's much slower but really gets the best results you can
get even from CDs that are difficult to rip for scratches or other
read-errors.
RipEnc
RipEnc is a bourne shell script frontend to Cdparanoia, cdda2wav,
tosha and Bladeenc, 8hz-mp3, l3enc. It utilizes CDDB lookups to
automate the naming of songs as they are ripped. A manual naming
option is also available. The entire CD can be ripped or you can pick
the songs to rip. ID3 tags are also supported.
Cd2mp3
cd2mp3 is a freeware software, designed to handle 2 other programs
cdda2wav(that rips the tracks from cd) and lame (that encodes the
mp3s)
RipperX
RipperX is a GTK program to rip CD audio and encode mp3s. It has
plugins for cdparanoia, BladeEnc, Lame Mp3 encoder, XingMp3enc, 8hz-
mp3 and the ISO v2 encoder. It also has support for CDDB and ID3 tags.
Grip
Grip is a GTK-based CD-player and CD-ripper/MP3-encoder. It has the
ripping capabilities of cdparanoia built in, but can also use external
rippers (such as cdda2wav). It also provides an automated frontend for
MP3 encoders, letting you take a disc and transform it easily straight
into MP3s. The CDDB protocol is supported for retrieving track
information from disc database servers. Grip works with DigitalDJ to
provide a unified "computerized" version of your music collection.
7.2. Encoders
To convert the WAV file to MP3 format you will need an encoder:
Blade's MP3 Encoder
BladeEnc is a freeware MP3 encoder. It is based on the same ISO
compression routines as mpegEnc, so you can expect roughly the same,
or better, quality . The main difference is the appearance and speed.
BladeEnc doesn't have a nice, user-friendly interface like mpegEnc,
but it is more than three times faster, and it works with several
popular front-end graphical user interfaces.
Lame
In the great history of GNU naming, LAME stands for LAME Ain't an Mp3
Encoder. LAME is not an mp3 encoder. It is a GPL'd patch against the
dist10 ISO demonstration source. LAME is totally incapable of
producing an mp3 stream. It is incapable of even being compiled by
itself. You need the ISO source for this software to work. The ISO
demonstration source is also freely available, but any commercial use
(including distributing free encoders) may require a license agreement
from FhG (Fraunhofer Gesellschaft, Germany).
Gogo
This is a very fast MP3 encoder for x86-CPU, which is based on LAME
ver 3.29beta and optimized by PEN@MarineCat, Keiichi SAKAI, URURI, kei
and shigeo. (You will also need to download NASM to compile the
source, which can be found )
7.3. Players
To play the MP3's you will naturally need a player:
Xmms (Formerly known as X11Amp)
This player has most of the features as Winamp from Windows 95/98/NT
but it will of course feature some specials only available for the
Linux version.
Xaudio
Xaudio is a very fast and very robust multi platform solution for
Digital Audio playback, especially targeted at MPEG Audio (MP1, MP2
and MP3) decoding.
AlsaPlayer
AlsaPlayer is a new type of PCM player. It is heavily multi-threaded
and tries to exercise the ALSA library and driver quite a bit. It has
some very interesting features unique to Linux/Unix players. The goal
is to create a fully pluggable framework for playback of all sorts of
media with the focus on PCM audio data. Full speed (pitch) control,
positive *and* negative! First Linux- and only GPL player that does
this!! MP3's and CD's do varispeed :)
mpg123
What is mpg123? It is a fast, free and portable MPEG audio player for
Unix. It supports MPEG 1.0/2.0 layers 1, 2 and 3 (those famous "mp3"
files), and it has been tested on a wide variety of platforms,
including Linux, FreeBSD, NetBSD, SunOS, Solaris, IRIX, HP-UX and
others. For full CD quality playback (44 kHz, 16 bit, stereo) a
Pentium (or fast 486), SPARCstation10, DEC Alpha or similar CPU is
required. Mono and/or reduced quality playback (22 kHz or 11 kHz) is
even possible on slower 486 CPUs.
Freeamp
FreeAmp is an extensible, cross-platform audio player. It features an
optimized version of the GPLed Xing MPEG decoder which makes it one of
the fastest and best sounding players available. FreeAmp provides a
number of the most common features users have come to expect in a
clean, easy to use interface.
7.4. Streaming Servers
Streaming servers allow you to 'broadcast' MP3's across a network,
whether this is your intranet or the internet itself.
Icecast
Welcome! Icecast is a Mpeg Layer III Audio broadcasting system brought
to you by the linuxpower.org team. Icecast comes bundled with
iceplay, and icedir. Iceplay is a playlist streamer that will allow
you to send pre-encoded files to your Icecast server.
Fluid
Fluid Streaming Server is a program for streaming media over networks
and in its current form using the mp3 format.
(old site)
(new site)
Litestream
Litestream is an Open Source, infinitely scalable high-capacity MP3
streaming system for Unix.
Apache::MP3
Module for streaming MP3's using the Apache WebServer.
This module takes a hierarchy of directories containing MP3 files and
presents it as a browsable song library for streaming over the web.
[Available from CPAN]
7.5. Mixing
LiveIce
LiveIce is the source client for Icecast which encodes an mpeg stream
for broadcast as it is created. Unlike clients such as Shout and IceDJ
this permits the broadcast of live audio, rather than prerecorded
mp3's.
LiveIce is bundled with Icecast, newer versions together with
documentation may be found at the website below:
eMixer
eMixer is an easy-to-use front-end to mpg123 that allows you to play
and mix two mp3 streams together. The ability to mix two mp3s makes
eMixer act like a cross-fader, effectively giving the user DJ-like
capabilities from the computer console. eMixer is also very able in a
"real time" party environment. eMixer is based on the original mp3
mixing code upon which liveice's mixing component is built.
GDAM
GDAM is real-time digital dj mixing software package. Any number of
mp3 files can be played and mixed simultaneously. Effects can be
added, changed, and rearranged dynamically. GDAM features a client-
server architecture; all sound is produced by a server, which receives
instructions from any number of clients. Other features include
plugins for audio effects and interface components, caching and
looping, sequencing, assisted beatmatching, a waveform viewer/beat
calculator, contiguous queuing (no pauses between songs when using a
playlist), an online help system, an mpg123 clone which runs on a gdam
server, flexible command line interface for direct control of server,
recording of entire mix or any point in stream to buffer/disk/mp3
encoder, support for multiple sound devices, and support for midi
hardware control.
alternative:
7.6. ID3 Editors
id3ed
id3ed is an ID3 tag editor for mp3 files. You can set tags
interactively or from the command line, or a combination of both.
id3ed can set genre by name or number. You can also remove or view
tags.
mp3info
MP3info is a small utility for reading and writing MPEG Layer 3 (MP3)
ID3 tags. Console (command-line and interactive ncurses) and GTK
versions are included.
7.7. Stream Grabbers
Streamripper
Streamripper records shoutcast streams. If the stream contains track
info (meta data), streamripper creates a separate file for each track.
Wget
GNU Wget is a freely available network utility to retrieve files from
the World Wide Web using HTTP and FTP, the two most widely used
Internet protocols. It works non-interactively, thus enabling work in
the background, after having logged off.
Wget is far more than a stream grabber!
7.8. Misc
Volume Normalization
Wavnorm
If you have encoded live audio, or have encoded from older cd's you
may find variations in the overall sound level.
To change the encoded volume levels of the MP3's you will need to
normalise them using wavnorm.
SOX
Sox is a very handy sound conversion utility which I'd recommend
having, and you will need it if you wish to use wavnorm.
You may also need a mixer program; Xmixer works well and is included
with most distributions.
8. Setting up your system.
This section will describe the basics of setting up your Linux system
to record audio from either an analogue or CD-ROM source.
I'm basing this section around my Intel based Linux system which is
running Redhat, but should be reasonably distribution neutral. If you
have any success in using this HOWTO on other hardware, please get in
touch.
Naturally a reasonable prerequisite is a working soundcard. At this
point in the HOWTO, I invite you to read the excellent Linux Sound
HOWTO, by Jeff Tranter. After which a good read of the Linux Sound
Playing HOWTO, by Yoo C. Chung. Both of the above mentioned HOWTO's
cover the details of getting a sound system working under Linux far
better than I could.
8.1. Setting up for Analogue Audio Capture
Firstly, set up your audio. There are a multitude of ways to route
audio before it gets to your Linux box, some common ones are:
Line out to Soundcard Line in. Most audio devices have a Line output
sockets. Line level is a standard that specifies what voltage the
audio device will send out. If I remember correctly it is 500mV for
domestic and Semi Pro devices, and 750mV for Pro audio devices. I
would guess that the standard set for most soundcards will be 500mV,
but some of the newer Pro audio may be to the higher standard It
shouldn't make too much difference unless you are recording at very
high levels.
The Line level output is normally used to connect HI-FI equipment to
an amplifier, so things such as Tape Decks, Radio Tuners, CD players,
DAT machines and Mini-Disc players should connect without problem.
Turntables can be more of a problem, see below for more information.
You could capture audio from VCR's as well. Most VCR's will either
have Line out for sound, or you can Get a Line out from a SCART socket
if your VCR has one.
Amplifier Tape out to Soundcard Line in, Soundcard Line out to
Amplifier Tape in. This configuration is essentially replacing a
traditional tape recorder connected to your HI-FI amplifier with your
Linux system. The Soundcard Line out to Tape in allows monitoring of
the recording levels.
Mike to Soundcard Mike in. The voltages generated by microphones is
very much smaller than those used in Line level devices. If you were
to plug a Microphone into the Soundcard Line in, chances are you would
never record anything.
WARNING, doing the reverse, plugging a Line level device into the
Soundcards Microphone input, can damage your soundcard!!
Turntable to Mike in.
Many thanks to Mark Tranchant for the following.
The raw output from a record deck cartridge is very low level.
However, you cannot plug it directly into a microphone input and
expect good results. The output requires equalization, as records are
mastered with less bass and more treble to optimize the physics of the
moving needle. This equalization is carefully defined and referred to
as RIAA equalization. You *need* to run the output through a phono
preamp first, and then into a line input.
Music keyboards & synths should be connected to the Soundcards Line
in, with guitars connecting to Line in via a DI (Direct Injection,
used to convert the signal to Line level) box.
Before you plug in anything into your soundcard, make sure the volume
levels are turned down to minimum, or if using microphones they are
either turned off or away from speakers.
8.2. Setting up for CD-ROM Audio Capture
Setting up your Linux system to extract audio data from CD-ROM is
reasonably straight forward.
If you can hear a track playing from your CD-ROM through your speakers
or amplifier, connected to your soundcard, then there's a reasonable
chance you should be able to record from it.
8.3. Additional Setting up
Log in as per normal to your system, then using a mixer program set
the recording levels that are loud enough to give you a decent
recording level, but aren't too loud and distorting. I normally just
judge this by ear, after a while you'll get to know what levels are
best for your kit.
I recommend either turning off all unnecessary services or switching
to the single user runlevel, especially when encoding from an audio
source. This is to ensure that the bare minimum of services are
running and thus minimising system glitches when recording.
I've set up a separate SCSI drive, exclusively to record the audio to,
which I'll refer to as /mp3. I've done this mainly for the
performance gains in using a SCSI drive. Also, recording onto a
dedicated drive, where you are almost certain the head isn't going to
suddenly skip to another part of the drive as you are writing audio
data to it, is a good thing :)
For details on setting up a Linux system with multiple disk drives, a
good read of the Multi-Disk-HOWTO, by Stein Gjoen may be useful.
9. Encoding from Audio.
Firstly, make sure you have enough space on your drive. At CD
quality, 44.1 Khz 16 Bit stereo, 1 minute takes nearly 10 Mb (5 MB per
channel).
I normally record at DAT quality, which is 48 Khz 16 Bit stereo.
Using wavrec I use the following syntax:
______________________________________________________________________
[dj@megajukebox]$ /usr/local/bin/wavrec -t 60 -s 48000 -S /mp3/temp.wav
______________________________________________________________________
The first part is an explicit path to wavrec. The '-t 60' specifies
the length of time to record for, in seconds.
The third option, -s 48000 refers to the sample rate in samples/sec.
(48000 is the rate for DAT, 44100 is CD)
The last option is the path to the output file.
To see the full set of options, run waverec -help, or see it's man
page.
This will produce your WAV file Next you will need to encode it into
MP3 format.
Use bladdenc with the following command line.
______________________________________________________________________
[dj@megajukebox]$ /usr/local/bin/bladeenc $ARGV[0];
exit;
}
else {
print "Usage cdriper [no of tracks] [destination directory]\n\n";
}
______________________________________________________________________
Please note: The above script is very basic and has nothing fancy,
like error checking or CDDB. Improve at your leisure :)
The main lines of interest are:
______________________________________________________________________
$cdcap = system("cdparanoia", $count, "/mp3/cdda.wav");
______________________________________________________________________
This line calls the CD ripper, cdparanoia. Cdparanoia converts raw CD
audio data to WAV format.
I'm using Cdparanoia, but if you wish to use CDDA2WAV, the command
line would be:
______________________________________________________________________
$cdcap = system("cdda2wav", $count, "/mp3/cdda.wav");
______________________________________________________________________
The salient options are $count, which is the number of tracks to rip,
and then the path for the outputted WAV file. In my example this will
go to a tmp directory on my MP3 SCSI drive.
The WAV file is then converted into a MP3 file using Bladeenc.
I've written this Perl script in order to rip a CD without having to
rip and encode each track, and without having to use the batch mode of
Cdparanoia. This cuts down on free disk space needed as Cdparanoia's
batch mode will rip the whole disk, and take up anything upto 600 Meg.
If you wanted to use Lame or Gogo, replace the encoder line with:
______________________________________________________________________
$enc = system("lame /mp3/cdda.wav $track -b 256");
______________________________________________________________________
or
______________________________________________________________________
$enc = system("gogo /mp3/cdda.wav $track -b 256");
______________________________________________________________________
Here is a dump of the available option for each of the encoders.
Bladeenc
______________________________________________________________________
BladeEnc 0.91 (c) Tord Jansson Homepage: http://bladeenc.mp3.no
===============================================================================
BladeEnc is free software, distributed under the Lesser General Public License.
See the file COPYING, BladeEnc's homepage or www.fsf.org for more details.
Usage: bladeenc [global switches] input1 [output1 [switches]] input2 ...
General switches:
-[kbit], -br [kbit] Set MP3 bitrate. Default is 128 (64 for mono output).
-crc Include checksum data in MP3 file.
-delete, -del Delete sample after successful encoding.
-private, -p Set the private-flag in the output file.
-copyright, -c Set the copyright-flag in the output file.
-copy Clears the original-flag in the output file.
-mono, -dm Produce mono MP3 files by combining stereo channels.
-leftmono, -lm Produce mono MP3 files from left stereo channel only.
-rightmono, -rm Produce mono MP3 files from right stereo channel only.
-swap Swap left and right stereo channels.
-rawfreq=[freq] Specify frequency for RAW samples. Default is 44100.
-rawbits=[bits] Specify bits per channel for RAW samples. Default is 16.
-rawmono Specifies that RAW samples are in mono, not stereo.
-rawstereo Specifies that RAW samples are in stereo (default).
-rawsigned Specifies that RAW samples are signed (default).
-rawunsigned Specifies that RAW samples are unsigned.
-rawbyteorder=[order]Specifies byteorder for RAW samples, LITTLE or BIG.
-rawchannels=[1/2] Specifies number of channels for RAW samples. Does
the same as -rawmono and -rawstereo respectively.
Global only switches:
-quit, -q Quit without waiting for keypress when finished.
-outdir=[dir] Save MP3 files in specified directory.
-quiet Disable screen output.
-nocfg Don't take settings from the config-file.
-prio=[prio] Sets the task priority for BladeEnc. Valid settings are
HIGHEST, HIGHER, NORMAL, LOWER, LOWEST(default) and IDLE
-refresh=[rate] Refresh rate for progress indicator. 1=fastest, 2=def.
-progress=[0-8] Which progress indicator to use. 0=Off, 1=Default.
Input/output files can be replaced with STDIN and STDOUT respectively.
______________________________________________________________________
Lame
______________________________________________________________________
LAME version 3.50 (www.sulaco.org/mp3)
GPSYCHO: GPL psycho-acoustic model version 0.74.
USAGE : lame [options] [outfile]
and/or can be "-", which means stdin/stdout.
OPTIONS :
-m mode (s)tereo, (j)oint, (f)orce or (m)ono (default j)
force = force ms_stereo on all frames. Faster and
uses special Mid & Side masking thresholds
-b set the bitrate, default 128kbps
(for VBR, this sets the allowed minimum bitrate)
-s sfreq sampling frequency of input file(kHz) - default 44.1
--resample sfreq sampling frequency of output file(kHz)- default=input sfreq
--mp3input input file is a MP3 file
--voice experimental voice mode
-v use variable bitrate (VBR)
-V n quality setting for VBR. default n=4
0=high quality,bigger files. 9=smaller files
-t disable Xing VBR informational tag
--nohist disable VBR histogram display
-h use (maybe) quality improvements
-f fast mode (low quality)
-k disable sfb=21 cutoff
-d allow channels to have different blocktypes
--athonly only use the ATH for masking
-r input is raw pcm
-x force byte-swapping of input
-a downmix from stereo to mono file for mono encoding
-e emp de-emphasis n/5/c (obsolete)
-p error protection. adds 16bit checksum to every frame
(the checksum is computed correctly)
-c mark as copyright
-o mark as non-original
-S don't print progress report, VBR histograms
Specifying any of the following options will add an ID3 tag
--tt title of song (max 30 chars)
--ta artist who did the song (max 30 chars)
--tl album where it came from (max 30 chars)
--ty year in which the song/album was made (max 4 chars)
--tc additional info (max 30 chars)
MPEG1 samplerates(kHz): 32 44.1 48
bitrates(kbs): 32 48 56 64 80 96 112 128 160 192 224 256 320
MPEG2 samplerates(kHz): 16 22.05 24
bitrates(kbs): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
______________________________________________________________________
Gogo
______________________________________________________________________
GOGO-no-coda ver. 2.24 (Feb 12 2000)
Copyright (C) 1999 PEN@MarineCat and shigeo
Special thanks to Keiichi SAKAI, URURI, Noisyu and Kei
This is based on LAME3.29beta and distributed under the LGPL
usage
gogo inputPCM [outputPCM] [options]
inputPCM is input wav file
if input.wav is `stdin' then stdin-mode
outputPCM is output mp3 file (omissible)
options
-b kbps bitrate [kpbs]
-br bps bitrate [ bps]
-silent dont' print progress report
-off {3dn,mmx,kni(sse),e3dn}
-v {0,..,9} VBR [0:high quality 9:high compression]
You should combine this with -b option
for only RAW-PCM input
-offset bytes skip header size
-8bit 8bit-PCM [dflt 16bit-PCM]
-mono mono-PCM [dflt stereo-PCM]
-bswap low, high byte swapping for 16bitPCM
-s kHz freq of PCM [dflt 44.1kHz]
-nopsy disable psycho-acoustics
-m {s,m,j} output format s:stereo, m:mono, j:j-stereo
-d kHz change sampling-rate of output MP3
-emh {n,c,5} de-emphasis
-lpf {on,off} 16kHz filter [dflt use if <= 128kbps; not use if >= 160kbps]
-test benchmark mode
-delete delete input file, after encoding
______________________________________________________________________
10.1.1. RipEnc
RipEnc performs the same task as the code above, but is written in
shell and is easier to use :)
Here's what it looks like.
______________________________________________________________________
RipEnc version 0.7, Copyright (C) 1999 Michael J. Parmeley
, RipEnc comes with ABSOLUTELY NO WARRANTY
There is currently NO encoding process running in the background
Your encode.log file is 982607 bytes long.
1) Change working directory....................[/megajukebox/tmp]
2) Choose encoder..............................[lame]
3) Choose ripper...............................[cdparanoia]
4) Choose id3 tool.............................[none]
5) Toggle between Manual and CDDB naming.......[manual]
6) Setup XMCD_LIBDIR variable for CDA..........[/var/X11R6/lib/xmcd]
7) Set preferred naming convention.............[artist-name_of_song.mp3]
8) Rip whole CD?...............................[no]
9) Set small hard drive option?................[no]
10) Please select your Cd-Rom device...........[/dev/cdrom]
11) Set the Bitrate for the encoded MP3's......[256]
12) List the files in your working directory
13) Start
14) About
15) Exit
?
______________________________________________________________________
10.1.2. CD2MP3
Cd2mp3 is a single pass cdda to MP3 encoder. It will convert a audio
track to MP3 without producing an intermediate wav file.
Here's how it looks in operation:
______________________________________________________________________
[dj@megajukebox]$ cd2mp3 options ALL
Using language: 1 - English.
Translator: Gustavo Sverzut Barbieri(k-s)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Cd2Mp3 1.0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Author: Gustavo Sverzut Barbieri (k-s)
*** device: -D/dev/cdrom type: -Icooked_ioctl
*** audio device: /dev/dsp
*** preset: tape
*** copyright: Yes
*** author:
*** album:
recording: '1' as 'track-1.mp3' (wait)
Ok! (recorded)
recording: '2' as 'track-2.mp3' (wait)
______________________________________________________________________
Naturally you can feed it options from the command-line, here is a
list:
______________________________________________________________________
dj@megajukebox]$ cd2mp3 --help
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Cd2Mp3 1.0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Author: Gustavo Sverzut Barbieri (k-s)
Usage:
cd2mp3 options ="