Difference between revisions of "Gapless Audio CD Creation from MP3s"
Kynikos.bot (talk | contribs) (Template:i18n is deprecated, use intelanguage links, see Help talk:I18n#"Dummy" interlanguage links and deprecation of Template:i18n) |
|||
(12 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Audio/Video | + | [[Category:Audio/Video]] |
− | [[ | + | [[zh-CN:Gapless Audio CD Creation from MP3s]] |
− | + | ==Introduction== | |
− | + | Some albums are meant to be played without any silent gap between tracks -- especially live albums. Furthermore, when you copy a regular album that has gaps, the ripped audio files will actually include this gap at the end of each track -- to burn these tracks with a gap will actually increase the length of silence between tracks. Therefore, in almost all cases, you are better off burning all your CD backups gaplessly. | |
− | + | ||
− | + | Here's an easy way to burn a gapless audio CD from the shell using cdrdao. | |
==Setup== | ==Setup== | ||
We'll be using a few programs for this. | We'll be using a few programs for this. | ||
− | pacman - | + | pacman -S lame cdrdao |
− | Let's configure cdrdao to use our CD burner. Open up | + | Optional: Let's configure cdrdao to use our CD burner. Open up {{Ic|/etc/cdrdao.conf}} (as root), and enter the /dev entry for your burner in this format: |
− | write_device: "/dev/ | + | write_device: "/dev/cdrw" |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Decode the MP3s== | ==Decode the MP3s== | ||
− | First of all, copy all the songs you want on the CD to a folder. | + | First of all, copy all the songs you want on the CD to a folder. If necessary, 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. Take note that a full album can take up more than 800MB in wav files alone. |
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 | ||
Line 34: | Line 27: | ||
for file in *.wav ; do | for file in *.wav ; do | ||
echo "TRACK AUDIO" | echo "TRACK AUDIO" | ||
− | |||
echo "FILE \"$file\" 0" | echo "FILE \"$file\" 0" | ||
done | done | ||
} > toc | } > toc | ||
+ | |||
+ | Optionally, if you would like to insert a 2-second gap between certain tracks, you can edit the toc file and insert this line between the TRACK AUDIO and FILE lines for that track: | ||
+ | PREGAP 00:02:00 | ||
+ | |||
+ | Of course, you can change the gap length to any time you desire. | ||
==Burn== | ==Burn== | ||
Finally, all we have to do is burn the CD. | Finally, all we have to do is burn the CD. | ||
cdrdao write toc | cdrdao write toc | ||
+ | |||
+ | Some people prefer to burn audio CDs at a low speed for higher quality. Here's an example for burning at 8x: | ||
+ | cdrdao write --speed 8 toc |
Revision as of 08:15, 13 June 2012
zh-CN:Gapless Audio CD Creation from MP3s
Introduction
Some albums are meant to be played without any silent gap between tracks -- especially live albums. Furthermore, when you copy a regular album that has gaps, the ripped audio files will actually include this gap at the end of each track -- to burn these tracks with a gap will actually increase the length of silence between tracks. Therefore, in almost all cases, you are better off burning all your CD backups gaplessly.
Here's an easy way to burn a gapless audio CD from the shell using cdrdao.
Setup
We'll be using a few programs for this.
pacman -S lame cdrdao
Optional: Let's configure cdrdao to use our CD burner. Open up /etc/cdrdao.conf
(as root), and enter the /dev entry for your burner in this format:
write_device: "/dev/cdrw"
Decode the MP3s
First of all, copy all the songs you want on the CD to a folder. If necessary, 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. Take note that a full album can take up more than 800MB in wav files alone.
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 "FILE \"$file\" 0" done } > toc
Optionally, if you would like to insert a 2-second gap between certain tracks, you can edit the toc file and insert this line between the TRACK AUDIO and FILE lines for that track:
PREGAP 00:02:00
Of course, you can change the gap length to any time you desire.
Burn
Finally, all we have to do is burn the CD.
cdrdao write toc
Some people prefer to burn audio CDs at a low speed for higher quality. Here's an example for burning at 8x:
cdrdao write --speed 8 toc