Archive for May, 2006

Get It Together, mt-daapd, and Ogg Vorbis

A couple of months ago, I got mt-daapd, the open-source iTunes music server, running at home. I don't use iTunes, but sharing my music collection with Samba or NFS seemed like a lot of overhead. It was very easy to do, and thanks to the Zeroconf/Bonjour/Rendevous support, even easier to use. It was pretty satisfying to fire up Banshee and see my server just pop up in the list without doing anything.

My music collection is a mix of Ogg Vorbis and MP3, which is no problem for mt-daapd, or Banshee for that matter. So I was all set on my Linux notebook. Then I started to look around for a way to connect to the server from Windows. iTunes was out - it doesn't support Ogg, and even if it did, it's too big and proprietary for just this one project. But it turns out that, beyond iTunes, there's not much available on the Windows platform that does DAAP. Even VLC, which normally plays anything you throw at it, doesn't have DAAP support yet.

I did find Get It Together, though, which is an open-source Java DAAP client. It worked great - it found and connected to mt-daapd just like Banshee did. MP3s worked flawlessly, but the Ogg files were grayed out, and wouldn't play.

Kinda makes sense - it's supposed to be an iTunes client, so why would it ship with Ogg support? I decided to get the source and see if I could make it play my precious Oggs.

Step one was to keep the Ogg entries from being disabled in the playlist.  In JavaPlayer.java, I added "ogg" to the SUPPORTED_FORMATS constant, recompiled that class, and replaced the ones in git.jar with the new files. No problems - GIT would now try to play the Ogg files. Of course, it failed. But it was a start.

So next, I had to figure out how to build Ogg support into the program. And here's where I got lucky. GIT uses the JavaZoom SPI to provide MP3 support. This is nifty because it works at runtime - if it's in the program's classpath, then the program can play MP3s just like any built-in format like WAV or AIFF, without caring whether it's an MP3 or not. JavaZoom also maintains a Vorbis SPI, and there are additional ones available for FLAC, Speex, Monkey's Audio, and probably more. (OnJava.com has links to these in an article.)

So I downloaded the Vorbis SPI from JavaZoom, and moved it and its supporting library JARs into Get It Together's classpath. I had to modify the launch script for Get It Together to include these four JARs. And it worked… GIT would now play both the Oggs and the MP3s in my mt-daapd library. Sweet.

This isn't enough to get GIT to include Oggs in its local media library, but since I only need to use it as a DAAP client, I'm happy. And if I ever end up with files in other formats, I'll be able to extend GIT in the same way. Nice to see it all come together like that.


Tags: , , , , , , , ,
Comments (11)

RSS feeds for Pitchfork

I wanted to find an RSS feed for Pitchfork's Best New Music section, but I couldn't find one… turns out they don't have any on the whole site. Thankfully, I found someone who took matters into his own hands. He hosts feeds for a couple of different sections of Pitchfork, generated by a Perl script. Awesome… but the Best New Music section isn't in there. I decided to try to modify his work to generate one for this section as well.

So it worked. Here's the Perl script and the RSS feed itself, which contains all of the reviews listed on this page. I'll set up a cron job to generate it every day.

Update: Never mind. Pitchfork has their own RSS feeds now. Fun while it lasted…


Tags: , , ,
Comments (3)

Bad Behavior has blocked 53 access attempts in the last 7 days.