From 7a070fb0fffe0d7017912f3d278c261b400348a4 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 23 Sep 2011 01:33:23 -0400 Subject: [PATCH] Add audio CD burning post. --- posts/Burning_audio_CDs_with_replay_gain.mdwn | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 posts/Burning_audio_CDs_with_replay_gain.mdwn diff --git a/posts/Burning_audio_CDs_with_replay_gain.mdwn b/posts/Burning_audio_CDs_with_replay_gain.mdwn new file mode 100644 index 0000000..a7d7963 --- /dev/null +++ b/posts/Burning_audio_CDs_with_replay_gain.mdwn @@ -0,0 +1,44 @@ +I've been streamlining my procedure for burning audio CDs, and I like +what I've come up with. Unfortunately, I'll never remember it on my +own, so here's a note to myself (any whoever else cares) on what to +do. + +First, build your playlist in [[MPD]], using [[my +one-liner|MPD_playlist_duration]] to calculate the playlist duration +(my CD-Rs hold 80 minutes). When you've got your playlist arranged to +your satisfaction, convert the files to [WAV][]s using: + + $ i=1; for x in $(mpc -f '%file%' playlist); do j=$(seq -f '%02g' $i $i); let "i += 1"; flac -d --apply-replaygain-which-is-not-lossless=t -o $j.$(basename ${x/.flac/.wav}) /var/lib/mpd/music/$x; done + +This assumes that all the files in your playlist are [FLAC][] files, +which is a good idea (disk space is cheap, FLAC is lossless with good +open source support). It also assumes you've already stored +ReplayGain settings in your FLAC files. If you haven't, you'll get +warnings like: + + WARNING: can't get track (or even album) ReplayGain tags + +If that happens, go back and read about [[replay gain]], add the tags, +and try again ;). + +See my [[replay gain]] post for more details on the +`--apply-replaygain-which-is-not-lossless` option. After the decoding +step, you'll have a directory full of WAVs that have been normalized +to a standard track-level loudness. The bit about `i` and `j` ensures +that `*.wav` will list the tracks in the order in which they appear in +your playlist. Then burn the tracks to a CD using +[[cdrecord|cdrtools]]: + + $ cdrecord -v speed=1 dev=/dev/cdrom -eject -dao -audio -pad *.wav + +If you don't care about the order, use `$(ls *.wav | shuf)` instead of +`*.wav`. + +That's it! Audio CDs from MPD playlists in two lines. + + +[WAV]: http://en.wikipedia.org/wiki/WAV +[FLAC]: http://flac.sourceforge.net/ + +[[!tag tags/linux]] +[[!tag tags/tools]] -- 2.26.2