Difference between revisions of "Gapless Audio CD Creation from MP3s"

From ArchWiki
Jump to: navigation, search
(Added initial content)
(Clean formatting)
Line 1: Line 1:
 
[[Category:CD/DVD]]
 
[[Category:CD/DVD]]
  
 
+
===Setup===
===Burn Gapless Audio CD From MP3s===
+
 
+
====Setup====
+
 
We'll be using a few programs for this.
 
We'll be using a few programs for this.
<verbatim>
+
pacman -Sy lame cdrdao
pacman -Sy lame cdrdao
+
</verbatim>
+
  
 
Let's configure cdrdao to use our CD burner. First, we need to find out how cdrdao can find the device.
 
Let's configure cdrdao to use our CD burner. First, we need to find out how cdrdao can find the device.
<verbatim>
+
cdrdao scanbus
cdrdao scanbus
+
</verbatim>
+
  
If you have an IDE drive, you will probably be using '''ATAPI:0,0,0'''. Open up <code>/etc/cdrdao.conf</code> (as root), and enter the device name and node, in this format:
+
If you have an IDE drive, you will probably be using '''ATAPI:0,0,0'''. Open up <tt>/etc/cdrdao.conf</tt> (as root), and enter the device name and node, in this format:
<verbatim>
+
write_device: \"ATAPI:0,0,0\"
write_device: \"ATAPI:0,0,0\"
+
</verbatim>
+
  
====Decode the MP3s====
+
===Decode the MP3s===
 
First of all, copy all the songs you want on the CD to a folder. It's best to rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Please realize that a full album can take up more than 800MB in wav files alone. This will take some time.
 
First of all, copy all the songs you want on the CD to a folder. It's best to rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Please realize that a full album can take up more than 800MB in wav files alone. This will take some time.
<verbatim>
+
mkdir wav
mkdir wav
+
for file in *.mp3 ; do
for file in *.mp3 ; do
+
 
     lame --decode \"$file\" \"wav/$file.wav\"
 
     lame --decode \"$file\" \"wav/$file.wav\"
done
+
done
</verbatim>
+
  
====Create a Table of Contents file====
+
===Create a Table of Contents file===
 
Once finished, let's make a Table of Contents file that describes the layout of the CD.
 
Once finished, let's make a Table of Contents file that describes the layout of the CD.
<verbatim>
+
cd wav
cd wav
+
{
{
+
  echo \"CD_DA\"
  echo \"CD_DA\"
+
  for file in *.wav ; do
  for file in *.wav ; do
+
    echo \"TRACK AUDIO\"
    echo \"TRACK AUDIO\"
+
    # echo \"PREGAP 00:02:00\"  # insert a 2-second silent gap before each track
    # echo \"PREGAP 00:02:00\"  # insert a 2-second silent gap before each track
+
    echo \"FILE \\"$file\\" 0\"
    echo \"FILE \\"$file\\" 0\"
+
  done
  done
+
} > toc
} > toc
+
</verbatim>
+
  
====Burn====
+
===Burn===
 
Finally, all we have to do is burn the CD.
 
Finally, all we have to do is burn the CD.
<verbatim>
+
cdrdao write toc
cdrdao write toc
+
</verbatim>
+

Revision as of 18:32, 23 July 2005


Setup

We'll be using a few programs for this.

pacman -Sy lame cdrdao

Let's configure cdrdao to use our CD burner. First, we need to find out how cdrdao can find the device.

cdrdao scanbus

If you have an IDE drive, you will probably be using ATAPI:0,0,0. Open up /etc/cdrdao.conf (as root), and enter the device name and node, in this format:

write_device: \"ATAPI:0,0,0\"

Decode the MP3s

First of all, copy all the songs you want on the CD to a folder. It's best to rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Please realize that a full album can take up more than 800MB in wav files alone. This will take some time.

mkdir wav
for file in *.mp3 ; do
   lame --decode \"$file\" \"wav/$file.wav\"
done

Create a Table of Contents file

Once finished, let's make a Table of Contents file that describes the layout of the CD.

cd wav
{
  echo \"CD_DA\"
  for file in *.wav ; do
    echo \"TRACK AUDIO\"
    # echo \"PREGAP 00:02:00\"  # insert a 2-second silent gap before each track
    echo \"FILE \\"$file\\" 0\"
  done
} > toc

Burn

Finally, all we have to do is burn the CD.

cdrdao write toc