opensourcejason.info
icy metadata in mce

ICY Metadata in XP Media Center Edition
2006-12-31

We've gotten a new "living room PC." Since it came with Windows XP MCE pre-installed, we've been playing around with all of its features. The interface is really nice, clean, and snappy. It's unfortunate that I don't like Windows, because this is a really good interface. Unfortunately, it still suffers from lack of easy flexibility. There's also one thing that's really bugging me... there is no way for Windows XP MCE or WMP to get title information from shoutcast streams!

I'm looking into doing this. You can find more information here.? I'm considering writing a WMP plugin to do this, although I don't know how difficult it will be. I assume that the plugin architecture use a "filter" approach that would allow me to create a parser to pull out metadata from the stream before passing the mp3 stream to the actualy player component. The plugin would need to do the following:

  1. Intercept requests to play pls or m3u files
  2. Add "ICY Metadata: 1" to the HTTP GET headers.
  3. Parse the icy-metaint from the HTTP response headers.
  4. Begin the stream
  5. Every icy-metaint bytes, parse metadata (first byte is length/16)
  6. Update WMP with title/artist info.

There might be an easier way than writing an in-line plugin. Perhaps I can write a background element for MCE that does the following:

  1. Polls the current playing track every few seconds to see if its a stream
  2. If it's a stream, try requesting it with ICY Metadata: 1 header
  3. Parse the response. If there's a title in the response, update the WMP info.
    1. My big question: Is it possible to force the change of what's displayed in the now playing box?

Here's my simple python script Δ that will get the meta data for what's currently playing on Groove Salad. I made it based on the info found here.


Comments

Add Comment 
Sign as Author 
Enter code 897