Monday, 11 February 2008

Working again : redirection quirkies

One of the tricks to making this work is finding the correct url for the Flash Video flv to pass into the player.

Typically youtube tell you it's something like
  http://chi-v62.chi.youtube.com/get_video?video_id=8EyOlP9IyFg

Where the subdomain of youtube.com and the video_id are variable.

This is easy - pop .flv on the end and it's what you need to feed into the Flash client.

However sometimes youtube tell you it's
  http://cache.googlevideo.com/get_video?video_id=8EyOlP9IyFg&origin=chi-v62.chi.youtube.com

which contains the same data, but needs to be monkey'd with to reconstruct it into the correct form.

Then over the weekend we found another variation:
  http://chi-v304.chi.youtube.com/get_video?video_id=f4RWiK_cjjs&signature=xxxx.xxxx&ip=x.x.x.x&ipbits=16&expire=1202749500&key=1

which again contains all the interesting information, plus a load more.

Note: the signature and ip values have been blanked.

There are almost certainly more. This is the sort of rubbish you shouldn't have to deal with when using an API. Except what we are doing is not actually something made available via an API.

GoogleTube let you embed the video into your own webpages but only if you use the GoogleTube flash player. I'd love to do that, except it doesn't let you find out when the video has finished playing and thus makes providing a constant stream of videos near impossible.

So we need to use a custom flash player, and that requires the flv urls to be in a specific format. A format you can work out, but not take directly from any API or feed. Bah.

Saturday, 8 December 2007

BBC 6 Music

Sex^^^Six Music from the BBC

http://minty.org/player/

Added BBC Six Music as the third option for video radio.

Thursday, 29 November 2007

0.2 speed and choice

we're running faster now, so the songs played on the radio show up in video a lot quicker than before.

and we've added BBC Radio Two into the mix

http://minty.org/player/

FIXED: Just found a new bug - when it says "...
played on radio 6 hours ago" what it more likely means is "The cached version you're seeing was first seen about 6 hours ago". Either that or the Last.fm feed updates from the BBC have got stuck again ...

Wednesday, 28 November 2007

alpha

much to do, provided YouTube don't switch us off first.

tracks what BBC Radio One is playing (last.fm) and picks a YouTube video for each song played. Then shows them in a continuous stream of video.

http://minty.org/player/

and a few bugs and improvments still to squish.

don't forget to fullscreen the flash player!