Packet Disarray

Despatches from longb4

MP3 CDs in a 2005 Hyundai Tucson

In a cross-functional research opportunity blending music, computer science, and archaeology, I recently set out to burn some MP3 CDs for the 2005 Hyundai Tucson I’m driving at the moment. (Yes, right now!) Actually, I’m waiting for my Gordon Lightfoot discography to transcode, so I’m writing this up for the next time I search for it.

This now-ancient vehicle is kind of in the anti-sweet-spot for technology: it’s new enough to play CDs and “”“support”“” CDs burned as MP3 data files rather than CDDA (Redbook) audio, but not new enough to have an aux input or Bluetooth. Worse, burning arbitrary MP3s may not work, as I found out after I transcoded and burnt all my favorite Kanye albums on one disc with the command in this Stack Exchange answer (spoiler alert: didn’t work).

Instead, what worked for me was a variant on this Stack Exchange answer, where I did the FLAC decoding and LAME encoding in separate steps, to intentionally strip any tags. I’m not sure whether my original issue was extra metadata, variable bitrate encoding, or any extra streams ffmpeg could have been putting in the files and thereby confusing my elderly steed.

Supposing I’m in a directory called Gordon Lightfoot with album directories of FLACs, this is what worked for me:

for thing in */*.flac; do
    echo "$thing" "${thing%flac}wav"  # Cool filename substitution!
    flac -d -o "${thing%flac}wav" "$thing"  # Decode FLAC
    lame -b 256 "${thing%flac}wav" "${thing%flac}mp3"  # Encode 256k CBR MP3
done

Then, I just burnt them in directories on a single-session (mastered) CD-R with the native OSX CD burning tool.