old-www/HOWTO/html_single/MP3-CD-Burning/index.html

1533 lines
27 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Linux MP3 CD Burning mini-HOWTO</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><META
NAME="KEYWORD"
CONTENT=" MP3
"><META
NAME="KEYWORD"
CONTENT=" CD
"><META
NAME="KEYWORD"
CONTENT=" audio
"><META
NAME="KEYWORD"
CONTENT=" recording
"><META
NAME="KEYWORD"
CONTENT=" burning
"><META
NAME="KEYWORD"
CONTENT=" WAV
"><META
NAME="KEYWORD"
CONTENT=" music
"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="AEN2"
></A
>Linux MP3 CD Burning mini-HOWTO</H1
><H3
CLASS="AUTHOR"
><A
NAME="AEN5"
>Greg Wierzchowski</A
></H3
><DIV
CLASS="AFFILIATION"
><DIV
CLASS="ADDRESS"
><P
CLASS="ADDRESS"
><TT
CLASS="EMAIL"
>&#60;<A
HREF="mailto:greg@draxen.org"
>greg@draxen.org</A
>&#62;</TT
></P
></DIV
></DIV
><P
CLASS="PUBDATE"
>2001-05-29<BR></P
><DIV
CLASS="REVHISTORY"
><TABLE
WIDTH="100%"
BORDER="0"
><TR
><TH
ALIGN="LEFT"
VALIGN="TOP"
COLSPAN="3"
><B
>Revision History</B
></TH
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.11</TD
><TD
ALIGN="LEFT"
>2004-08-21</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Fixed a typo.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.10</TD
><TD
ALIGN="LEFT"
>2004-07-14</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Fixed revision numbering to be in sync with CVS.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.9</TD
><TD
ALIGN="LEFT"
>2004-07-14</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Small updates, added new sub-section.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.8</TD
><TD
ALIGN="LEFT"
>2003-09-12</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Cleanup, update, fixes and minor layout change.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.7</TD
><TD
ALIGN="LEFT"
>2002-04-26</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Divided into two sections: existing material to section "audio", new section "data" on data
CDs. Misc. additions.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.5</TD
><TD
ALIGN="LEFT"
>2001-11-19</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Fixed omission in Disc-At-Once burning section.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.4</TD
><TD
ALIGN="LEFT"
>2001-11-17</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Added Disc-At-Once burning section.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.3</TD
><TD
ALIGN="LEFT"
>2001-09-02</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Added another example of decoding MP3 files with lame.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.2</TD
><TD
ALIGN="LEFT"
>2001-07-12</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Minor layout changes; Added Translations subsection into Credits.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.1</TD
><TD
ALIGN="LEFT"
>2001-06-12</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Minor cleanup; Regexp fix for MP3 to WAV name conversion example.</TD
></TR
><TR
><TD
ALIGN="LEFT"
>Revision 1.0</TD
><TD
ALIGN="LEFT"
>2001-05-29</TD
><TD
ALIGN="LEFT"
>Revised by: GW</TD
></TR
><TR
><TD
ALIGN="LEFT"
COLSPAN="3"
>Initial Release.</TD
></TR
></TABLE
></DIV
><DIV
><DIV
CLASS="ABSTRACT"
><A
NAME="AEN11"
></A
><P
></P
><P
>A complete recipe for creating audio and data CDs from MP3 files.</P
><P
></P
></DIV
></DIV
><HR></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>1. <A
HREF="#INTRO"
>Introduction</A
></DT
><DD
><DL
><DT
>1.1. <A
HREF="#COPYRIGHT"
>Copyright and License</A
></DT
></DL
></DD
><DT
>2. <A
HREF="#AUDIO"
>Audio CDs</A
></DT
><DD
><DL
><DT
>2.1. <A
HREF="#PREPARE"
>Preparing the Tracks</A
></DT
><DT
>2.2. <A
HREF="#NORMALISATION"
>Normalisation</A
></DT
></DL
></DD
><DT
>3. <A
HREF="#BURNING"
>Burning Your CD</A
></DT
><DT
>4. <A
HREF="#DAO-BURNING"
>Burning a DAO CD</A
></DT
><DT
>5. <A
HREF="#SOFTWARE"
>Software</A
></DT
><DT
>6. <A
HREF="#DATA"
>Data CDs</A
></DT
><DT
>7. <A
HREF="#RESOURCES"
>CD Burning Resources</A
></DT
><DT
>8. <A
HREF="#CREDITS"
>Credits</A
></DT
><DD
><DL
><DT
>8.1. <A
HREF="#TRANSLATIONS"
>Translations</A
></DT
><DT
>8.2. <A
HREF="#OTHERCREDITS"
>Other Credits</A
></DT
></DL
></DD
></DL
></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="INTRO"
></A
>1. Introduction</H1
><P
>This mini-HOWTO was created because of my experience with burning music CDs
and lack of some specific information about sound normalization on the
Internet. I usually burn music CDs as a mix - different songs from different
sources.Very often volume level between songs varies greatly. This is the
first obstacle. Second, many of the files on the Internet are not
CD-compatible (16 bit, stereo, 44.1 kHz) and have to be converted. There are
many programs to burn music CDs from MP3 files, and many of them do the
conversion transparently. But I haven't seen a single tool that also
normalizes the volume, so that's why I worked out my own CD-burning recipe.</P
><P
>If you you just want to make a CD filled with music, and not be bothered with all of the details, I have good news for you: Kees Cook (<TT
CLASS="EMAIL"
>&#60;<A
HREF="mailto:kees@outflux.net"
>kees@outflux.net</A
>&#62;</TT
>) put together a tool based on this HOWTO, which automates all of the tasks outlined here. His program can be obtained from <A
HREF="http://outflux.net/unix/software/mp3cd/"
TARGET="_top"
>http://outflux.net/unix/software/mp3cd/</A
>. Thanks, Kees!</P
><P
>This HOWTO is just about one thing - putting MP3 music on a CD, so that you can
listen to it. For in-depth information about MP3 files, please look at <EM
>The Linux MP3
HOWTO</EM
> by Phil Kerr, located at <A
HREF="http://www.tldp.org/HOWTO/MP3-HOWTO.html"
TARGET="_top"
>http://www.tldp.org/HOWTO/MP3-HOWTO.html</A
>.
For information about CD creation in general as well as CD burners, refer to
<EM
>CD-Writing-HOWTO</EM
> by Winfried Trümper, available at <A
HREF="http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html"
TARGET="_top"
>http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html</A
>.
Also, look at the <EM
>CD Burning Resources</EM
> section for more information.</P
><P
>I'm assuming you wish to burn a CD with the collection of songs you obtained
from different sources, all varying quality, but you want to get the
best-sounding CD possible. This mini-HOWTO outlines the steps that may
help you.</P
><DIV
CLASS="SECTION"
><HR><H2
CLASS="SECTION"
><A
NAME="COPYRIGHT"
></A
>1.1. Copyright and License</H2
><P
>This document is copyright 2001 by Greg Wierzchowski and is released under
the terms of the GNU Free Documentation License, which is hereby incorporated
by reference. Send feedback to
<A
HREF="mailto:greg@draxen.org"
TARGET="_top"
><I
CLASS="CITETITLE"
>greg@draxen.org</I
></A
>.
</P
></DIV
></DIV
><DIV
CLASS="SECTION"
><HR><H1
CLASS="SECTION"
><A
NAME="AUDIO"
></A
>2. Audio CDs</H1
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="PREPARE"
></A
>2.1. Preparing the Tracks</H2
><P
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Note</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>All commands assume bash shell</P
></TD
></TR
></TABLE
></DIV
></P
><DIV
CLASS="SECTION"
><HR><H3
CLASS="SECTION"
><A
NAME="CLEANUP"
></A
>2.1.1. Filename Cleanup</H3
><P
></P
><OL
TYPE="1"
><LI
><P
>Collect all MP3 files in one directory. </P
></LI
><LI
><P
>If any filenames contain spaces, first convert them to underscores: </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`; done </PRE
></FONT
></TD
></TR
></TABLE
><P
>This first step is important because, even if unix itself allows spaces in filenames,
most programs get confused by them.</P
></LI
><LI
><P
>If your MP3 files came from DOS/Windows, they may have
uppercase extensions. You can convert whole names to lowercase or just
extensions. For everything lowercase do:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.[Mm][Pp]3; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done </PRE
></FONT
></TD
></TR
></TABLE
><P
>to convert just extensions:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.MP3; do mv "$i" "`basename "$i" .MP3`.mp3"; done
</PRE
></FONT
></TD
></TR
></TABLE
></LI
></OL
></DIV
><DIV
CLASS="SECTION"
><HR><H3
CLASS="SECTION"
><A
NAME="CONVERTING"
></A
>2.1.2. Conversion</H3
><P
>The CD Audio specification requires wave files that are 16 bit, stereo, 44.1 kHz. MP3 files often have different parameters, but we need to convert them to WAV first, anyway.</P
><P
>We have several choices for the conversion process.</P
><DIV
CLASS="SECTION"
><HR><H4
CLASS="SECTION"
><A
NAME="MPG321"
></A
>2.1.2.1. mpg123 and mpg321</H4
><P
>Originally, there was only <B
CLASS="COMMAND"
>mpg123</B
>. However, it uses a proprietary licensing, and now there's an open source replacement - <B
CLASS="COMMAND"
>mpg321</B
>. Both commands use the same syntax: </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.mp3; do mpg321 -w `basename $i .mp3`.wav $i; done </PRE
></FONT
></TD
></TR
></TABLE
><P
>When decoding 22khz MP3 files the output of <B
CLASS="COMMAND"
>mpg123</B
> may be distorted. I don't know how well <B
CLASS="COMMAND"
>mpg321</B
> deals with this problem. If you're converting with <B
CLASS="COMMAND"
>mpg123</B
>, use:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.mp3; do mpg123 --rate 44100 --stereo --buffer 3072 --resync -w `basename $i .mp3`.wav $i; done
</PRE
></FONT
></TD
></TR
></TABLE
><P
><I
CLASS="CITETITLE"
>Mpg123</I
> can be obtained from <A
HREF="http://www.mpg123.de/"
TARGET="_top"
>http://www.mpg123.de/</A
>.</P
><P
><I
CLASS="CITETITLE"
>Mpg321</I
> is available from <A
HREF="http://mpg321.sourceforge.net/"
TARGET="_top"
>http://mpg321.sourceforge.net/</A
>.</P
><P
><EM
>NOTE</EM
> I noticed that with some MP3 files mpg123 output was distorted.
At first I thought that MP3's were bad, but then I checked with another
player and they sounded OK. So <B
CLASS="COMMAND"
>mpg123</B
> is not my converter of choice.</P
></DIV
><DIV
CLASS="SECTION"
><HR><H4
CLASS="SECTION"
><A
NAME="MADPLAY"
></A
>2.1.2.2. MAD</H4
><P
>Another MP3 player/decoder, and the one I prefer, is <B
CLASS="COMMAND"
>madplay</B
>. It's available from <A
HREF="http://www.mars.org/home/rob/proj/mpeg/"
TARGET="_top"
>http://www.mars.org/home/rob/proj/mpeg/</A
>.
With <I
CLASS="CITETITLE"
>madplayer</I
>, the command line is: </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.mp3; do madplay -o `basename $i .mp3`.wav $i; done </PRE
></FONT
></TD
></TR
></TABLE
><P
> Unfortunately, <B
CLASS="COMMAND"
>madplay</B
> also had problems with some of MP3 files I had. I don't think there's a problem with the decoder, but rather with it handling broken MP3 files.</P
></DIV
><DIV
CLASS="SECTION"
><HR><H4
CLASS="SECTION"
><A
NAME="LAME"
></A
>2.1.2.3. Lame</H4
><P
>The <B
CLASS="COMMAND"
>lame</B
> encoder, which has a decoding mode, seems
to handle difficult cases very well (<B
CLASS="COMMAND"
>lame</B
> can be found at <A
HREF="http://www.mp3dev.org/mp3/"
TARGET="_top"
>http://www.mp3dev.org/mp3/</A
>) :
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.mp3; do lame --decode $i `basename $i .mp3`.wav; done
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECTION"
><HR><H4
CLASS="SECTION"
><A
NAME="OGG"
></A
>2.1.2.4. OGG files</H4
><P
>Well, this HOWTO is about MP3 files, but OGG standard is an alternative which many people prefer over MP3 because of the licensing. To deal wit OGG files, you need to use:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.ogg ; do ogg123 -d wav -f `basename $i .ogg`.wav $i; done
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECTION"
><HR><H4
CLASS="SECTION"
><A
NAME="MPLAYER"
></A
>2.1.2.5. Converting other formats</H4
><P
>Nico Genimakis sent me an email about using <FONT
COLOR="RED"
>mplayer</FONT
> to covert audio in many different formats to WAV with automatic resampling to 44100Hz. Mplayer is known to be able to read almost anything, and it can convert your .ogg, .mp3, .flac, .wma etc.</P
><P
>usage (in this example converting WMA files):</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm -waveheader $i; done
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECTION"
><HR><H3
CLASS="SECTION"
><A
NAME="NOTES"
></A
>2.1.3. Conversion Notes</H3
><P
> <EM
>NOTE:</EM
> The <B
CLASS="COMMAND"
>`basename $i .mp3`.wav</B
> command
replaces MP3 extensions with WAV. There are 101 ways to do that, here's
the alternative: <B
CLASS="COMMAND"
>`echo "$1" | sed 's/\.mp3$/.wav/'`</B
>
</P
><P
>After the conversion, run "<B
CLASS="COMMAND"
>file *.wav</B
>" and check the
output for any files that differ from 16 bit, stereo 44100 Hz.</P
><P
>If there are files with different characteristics, convert them to the
above specs. For example, to convert file track01.wav to obtain sample
rate 44.1 kHz, you could use: </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> sox track01.wav -r 44100 track01-new.wav resample
</PRE
></FONT
></TD
></TR
></TABLE
><P
>or, if the above introduces static when converting mono files:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> sox track01.wav -r 44100 -c 2 track01-new.wav
</PRE
></FONT
></TD
></TR
></TABLE
><P
><I
CLASS="CITETITLE"
>Sox</I
> is so popular, that it's probably installed
by default with any Linux distribution, and can be obtained from
<A
HREF="http://www.spies.com/Sox/"
TARGET="_top"
>http://www.spies.com/Sox/</A
>.
However, the command-line options are somewhat cryptic for the casual
user (me). Look at
<A
HREF="http://www.spies.com/Sox/sox.tips.html"
TARGET="_top"
>http://www.spies.com/Sox/sox.tips.html</A
>
for some tips on usage.
</P
></DIV
></DIV
><DIV
CLASS="SECTION"
><HR><H2
CLASS="SECTION"
><A
NAME="NORMALISATION"
></A
>2.2. Normalisation</H2
><P
>Normalisation is a process during which all the sound files are brought to the same relative loudness level. I use a program by Chris Vaill (<TT
CLASS="EMAIL"
>&#60;<A
HREF="mailto:cvaill@cs.columbia.edu"
>cvaill@cs.columbia.edu</A
>&#62;</TT
>), called
<B
CLASS="COMMAND"
>normalize</B
> - it can be obtained from
<A
HREF="http://www.cs.columbia.edu/~cvaill/normalize/"
TARGET="_top"
>http://www.cs.columbia.edu/~cvaill/normalize/</A
>
</P
><P
> I use the following syntax (-m is for mix mode, where all files should be as loud as possible):</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> normalize -m *.wav</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECTION"
><HR><H1
CLASS="SECTION"
><A
NAME="BURNING"
></A
>3. Burning Your CD</H1
><P
>There are many programs to create CDs from WAV files. I use <B
CLASS="COMMAND"
>cdrecord</B
> for
command-line burning and <B
CLASS="COMMAND"
>XCDROAST</B
> for gui. For <B
CLASS="COMMAND"
>cdrecord</B
>,
you have to know
what SCSI device your CD-writer is. If you're using ATAPI writer, with older kernel, use SCSI
emulation (kernel module ide-scsi). As of kernel 2.6, you can use ATAPI directly, without SCSI emulation, by prepending <EM
>ATAPI:</EM
> to the device specification. Let's assume, that your ATAPI cdwriter
is on the second IDE bus as a master. Thus, it will have <TT
CLASS="FILENAME"
>/dev/hdc</TT
> device
file. To instruct the kernel that you want to treat it as a SCSI device, add
the following line to <TT
CLASS="FILENAME"
>/etc/lilo.conf</TT
>: </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> append=" hdc=ide-scsi"</PRE
></FONT
></TD
></TR
></TABLE
><P
>Also, if your kernel doesn't automatically load ide-scsi module, add
<B
CLASS="COMMAND"
>insmod ide-scsi</B
> into your <TT
CLASS="FILENAME"
>rc.local</TT
>
(or equivalent) file. Once you have our CD-writer recognized as a
SCSI device, run <B
CLASS="COMMAND"
>cdrecord --scanbus</B
> to
find out what's the "dev" parameter to cdrecord. On my system, the
output looks like the following: </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> scsibus1:
1,0,0 100) 'IOMEGA ' 'ZIP 250 ' '51.G' Removable Disk
1,1,0 101) 'HP ' 'CD-Writer+ 7100 ' '3.01' Removable CD-ROM</PRE
></FONT
></TD
></TR
></TABLE
><P
>So, the <B
CLASS="COMMAND"
>cdrecord</B
> command line will contain <B
CLASS="COMMAND"
>dev=1,1,0</B
> to specify the
device. Here is the complete command on my system: </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> cdrecord dev=1,1,0 -eject speed=2 -pad -audio *.wav</PRE
></FONT
></TD
></TR
></TABLE
><P
>And, with kernel 2.6:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
> cdrecord dev=ATAPI:1,1,0 -eject speed=2 -pad -audio *.wav</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>NOTE</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> The -pad argument is neccessary,
because all audio tracks on the CD must be adjusted for the proper
data length, which is not always the case with mp3 files. </P
><P
>Another way, would be to convert WAV files with <B
CLASS="COMMAND"
>sox</B
> into CDR format before burning:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>sox file.wav file.cdr</PRE
></FONT
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECTION"
><HR><H1
CLASS="SECTION"
><A
NAME="DAO-BURNING"
></A
>4. Burning a DAO CD</H1
><P
>DAO, Disc-At-Once, is as of now the only method for burning a CD without a 2-second pause between the tracks.
It's useful for burning party mixes. The program for burning CDs in DAO mode is <B
CLASS="COMMAND"
>cdrdao</B
>, available from SourceForge, <A
HREF="http://sourceforge.net/projects/cdrdao/"
TARGET="_top"
>http://sourceforge.net/projects/cdrdao/</A
>.</P
><P
>The <B
CLASS="COMMAND"
>cdrdao</B
> program uses description files called <EM
>TOC</EM
> (Table Of Contents, of course). There are two ways to create such file. First is to use a shell script, distributed with <B
CLASS="COMMAND"
>cdrdao</B
> source (in <TT
CLASS="FILENAME"
>contrib</TT
> directory, called <B
CLASS="COMMAND"
>generate_toc.sh</B
>. It takes a list of <TT
CLASS="FILENAME"
>.wav</TT
> files as an argument and produces a <TT
CLASS="FILENAME"
>cd.toc</TT
> file. Second way is to simply create such file yourself in a text editor of your choice. Here is a self-explanatory example:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>CD_DA
TRACK AUDIO
AUDIOFILE "mix-01.wav" 0
TRACK AUDIO
AUDIOFILE "mix-02.wav" 0
TRACK AUDIO
AUDIOFILE "mix-03.wav" 0
TRACK AUDIO
AUDIOFILE "mix-04.wav" 0
TRACK AUDIO
AUDIOFILE "mix-05.wav" 0</PRE
></FONT
></TD
></TR
></TABLE
><P
>The <EM
>0</EM
> (zero) after the wave filename means start from the beginning of the file. There can be a second number providing the length (time) of file to record. The <B
CLASS="COMMAND"
>xcdroast</B
> creates similar <EM
>TOC</EM
> files, there are also examples in <TT
CLASS="FILENAME"
>testtocs</TT
> directory of <B
CLASS="COMMAND"
>cdrdao</B
> source.</P
><P
>The <B
CLASS="COMMAND"
>cdrdao</B
> by default uses the device <TT
CLASS="FILENAME"
>/dev/cdrecorder</TT
>, which should be a link to the cdwriter device. Assuming your cd recorder device file is <TT
CLASS="FILENAME"
>/dev/scd0</TT
>, create the link (as root) as follows:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>ln -s /dev/scd0 /dev/cdrecorder</PRE
></FONT
></TD
></TR
></TABLE
><P
>Then, assuming that the <EM
>TOC</EM
> file is named <TT
CLASS="FILENAME"
>cd.toc</TT
> the command to burn the cd is simply:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>cdrdao write cd.toc</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECTION"
><HR><H1
CLASS="SECTION"
><A
NAME="SOFTWARE"
></A
>5. Software</H1
><P
>There are some programs available, that can automate the process of creating CDs from MP3 files. Here is
arbitrarily selected list:</P
><P
></P
><UL
><LI
><P
><EM
>burnmp3</EM
> - Program to automate burning with DAO method. <A
HREF="http://richardsnow.bizland.com/burnmp3/"
TARGET="_top"
>http://richardsnow.bizland.com/burnmp3/</A
>. </P
></LI
><LI
><P
><EM
>mp32dao</EM
> - a script from <EM
>cdrdao</EM
> distribution, in the
<EM
>contrib</EM
> directory. <A
HREF="http://cdrdao.sourceforge.net/"
TARGET="_top"
>http://cdrdao.sourceforge.net/</A
>.</P
></LI
></UL
></DIV
><DIV
CLASS="SECTION"
><HR><H1
CLASS="SECTION"
><A
NAME="DATA"
></A
>6. Data CDs</H1
><P
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Note</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>This section is a work in progress, you're looking at initial, very sparse version.</P
></TD
></TR
></TABLE
></DIV
></P
><P
>With increasing popularity of CD/MP3 players burning data CDs for listening purposes become practical. The advantage is definitely being able to squeeze ten times more music onto one CD (a very approximate figure).</P
><P
>First I would recommend the filename cleanup steps outlined at the beginning of this document. Conversion to WAV is, obviously, not needed here. To normalize MP3 files without losing quality by conversions, use <B
CLASS="COMMAND"
>mp3gain</B
>. This program is available from <A
HREF="http://www.maazl.de/project/mp3/mp3gain.html"
TARGET="_top"
>http://www.maazl.de/project/mp3/mp3gain.html</A
> or <A
HREF="http://mp3gain.sourceforge.net/"
TARGET="_top"
>http://mp3gain.sourceforge.net/</A
> (but this second site seems to contain Windows-oriented version). You'd need to issue the command:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>mp3gain -r -c *.mp3</PRE
></FONT
></TD
></TR
></TABLE
><P
>As far as burning is concerned, MP3 data CD-s are just a standard data CD's (ISO9660) with MP3 files on it. All MP3-CD players I know accept CD-s with directories in them, and I usually burn CD with Joliet extension and they work just fine. So to burn such a CD under linux, you first need to create an ISO image an then burn it on the CD as in the example below:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>mkisofs -J -o /tmp/mymp3s.iso /home/greg/mp3s/
cdrecord dev=1,0,0 speed=16 -eject /tmp/mymp3s.iso</PRE
></FONT
></TD
></TR
></TABLE
><P
>That's it!</P
></DIV
><DIV
CLASS="SECTION"
><HR><H1
CLASS="SECTION"
><A
NAME="RESOURCES"
></A
>7. CD Burning Resources</H1
><P
></P
><UL
><LI
>Burning CDs on Linux: <A
HREF="http://www-106.ibm.com/developerworks/linux/library/l-cdburn.html"
TARGET="_top"
>http://www-106.ibm.com/developerworks/linux/library/l-cdburn.html</A
></LI
><LI
>CD Burning from the command line: <A
HREF="http://freeunix.dyndns.org:8088/site2/howto/Burn_em_Baby.shtml"
TARGET="_top"
>http://freeunix.dyndns.org:8088/site2/howto/Burn_em_Baby.shtml</A
></LI
><LI
>Comprehensive Burning Tutorial: <A
HREF="http://www.yolinux.com/TUTORIALS/LinuxTutorialCDBurn.html"
TARGET="_top"
>http://www.yolinux.com/TUTORIALS/LinuxTutorialCDBurn.html</A
></LI
><LI
>CD Mastering Guide: <A
HREF="http://debianlinux.net/~jama/howto/cd_mastering_steps.html"
TARGET="_top"
>http://debianlinux.net/~jama/howto/cd_mastering_steps.html</A
></LI
></UL
></DIV
><DIV
CLASS="SECTION"
><HR><H1
CLASS="SECTION"
><A
NAME="CREDITS"
></A
>8. Credits</H1
><P
>Special thanks to all the people who contribute to the Linux community and who made this HOWTO possible.</P
><DIV
CLASS="SECTION"
><HR><H2
CLASS="SECTION"
><A
NAME="TRANSLATIONS"
></A
>8.1. Translations</H2
><P
></P
><UL
><LI
><P
> Im Eunjea - Translated this document to Korean, URL is <A
HREF="http://kltp.kldp.org/eunjea/mp3_burning/"
TARGET="_top"
>http://kltp.kldp.org/eunjea/mp3_burning/</A
>.</P
></LI
><LI
><P
> Mendel L Chan - Translated this document to Chinese, URL is <A
HREF="http://www.linux.org.tw/CLDP/mini/MP3-CD-Burning/"
TARGET="_top"
>http://www.linux.org.tw/CLDP/mini/MP3-CD-Burning/</A
>.</P
></LI
><LI
><P
> Chie Nakatani - Translated this document to Japanese, URL is <A
HREF="http://www.linux.or.jp/JF/JFdocs/MP3-CD-Burning/index.html"
TARGET="_top"
>http://www.linux.or.jp/JF/JFdocs/MP3-CD-Burning/index.html</A
>.</P
></LI
><LI
><P
> Laszlo Daczi - Translated this document to Hungarian, URL is <A
HREF="http://tldp.fsf.hu/HOWTO/MP3-CD-Burning-hu/index.html"
TARGET="_top"
>http://tldp.fsf.hu/HOWTO/MP3-CD-Burning-hu/index.html</A
>.</P
></LI
><LI
><P
> Alix - Translated this document to French, available at French TLDP site <A
HREF=" http://www.traduc.org"
TARGET="_top"
> http://www.traduc.org</A
>.</P
></LI
></UL
></DIV
><DIV
CLASS="SECTION"
><HR><H2
CLASS="SECTION"
><A
NAME="OTHERCREDITS"
></A
>8.2. Other Credits</H2
><P
>I have had a great response to the previous releases of this HOWTO. So many people contributed, that I decided to change this section slightly in order to list all of the names.
So, I'd like to thank:</P
><P
>Greg Ferguson, Rob Russell, Terry Davis, Chris Vaill, Jamie Kellogg, Tom Panning, Adam Buckley, Ilia Lobsanov, Giuseppe "Cowo" Corbelli, Florent Fievez, Piero Ottuzzi, Kees Cook, Andrew Newman, David DeVault, Nico Genimakis, Jan-Erik Stromquist. </P
><P
>And, most of all, I'd like to thank my lovely wife, Marta, for her love, support and understanding</P
></DIV
></DIV
></DIV
></BODY
></HTML
>