Penguin
Diff: HowToMP3CDBurning
EditPageHistoryDiffInfoLikePages

Differences between current version and predecessor to the previous major change of HowToMP3CDBurning.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 3 Last edited on Thursday, October 21, 2004 5:29:34 pm by AristotlePagaltzis
Older page: version 2 Last edited on Friday, June 7, 2002 1:07:03 am by perry Revert
@@ -1,417 +1 @@
-Linux MP3 CD Burning mini-HOWTO  
-!!!Linux MP3 CD Burning mini-HOWTO  
-!Greg Wierzchowski  
-  
-greg@draxen.org  
-  
-  
-  
-2001-05-29  
-  
-  
-__Revision History__Revision 2.02002-04-26Revised by: GWDivided into two sections: existing material to section "audio", new section "data" on data  
-CDs. Misc. additions.Revision 1.52001-11-19Revised by: GWFixed omission in Disc-At-Once burning section.Revision 1.42001-11-17Revised by: GWAdded Disc-At-Once burning section.Revision 1.32001-09-02Revised by: GWAdded another example of decoding MP3 files with lame.Revision 1.22001-07-12Revised by: GWMinor layout changes; Added Translations subsection into Credits.Revision 1.12001-06-12Revised by: GWMinor cleanup; Regexp fix for MP3 to WAV name conversion example.Revision 1.02001-05-29Revised by: GWInitial Release.  
-  
-  
-  
-  
-  
-A complete recipe for creating audio and data CDs from MP3 files.  
-  
-  
-  
-  
-  
-----; __Table of Contents__; 1. Introduction: ; 1.1. Copyright and License; 2. Audio CDs: ; 2.1. Preparing the Tracks; 2.2. Burning Your CD; 2.3. Burning a DAO CD; 2.4. Software; 3. Data CDs; 4. Credits: ; 4.1. Translations; 4.2. Other Credits  
-!!!1. Introduction  
-  
-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.  
-  
-  
-  
-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 ''The Linux MP3  
-HOWTO'' by Phil Kerr, located at http://www.tldp.org/HOWTO/MP3-HOWTO.html.  
-For information about CD creation in general as well as CD burners, refer to  
-''CD-Writing-HOWTO'' by Winfried Trümper, available at http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html.  
-  
-  
-  
-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.  
-  
-----  
-!!1.1. Copyright and License  
-  
-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  
-''greg.wierzchowski@usa.net''.  
-  
-  
-----  
-!!!2. Audio CDs  
-!!2.1. Preparing the Tracks  
-  
-  
-  
-  
-  
-  
-__Note__  
-  
-All commands assume bash shell  
-  
-  
-  
-  
-  
-  
-  
-  
-#  
-  
-Collect all MP3 files in one directory.  
-  
-  
-#  
-#  
-  
-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:  
-  
-  
- for i in *. [[Mm ][[Pp]3; do mv "$i" `echo $i | tr '[[A-Z]' '[[a-z]'`; done  
-  
-to convert just extensions:  
-  
-  
- for i in *.MP3; do mv "$i" "`basename "$i" .MP3`.mp3"; done  
-  
-#  
-#  
-  
-If any filenames contain spaces, first convert them to underscores:  
-  
-  
- for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`; done  
-#  
-#  
-  
-Convert them to WAV with the command:  
-  
-  
- for i in *.mp3; do mpg123 -w `basename $i .mp3`.wav $i; done  
-  
-When decoding 22khz MP3 files the output of __mpg123__ may be distorted. To fix this,  
-use:  
-  
-  
- for i in *.mp3; do mpg123 --rate 44100 --stereo --buffer 3072 --resync -w `basename $i .mp3`.wav $i; done  
-  
-  
-''Mpg123'' should be present in any Linux  
-distribution, but if you don't have it, get it at  
-http://www.mpg123.de/.  
-  
-  
-  
-  
-''NOTE'' 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 I searched for another MP3 player that  
-could write WAV files to disk, and found this one: ''MAD mp3 decoder'' at  
-http://www.mars.org/home/rob/proj/mpeg/.  
-With ''madplayer'', the command line is:  
-  
-  
- for i in *.mp3; do madplay -o `basename $i .mp3`.wav $i; done  
-  
- There is yet another way to do the conversion. Some MP3 files apparently give both __mpg123__ and  
-__madplay__ trouble with decoding. The __lame__ encoder, which has a decoding mode, seems  
-to handle difficult cases very well (__lame__ can be found at http://www.mp3dev.org/mp3/) :  
-  
-  
-  
- for i in *.mp3; do lame --decode $i `basename $i .mp3`.wav; done  
-  
-  
- ''NOTE:'' The __`basename $i .mp3`.wav__ command  
-replaces MP3 extensions with WAV. There are 101 ways to do that, here's  
-the alternative: __`echo "$1" | sed 's/\.mp3$/.wav/'`__  
-  
-  
-  
-#  
-#  
-  
-Run "__file *.wav__" and check the  
-output for any files different from 16 bit, stereo 44100 Hz.  
-  
-  
-#  
-#  
-  
-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:  
-  
-  
- sox track01.wav -r 44100 track01-new.wav resample  
-  
-  
-or, if the above introduces static when converting mono files:  
-  
-  
- sox track01.wav -r 44100 -c 2 track01-new.wav  
-  
-  
-''Sox'' is so popular, that it's probably installed  
-by default with any Linux distribution, and can be obtained from  
-http://www.spies.com/Sox/.  
-However, the command-line options are somewhat cryptic for the casual  
-user (me). Look at  
-http://www.spies.com/Sox/sox.tips.html  
-for some tips on usage.  
-  
-  
-  
-#  
-#  
-  
-Normalize your WAV files, to avoid drastic differences in volume  
-levels. I use a program by Chris Vaill (`cvaill@cs.columbia.edub), called  
-__normalize__ - it can be obtained from  
-http://www.cs.columbia.edu/~cvaill/normalize/  
-  
-  
-  
-  
- I use the following  
-syntax (-m is for mix mode, where all files should be as loud as  
-possible):  
-  
-  
- normalize -m *.wav  
-#----  
-!!2.2. Burning Your CD  
-  
-There are many programs to create CDs from WAV files. I use __cdrecord__ for  
-command-line burning and __XCDROAST__ for gui. For __cdrecord__,  
-you have to know  
-what SCSI device your CD-writer is. If you're using ATAPI writer, use SCSI  
-emulation (kernel module ide-scsi). Let's assume, that your ATAPI cdwriter  
-is on the second IDE bus as a master. Thus, it will have /dev/hdc device  
-file. To instruct the kernel that you want to treat it as a SCSI device, add  
-the following line to /etc/lilo.conf:  
-  
-  
- append=" hdc=ide-scsi"  
-  
-Also, if your kernel doesn't automatically load ide-scsi module, add  
-__insmod ide-scsi__ into your rc.local  
-(or equivalent) file. Once you have our CD-writer recognized as a  
-SCSI device, run __cdrecord --scanbus__ to  
-find out what's the "dev" parameter to cdrecord. On my system, the  
-output looks like the following:  
-  
-  
- scsibus1:  
-1,,0 100) 'IOMEGA ' 'ZIP 250 ' '51.G' Removable Disk  
-1,1,0 101) 'HP ' 'CD-Writer+ 7100 ' '3.01' Removable CD-ROM  
-  
-So, the __cdrecord__ command line will contain __dev=1,1,__ to specify the  
-device. Here is the complete command on my system:  
-  
-  
- cdrecord dev=1,1,0 -eject speed=2 -pad -audio *.wav  
-  
-  
-  
-  
-__NOTE__  
-  
- 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.  
-  
-----  
-!!2.3. Burning a DAO CD  
-  
-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 __cdrdao__, available from !SourceForge, http://sourceforge.net/projects/cdrdao/.  
-  
-  
-  
-The __cdrdao__ program uses description files called ''TOC'' (Table Of Contents, of course). There are two ways to create such file. First is to use a shell script, distributed with __cdrdao__ source (in contrib directory, called __generate_toc.sh__. It takes a list of .wav files as an argument and produces a cd.toc file. Second way is to simply create such file yourself in a text editor of your choice. Here is a self-explanatory example:  
-  
-  
-CD_DA  
-TRACK AUDIO  
-AUDIOFILE "mix-01.wav"  
-TRACK AUDIO  
-AUDIOFILE "mix-02.wav"  
-TRACK AUDIO  
-AUDIOFILE "mix-03.wav"  
-TRACK AUDIO  
-AUDIOFILE "mix-04.wav"  
-TRACK AUDIO  
-AUDIOFILE "mix-05.wav"  
-  
-The '''' (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 __xcdroast__ creates similar ''TOC'' files, there are also examples in testtocs directory of __cdrdao__ source.  
-  
-  
-  
-The __cdrdao__ by default uses the device /dev/cdrecorder, which should be a link to the cdwriter device. Assuming your cd recorder device file is /dev/scd0, create the link (as root) as follows:  
-  
-  
-ln -s /dev/scd0 /dev/cdrecorder  
-  
-Then, assuming that the ''TOC'' file is named cd.toc the command to burn the cd is simply:  
-  
-  
-cdrdao write cd.toc----  
-!!2.4. Software  
-  
-There are some programs available, that can automate the process of creating CDs from MP3 files. Here is  
-arbitrarily selected list:  
-  
-  
-  
-  
-  
-  
-*  
-  
-''burnmp3'' - Program to automate burning with DAO method. http://richardsnow.bizland.com/burnmp3/.  
-  
-  
-*  
-*  
-  
-''mp32dao'' - a script from ''cdrdao'' distribution, in the  
-''contrib'' directory. http://cdrdao.sourceforge.net/.  
-  
-  
-*----  
-!!!3. Data CDs  
-  
-  
-  
-  
-  
-  
-__Note__  
-  
-This section is a work in progress, you're looking at initial, very sparse version.  
-  
-  
-  
-  
-  
-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).  
-As far as MP3 data CD-s, they're just a regular, standard data CD's (ISO9660) with MP3 music as regular files. 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:  
-  
-  
-mkisofs -J -o /tmp/mymp3s.iso /home/greg/mp3s/  
-cdrecord dev=1,,0 speed=16 /tmp/mymp3s.iso  
-  
-That's it!  
-  
-  
-  
-I have yet to research ability to normalize mp3 files directly - however I believe it always involves decompressing, normalization and then re-compressing the file, which introduces quality loss. Stay tuned!  
-  
-----  
-!!!4. Credits  
-  
-Special thanks to all the people who contribute to the Linux community and who made this HOWTO possible.  
-  
-----  
-!!4.1. Translations  
-  
-  
-  
-  
-*  
-  
- Im Eunjea - Translated this document to Korean, URL is http://kltp.kldp.org/eunjea/mp3_burning/.  
-  
-  
-*  
-*  
-  
- Mendel L Chan - Translated this document to Chinese, URL is http://www.linux.org.tw/CLDP/mini/MP3-CD-Burning/.  
-  
-  
-*  
-*  
-  
- Chie Nakatani - Translated this document to Japanese, URL is http://www.linux.or.jp/JF/JFdocs/MP3-CD-Burning/index.html.  
-  
-  
-*----  
-!!4.2. Other Credits  
-  
-  
-  
-  
-*  
-  
- Greg Ferguson - Initially converted this document from HTML to SGML.  
-  
-  
-*  
-*  
-  
- Rob Russell - Corrected my name conversion example.  
-  
-  
-*  
-*  
-  
- Terry Davis - Suggested submitting my HOWTO to linuxdoc.  
-  
-  
-*  
-*  
-  
-Chris Vaill - Created __normalize__ program.  
-  
-  
-*  
-*  
-  
-Jamie Kellogg - Submitted a solution to decode with __lame__ for troublesome files.  
-  
-  
-*  
-*  
-  
-Tom Panning - Submitted a tip for the conversion of mono files with sox.  
-  
-  
-*  
-*  
-  
-Adam Buckley - Submitted an idea about files with uppercase extension.  
-  
-  
-*  
-*  
-  
-Ilia Lobsanov - Submitted options for mpg123 decoding 22kHz files .  
-  
-  
-*  
+Describe [HowToMP3CDBurning ] here.