Flickin’ flacin’ eargasms! (FLAC audio rocks)
FLAC lossless audio is changing the way I buy music.
[Why, yes, this is the dumbest entry title I’ve ever conceived. You?]
2007-12-05 insert: Standard Rockbox builds for iPod 4G have been working well for at least a couple months now. The special Mikeage NOSCALING builds are no longer necessary (refer to 2007-04-02 insert below).
2007-07-15 insert: Just discovered MusicIsHere.com, which supplies music in FLAC format, as well as MP3, MPEG4, AAC, MPC, Ogg Vorbis, and WMA, according to their FAQ. I can’t yet attest to their legitimacy, but looks interesting at first glance. Ah, I see that CDBaby, whom I already trust, links to them from various album pages (example). Good sign.
2007-05-06 insert: As of Friday, Scottish record label Linn Records is offering FLAC encodings of some of its audiophile recordings. I can highly recommend. (Linn has offered lossless downloads for quite a while, but previously only in WMA format, which IMO is a pointless nuisance in the presence of high-quality open-source lossless codecs like FLAC. So bravo.)
2007-04-02 insert: I’m now running Rockbox exclusively on my iPod and iAudio X5L instead of each one’s default firmware, which makes playing FLAC (or almost any other audio format) on them straightforward — and glorious. (NOTE: Last time I tried an official Rockbox build on my iPod 4G, it stuttered and froze occasionally. Mike Miller to the rescue with his Rockbox NOSCALING builds at mikeage.net! Rockbox on iPod 4G now works perfectly. Official Rockbox build is fine for iAudio X5L and, presumably, more recent iPod models.)
2006-07-19 insert: Until I get around to refreshing this entry to reflect the ever-improving state of FLAC-related audio tools, I’ll quickly list new ones I’ve just become aware of:
- Xiph QuickTime Components — put Vorbis and FLAC back in iTunes (as clued here) (it’s Ogg FLAC instead of plain FLAC; can use Max to convert)
- iTunes to FLAC — encoding/decoding AppleScripts
- Max / Tag / Cog — “an OS X audio alliance” (Max is amazing: rip, encode, transcode every which way, including FLAC)
I will instantly buy any of these developers a beer or two in appreciation.
I found myself with a spare 120GB hard drive when its removal from a Series 1 TiVo showed it wasn’t the problem as I’d thought (insufficient swap after a drive upgrade was the problem, now fixed). So I put this extra drive in my upstairs Gentoo Linux PC and proceeded to finally learn about FLAC (Free Lossless Audio Codec).
Why FLAC? In a nutshell, FLAC is a lossless audio format, not lossy like MP3, AAC, and Ogg Vorbis, yet its files are markedly smaller than the original WAV (aka AIFF) files present on an audio CD. Files ripped from CD and encoded into FLAC format land on a hard drive at full CD quality, and from there can be encoded at will into smaller lossy MP3 et al. derivations for use on portable players like an iPod. Being able to change my mind about acceptable encoding bitrate for my iPod without having to re-rip the physical CD is very convenient.
(Apple Lossless encoding is a comparable lossless audio format — and a convenient one within iTunes — but I prefer FLAC as I want a universal lossless format that’s easy to manipulate using free tools on any platform.)
Tools. Scripts I’m using to go from CD → FLAC → MP3 (Unix-oriented):
CD to FLAC files: abcde (calls free command-line tools cdparanoia, flac, and id3 to read CD, encode tracks as FLAC, and embed looked-up track data in them)
FLAC to MP3: flacmp3 thanks to ChrisR, further spruced up here (encodes with LAME). I’m experimenting with lame’s “—preset fast extreme” and “—preset insane” settings. For MP3 output, why LAME?
[2005-03-20 insert: ChrisR’s use of “—skip=20” in his flacit script’s flac arguments is important: without it each resulting encoded flac file has a distinct pop at the beginning, which naturally carries over into each downcoded MP3 or AAC. I realized this only after having encoded many dozens of CDs into flac files using abcde without “—skip=20” (duh, I didn’t think it was important). Good news is, because the files are lossless, you can easily transcode the original flacs into popless new ones. Here’s the flac2flac.sh script I cobbled together to do my de-pop transcoding.]
then (in Mac or Windows)MP3 to iPod: iTunes
New music sans CD. Besides ripping favorite purchased CDs to FLAC files on the hard drive, I’m now discovering numerous sources of legal music distributed in FLAC format — compact disc quality without the physical CD, usually at a commensurate lower cost. And even better, this distribution method returns more of the proceeds to the artist than does conventional music distribution. (Of course, to be practical, it requires high-speed Internet access.)
Music distributors discovered so far:
Magnatune: absolutely astounding quality, selection, and service, all content available in lo-fi/hi-fi streaming for review, then for purchase as your choice of FLAC, WAV, Ogg, MP3, and others
For example, at this moment I’m listening to Phoebe Carrai play the Bach cello suites; I might as well be in heaven. I don’t doubt Antonio Meneses could transport me there with equal aplomb.Mindawn: just discovered but looking good
Honorable mention (not FLAC, but high-quality bitrate MP3s):
eMusic: notable (to me) because their inventory includes lots of first-rate jazz as identified in the Penguin Guide to Jazz on CD
2005-11-01: I see Andy points out “all the Jazz albums on eMusic that rate four stars in the Penguin Guide to Jazz (7th edition),” a huge compilation by frogkopf in April 2005. Thanks!
Just discovered (also not FLAC, but 192kbps MP3s at low prices) :
- eClassical: notable for thoroughgoing inventory of classical titles for surprisingly low prices, though not yet cross-checked against recommended recordings in the Penguin Guide to Compact Discs and DVDs
[Downloading Bruckner Symphonies 4 and 7 from eClassical now for evaluation — how could I say no at $5 total?]
iTMS pros/cons. I was initially enthusiastic about Apple’s iTunes Music Store accessible through iTunes — and it is superbly implemented — but its 128kbps AAC encoding isn’t quite good enough to my ears when listening with premium headphones, and paying 99¢ per song for compromised quality relative to FLAC or Apple Lossless doesn’t make sense to me any more. (Except for the occasional whole-track sampling of an unfamiliar artist or album available online only there.)
Despite the current less-than-ideal encoding quality, the iTunes Music Store remains the leading choice for mainstream music you’d find at record stores, thanks to Apple’s diligence in accommodating and placating the recording industry. Magnatune, Mindawn, and eMusic are more oriented to independent-, lesser-known, and older recordings — IOW, what I like most — but their inventories appear to be diversifying rapidly.
It’s an exciting time to be a music enthusiast.
2005-02-24 update:
MP3 or AAC for iPod? If the iPod could play back Ogg-encoded files, I’d probably switch from MP3 or AAC to Ogg Vorbis because its politics and motivations please me. Meanwhile I’m trying to decide my ears’ preference for MP3 or AAC encoding, both of which the iPod can play, and at what bitrate.
Any encoding format I use has to work from a Unix shell command line, because I’m usually going to run a script to down-encode my stored FLACs into the target lossy format. LAME is a proven, finely-tuned command-line tool for creating quality MP3s.
FAAC. But today I realized there’s also FAAC, “Freeware Advanced Audio Codec,” a free AAC encoder that works comparably to LAME (and it’s easily buildable from Gentoo’s portage). The following faac syntax works nicely in the flacmp3 script mentioned above in place of lame:
faac -w -q 100 \
--title "$(metaflac --show-tag=TITLE "$file" |
sed 's/TITLE=(.*)/\1/i')" \
--artist "$(metaflac --show-tag=ARTIST "$file" |
sed 's/ARTIST=(.*)/\1/i')" \
--album "$(metaflac --show-tag=ALBUM "$file" |
sed 's/ALBUM=(.*)/\1/i')" \
--year "$(metaflac --show-tag=DATE "$file" |
sed 's/DATE=(.*)/\1/i')" \
--track "$(metaflac --show-tag=TRACKNUMBER "$file" |
sed 's/TRACKNUMBER=(.*)/\1/i')" \
--genre "$(metaflac --show-tag=GENRE "$file" |
sed 's/GENRE=(.*)/\1/i')" \
- -o "$(basename "$file" .flac).m4a"
where ‘-q’ is the faac quantizer quality. The FAAC FAQ recommends
-q 100 -> ~120 kbps (default)
-q 125 -> ~146 kbps
-q 150 -> ~172 kbps
My tests using FAAC 1.24+ (Feb 7 2005) UNSTABLE built from DarwinPorts in Mac OS X 10.3.8 show these additional values:
-q 175 -> 160 kbps (as reported by iTunes)
-q 200 -> 170 kbps (as reported by iTunes)
-q 250 -> 187 kbps (as reported by iTunes)
-q 275 -> 195 kbps (as reported by iTunes)
-q 300 -> 202 kbps (as reported by iTunes)
-q 400 -> 228 kbps (as reported by iTunes)
-q 500 -> 249 kbps (as reported by iTunes)
[oops, FAAC FAQ says ‘-q 500’ is a “useless setting”]
(I thought AAC encoding was CBR instead of VBR as LAME mostly uses — the iTMS offerings are 128kbps AAC CBR, for example — but “faac --long-help” reports that its ‘-q’ value sets “variable bitrate (VBR) quantizer quality.”)
I don’t yet know
how FAAC’s AAC encoding compares to Apple’s AAC as implemented in iTunes — I do know iTunes’ 224kpbs AAC is extraordinarily nice
how FAAC AAC compares to LAME MP3 at comparable bitrates
LAME has been tweaked and tweaked for years; cool as it is, how mature is FAAC? LAME’s “—preset fast extreme” and “—preset insane” settings result in MP3s that sound so good to me I’m not sure playing with command-line AAC as an MP3 alternative makes sense. Therefore, of course, I’m going to play with command-line AAC. ;-)
The playing is easy, thanks to the lossless FLAC files being already present on drive, which is the main point of this unending entry.
If the difference between LAME MP3 and FAAC AAC is clear to me, I’ll come back and report my preference.
2005-02-27 update:
I see Scott provides flaac, a free Applescript droplet that gives Mac OS X users a convenient drag-‘n-drop way to down-encode FLAC files to 150kbps AAC. As of its v0.5.1, it’s using a provided binary of flac 1.1.1 and faac 1.24+ (Jan 14 2005) UNSTABLE, setting the faac quantizer quality to ‘-q 150’ in flaac.app/Contents/Resources/Scripts/Application.scpt. Thanks, Scott.
2005-03-14 update:
I found Caleb’s etree-scripts today as I sought a scripted way to convert downloaded SHN files to something else, either FLAC or MP3. (SHN files are encoded using shorten, a lossless format that preceded FLAC and is apparently still in wide use.)
The etree-scripts include flacify [“converts a directory of SHN (or FLAC) files into a well-tagged set of FLAC files”] and shn2mp3 [“converts a directory of losslessly-compressed audio files (SHN or FLAC) into a directory of lossily-compressed audio files (MP3 or OGG) with useful tags”].
At first glance, these scripts look terrific. More playing! Thanks, Caleb.
2005-12-03 update: Two other scripts I’ve recently found useful:
Luke Mewburn’s flactoogg for converting FLAC to Ogg Vorbis
Aaron Gyes’ fixflac.sh for reencoding FLACs from the maximum compression setting I’d encoded them with (8) down to setting 2.
Supposedly the latest firmware for my new Cowon iAudio X5L can now handle FLAC compression setting 8 whereas it couldn’t before, but I think I’m hearing smoother playback at setting 2. The savings in FLAC filesize at tighter setting 8 relative to setting 2 is pretty small, anyway.
2005-03-28 update:
That an iPod won’t play FLAC directly is a bummer, but not a huge one for me because I don’t listen to lossless from the iPod much anyway; its hit to battery life relative to MP3 or AAC is significant. (I’m still looking for a superclean way to transcode FLAC to Apple Lossless, nevertheless, in case I decide I want it later.)
That iTunes won’t play FLAC directly for me in Mac OS X is unfortunate, but not really a problem because numerous other Mac OS X players will play FLAC directly: MPlayer, VLC, MacAmp Lite X, and in the X11 layer, xmms. For playing from the command line, both MPlayer and flac123 work. [2005-12-03: Now there’s a new kid on the block, Cog.]
So far I find MacAmp Lite X to be my preferred FLAC player, even though it’s a defunct product, because it stutters not at all on my 667MHz G4 PowerBook whereas the others do, a little. Also, being an Aqua-layer app, MacAmp Lite X’s output can be piped through Audio Hijack Pro for enhancing audio bliss just as I do with iTunes’ output.
In fact, I’m listening to Mahler 10 flacs now in MacAmp Lite X piped through Audio Hijack Pro. Oh yes. Ahhhh …
2005-04-04 update:
Richard Akerman provides a rich resource of music links for further exploration. Most are news to me. Cool! [Of special note, Richard points out that Smithsonian Global Sound provides traditional world music in both MP3 and FLAC formats.]
2005-11-17 update:
The fact that my 4G iPod can’t hold a charge overnight, even with a brand new battery, has me exploring non-iPod music player alternatives for the first time.
I really want to put my hands on one of these, the Cowon iAudio X5L, available in 20GB, 30GB, and (I think) 60GB models. (The “L” designates the long-play version of the X5 models with a higher-capacity battery, rated at 35 hours.)
A standout feature for me, besides the long battery life: the iAudio X5 can play FLAC (and Ogg Vorbis) directly.
Here’s an interesting review, another, and another.
2005-11-30 update:
The Cowon iAudio X5L? Done.
Whoa. I love this thing. It’s most assuredly not for everyone, but my first impression is, it’s like it was custom-designed for me.
Related: How to play my purchased Audible.com .aa files on an X5L?
Rich to the rescue with these instructions! (requires a Win box and one of the three available device activation slots from your live Audible.com account)
Riffing on these intructions, I’m successfully using dBpowerAMP to convert directly from .aa to .ogg using its free Pentium4-optimized OggVorbis-aoTuV-SSE2 codec using Vorbis quality 2, which results in the same 35kbps bitrate .ogg output as the .aa input file. Sounds excellent, no artifacts.
Conversion speed on a 3.2GHz WinXP Pro box is ~90X real time!
2006-04-25 update:
Rockbox, “an open source replacement firmware for mp3 players,” lets several models of iPod play FLAC and Ogg formats that factory iPods can’t. (Rockbox is available for many makes and models of player.)
I installed the 20060404 Rockbox iPod build on an iPod 4G Grayscale and it indeed works, apparently well. Result is a dual-boot iPod: boot into Rockbox, or hold the Menu key and boot into the original iPod OS (though when booted into the original, my display is mirror-image reversed). I haven’t really tested this Rockbox’d iPod with hard use, pleased as I am with my sturdy iAudio X5L. But however you slice it, this Rockbox expansion of an iPod’s functionality for free qualifies as amazing. Thanks, guys.