Sun’s Java MP3 plugin is no friend of ID3 tags

January 13th, 2009

The Java programming environment has a framework for reading audio files, that is extensible and has the ability to to handle new audio formats not originally supported by the standard platform. It turns out that Sun has released a plugin that adds playback support of the popular MP3 audio format. However, a few days back I learned that Sun's plugin doesn't seem to recognize the Bible MP3 files that we sell at Voxbiblia.

When looking into the problem I found out that the audio format identification functionality doesn't play well with the ID3v2 metadata format that we use at Voxbiblia. The ID3 tag enables users to organize our MP3 files into whole books or even whole Bibles on their computers or portable MP3 players, and it even enables them to read the actual Bible text of the passage recorded in a specific audio segment. As you might imagine the ID3 functionality is quite useful, and also close to universally used and accepted in popular playback products such as iTunes and Windows Media Player, so I think that it's kind of strange that Sun's MP3 plugin doesn't at least support it by skipping over the tag is kind of surprising.

However, it is not impossible to do just that yourself. If you open the MP3 file yourself and skip forward to after the end of the tag before you hand over the InputStream to the AudioSystem framework it can identify and decode the MP3 stream correctly.

So, I wrote some code that did just that. It's a little bit more tricky to than you might think, because the ID3 format encodes the tag length information in an unusual format, but other than that the strategy is quite straightforward.

The class can be downloaded here: MP3Identifier.java. Enjoy.

I got my name in the paper!

October 8th, 2008

When I was ten years old someone at Budbäraren, the weekly publication of the christian congregation that I was a member of at the time, did a human interest story on me. I remember the interview clearly, we talked about my interests and she took my picture when I played the violin, took a ride with my skateboard and played in the park. The feeling of seeing my name in print when the article was finally out was nothing short of amazing. Exactly the kind of attention I love.

Today I got a similar feeling, when my business partner Johan was interviewed in Financial Times about our company, Voxbiblia. And he even mentioned my name, next to the title "talented programmer". It feels almost like I'm ten again. Not quite, but close.