How Shibuya.pm (ala Plagger dev community) is awesome

miyagawa on 2007-10-03T21:52:44

On this monday (in Japan time) we had Shibuya.pm Tech Talks #8 and we live-streamed and recorded most talks on ustream.tv under shibuya.pm tag. This ustream.tv listing works great but we want to make the Flash video files available for download, possibly as a videocast (RSS 2.0) feed so you can subscribe to using offline video player like Miro or iTunes.

So we were chatting on #plagger-ja IRC channel and talked how to download .flv files given the ustream.tv URL for the recorded video.

First we already knew how to locate the FLV file URL manually using Firebug. typester (Daisuke Murase) pointed out the flash is accessing ustream.tv's secret RPC 'gateway.php' on their server. So he cracked it down using his custom flash ActionScript, then ported the code into Perl script using AMF::Perl module.

Simultaneously Yappo (Kazuhiro Osawa) tried to integrate the FLV URL locator as a Plagger plugin. Fortunately we already built the pluggable mechanism to do that: Filter::FindEnclosures. So he wrote just 40+ lines of ustream extension for the FindEnclosures plugin.

Also at the same time I was working on how to generate a videocast feed from ustream.tv tag search because it doesn't provide an RSS feed by default. It was way easy using XPath link extractor. The result is availabe as ustream8.xml videocast feed.

All of these were done in less than 45 minutes on IRC. We still had a problem with the actual FLV format because it uses Adobe's proprietary audio codec and doen't play on any of VLC/QuickTime/Perian players. While I was sleeping they found that it could be converted using nelly2pcm program and then ffmpeg. I guess someone would write another Plagger plugin that automatically transcodes ustream FLV into some more generic format like x264.

How amazing!