nonstandard dot net

It's slightly ridiculous, but I have to confess that I've only recently discovered Hype Machine. I've been aware of its existence for a while, but my previous attempts to use it always met with failure. The flash player didn't work right on my old laptop, and the HM iTunes link never has and still doesn't work properly for me. With those functions unavailable, I didn't see a compelling-enough reason to use the site.

But, spurred by references to it in an Unfogged thread, I gave it another shot, got the flash player to work, and found out that it's unbelievably great. There's one major downside, though: I seem to run into buffering problems with the player on a pretty regular basis. This is an infuriating way to listen to music, and particularly bad when I try to use the app through the Wii web browser (the console is hooked up to my stereo, after all — in theory, this could make for a great at-home radio station).

The HM flash player uses the open-source XSPF Music Player, so I'm optimistic that I'll be able to crack it open and implement some more stringent buffering. Unfortunately, my initial explorations revealed that the site uses some irritating redirects and is going to require me to do stupid things like fake my HTTP referer and user agent string. I realize that's gibberish to many of you, but trust me when I say that it's totally lame.

So it may be a little while before I really get my hands dirty with this project. In the meantime, I can't resist posting these two tracks, both of which I'm a little obsessed with (the latter despite not really liking CYHSY):

Modest Mouse – Dashboard
Clap Your Hands Say Yeah – Mama, Won't You Keep Those Castles In The Air & Burning?

Comments

it's just been recently that I've run into buffering problems, too - only within the past few weeks. Annoying. Either way, it's been a great resource.

 

Some of the new CYHSY is reallyreallyreally good... Some of it is crap. But, yeah, this song is incredible. And "Goodbye to the Mother & The Cove." And "Emily Jean Stock." And have you heard "Five Easy Pieces"?? Just pretend "Satan Said Dance" and "Love Song No. 7" don't exist, and it's an amazing, totally dreamy second album.

 

This app is really popular, so if you could make a dent in the buffering problems many people will benefit from it.

Do you have any reason to think the buffering issues aren't global to all Flash MP3 players?

 

Lucas: no, I don't. The HM's use of the Coral CDN might play a factor, but it seems most likely to me that it's just that the flash buffering needs to be bumped up a little from its default. When I searched its code the XSPF player appeared to not alter the buffer size at all, and so just used Flash's default. I'm no actionscript expert, so I may be missing something, but it seemed pretty straightforward.

I don't think that Flash will let me get under the hood *too* much. The docs make it look like you can change the buffer size, detect the number of bytes currently loaded from a streaming source (and that source's total size), and that's about it. But within those constraints I hope that a couple of things can be done:

- I hope to add a param that lets users increase the default buffer size when they embed the player. That change should be trivial (I'm kind of surprised that it doesn't exist already).

- After that, I may have a look at preloading tracks and altering the playlist order based on which files are complete/downloading fastest/still exist at all. As I mentioned I'm a relative idiot at Flash, but the AS Sound object seems pretty straightforward.

 

Raising the buffer size sounds like a good thing.

I wonder if it's possible to do this automatically, so that a stuttering stream automatically grows the buffer? This would be something like TCP slow start.

 

It's an interesting question. I'm afraid it would take a real Flash expert to answer it. I wouldn't be surprised if the buffer size was only paid attention to when instantiating a Sound object.

In any case, I've got a first pass at the variable-buffer XSPF player done, but I need a throttled mp3 source to test it. Unfortunately, it looks like this will be kind of a pain in the ass -- I think that recompiling Apache to install the cband module is the most efficient way to do this (neither of the machines I have Apache on have apxs2 insalled). If you have any other ideas, please let me know. I suppose I could just have Flash spit out a bunch of diagnostic data as it runs, but I'd prefer to actually use it against an mp3 source for the test.

 

Post a comment