So first, we download the file, for which
file(1)
tells me: 080413_sscruggs.mp3: MPEG ADTS, layer III, v2, 32 kBits, 22.05 kHz, MonauralThat gives us a few clues about what must be done:
- We need to "transcode" the file from MP3 to a "wav" file.
- We need the data rate to be a CDDA-compatible one (i.e., 44.1 kHz).
- I'm not sure, but to be safe I want to make it a stereo file rather than mono. (When I listen to these monaural MP3s on my iPod, I only get sound from one ear.)
mp3→wav
This is simplicity itself. I use the excellentmpg321
decoder, like so:$ mpg321 --wav 080413_sscruggs.wav 080413_sscruggs.mp3There we are -- a WAV file. For the rest...
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Directory: /home/carol/Desktop/
Playing MPEG stream from 080413_sscruggs.mp3 ...
MPEG 1.0 layer III, 32 kbit/s, 22050 Hz mono
[35:11] Decoding of 080413_sscruggs.mp3 finished.
$ file 080413_sscruggs.wav
080413_sscruggs.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 22050 Hz
wav (22050Hz mono) → wav (44100Hz stereo)
I believe we can do this all in one step, using the extremely versatilesox(1)
program. I invoked it like this:$ sox 080413_sscruggs.wav -c 2 -r 44100 cd0413-scotty.wav polyphasewhere:
- "
080413_sscruggs.wav
" is the input file; - "
cd0413-scotty.wav
" is the output file. Parameters appearing before the output file name are the output file's format options:- "
-c 2
" means I want the output file to have two channels. - "
-r 44100
" means, well, that's the sample rate I want the output file to have.
- "
- "
polyphase
" gives a higher-quality rate conversion than the default linear interpolation. (I don't know if "resample" is better or worse for this sort of application.)
$ file cd0413-scotty.wavOnce you have the requisite 44.1kHz "wav" files, use your favorite CD-burning program to make an audio CD.
cd0413-scotty.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
I use
k3b
because it's easy and convenient. I used to use cdrecord, but I have gotten old and lazy. Of course the best thing about k3b is that it plays a bugle victory song after a successful burn.
1 comment:
Post a Comment