Transcoding an Apple

In 2009, The Beatles released their entire discography on a unique green apple with a removable USB-branded drive. This device has long been on my list of Beatles releases that I have wanted to pick up for years now. And, thanks to a recent eBay listing and no one else bidding, I was finally able to add the infamous green apple to my collection.

While the package was shipped across the country, I kept worrying about finally receiving the device, only to discover it was wiped by the previous owner. But thankfully, the previous owner didn’t mess with the drive, and it worked perfectly once I plugged it in for the first time. Well, other than the fact that the included Beatles application requires a previous version of Mac OS X that supports 32-bit applications since it is actually a wrapped Adobe Flash application.

Once I pulled the files off of the green stem USB drive, I figured I had two main problems.

Since the drive is over 16 years old, I didn’t want to worry about it failing and corrupting all the data on it. While I did pull the FLAC, more on these files later, and MP3 folders, I still like having as close to a 1:1 copy of the drive for archival purposes.

To solve this problem, I opened Disk Utility, right-clicked the drive, and created a new Disk Image from it. After waiting about 30 minutes, USB drives from 2009 weren’t the fastest, I had a perfectly working copy of the USB.

The second problem relates to the included files. This USB is unique as it is one of the few official FLAC releases of The Beatles discography. And while it is great to have the FLAC files for playing on more high-end equipment, they don’t natively sync with my music service of choice, the Music app. Instead, I need to convert them to something more compatible with the Apple ecosystem.

After a little bit of Googling, I came across the method I knew I would have to use…trusty FFMPEG. My goal was to transcode the FLAC files into both AAC and ALAC. ALAC being Apple’s lossless file format which they have used for decades. The added benefit of using ALAC is I can actually sync them to my iPods and play them on my Mac. Unfortunately, these ALAC files are not synced with my iPhone/iPad since the iTunes/Apple Music Match service only seems to sync AAC files.

Either way though, I want to be able to convert these FLAC files to something I can use on iPods at the very least. To do this, all I needed was a single Terminal command.

# For ALAC Conversion
for i in *.flac; do ffmpeg -i "$i" -acodec alac -vcodec copy "${i%.*}.m4a"; done;
# For AAC Conversion
for i in *.flac; do ffmpeg -i "$i" -acodec aac -b:a 256k -vcodec copy "${i%.*}.m4a"; done;

With that one line, I was able to transcode both ALAC and AAC for use wherever I want!

This was a fun little project and a reminder of how much I love owning and managing my own music library. The idea of owning my own music library has been something I’ve been thinking about a lot lately, and is something I’ll probably cover more on this site in the near future.