Fix FLAC Files Not Playing on Android
A long time ago I bought an ASUS TF300T Android tablet and have been very happy with it. The only thing that it never did correctly was play FLAC audio files. According to Google, all versions of Android after 3.1 can natively play FLAC files, and since my device runs 4.1 it should be no problem, right? Wrong. Most of my library is in FLAC, and is very well organised with proper filesystem structure, tags and cover art. When I first got the device I dumped a chunk of my library on the device and was surprised to see that all but one album was unplayable. All the unplayable media was listed in the library with “unknown” tags and song lengths of 0:00. The strangest part was that just one album managed to be perfectly fine. It not only played and had the correct tags, but the embedded cover art also displayed flawlessly. I tried to compare the files to find a discrepancy as to why they were not playing, but all the files checked out exactly the same. This baffled me for the longest time until I eventually gave up and just scratched all my music to MP3 just for the device.
A few months later, I had some free time and thought I would take another crack at the problem. This time I thought I would take a more technical approach. Using my trusty FrHed hex editor, I opened a file that would play and a few files that would not so I could compare the files at the byte level. It didn’t take me long to find a single discrepancy that made me literally hit my head against my desk. The files that played had a FLAC tag at the beginning of the file followed by the data. The files that did not play started with an ID3 tag followed by a FLAC tag and then the data. My new theory was that the Android codec did not like ID3 tags in FLAC files. I tested this by removing the ID3 tags from a few other files and lo and behold they played just fine! I tag all of my library with both FLAC and ID3 tags because certain devices and media players liked the ID3 tags better. From now on I just strip the ID3 tags before I put files on my device and everything works fine.
November 27th, 2014 at 11:10 am
You wrote this two years ago, I’m really glad you did. I was completely lost. Thanks