More on the BBC iPlayer and RTMP
Phil
There appears to be some work going on to try and get iPlayer working on the XBox Media Center according to this thread on their forums (thanks for the link, Iain) and although it only seems to make progress up to where I did, it does include this comment from Ian Forrester of backstage.bbc.co.uk (a terribly nice chap who I met at XTech 2007 in Paris, and who as it turns out used to DJ at a club I used to go to in Bristol) We’re happy for people to hack around for non-commercial uses.
which is really good to hear.
Additionally, tonight I came across WiidiaPlayer which is built in MTASC, an open-source ActionScript 2.0 compiler written in OCaml
and plays back RTMP streams. Wiidiaplayer is open source and that source is on Google Code. My initial tests haven’t been that successful, but they’ve only been ten minutes long :)
Hi Phil,
Please let me know if you have any problems with WiidiaPlayer, if it’s MTASC you’re having trouble with, it took me a couple of days myself to get it working.
The player part of WiidiaPlayer is nothing more though than what you can build using the FLash IDE; it still won’t allow you to download anything.
The solution to downloading is not that hard though: the WiidiaServer should be able to get you on your way there. The problem is that the wiidiaserver speaks only the server-part of the protocol, and you’d need the client part; still almost all that you need is there.
RTMP (for video) is nothing more than a handshake, a play command from the client, and an flv file hacked into pieces and padded with headers.
Come to think of it: probably the easiest way to save an RTMP stream is just to let it play in the browser, capture the stream into a file (not entirely sure how to do this, I’m sure a little hacking with tcpdump should do the trick), and then using a simple parser to filter out the bits that are flv (most of the code for that is there in the WiidiaServer).
I wouldn’t mind helping you on your way, but as I recall the iPlayer streams are ip-limited to the UK (I live in the Netherlands); still anything I can do, let me know!
Posted by Reinoud Elhorst on December 30th, 2007 at 11:14 amThanks for that Reinoud, some useful information.
FYI, your suggested method of download via playing in the browser and capturing it is exactly how one of the commercial tools I tested, Replay Media Catcher, does it.
The last time I did anything at all in Flash was in 2001, so it’s all very exciting. Still, if the RTMP stream is as simple as you suggest, maybe I should take a closer at the python client I earlier dismissed for incompleteness.
Posted by Phil on December 30th, 2007 at 2:03 pmHi Phil,
This is all very interesting. On the above xbmc thread I saw the entry by Strawp with the PHP script showing how to derive the
RTMP stream URL and thought that it might be fun to create a Firefox bookmarklet that does the same thing.
The resultant bookmarklet works on both the BBC iPlayer page variants (e.g. http://www.bbc.co.uk/iplayer/page/item/aaaaaaaa.shtml and http://www.bbc.co.uk/programmes/aaaaaaaa).
Get it here:
http://mark.mclaren.googlepages.com/iPlayer.html
Posted by Mark McLaren on January 6th, 2008 at 8:14 pmExcellent! I’d planned to turn it into a Greasemonkey script, and you seem to have done all the work for me :)
Posted by Phil on January 7th, 2008 at 10:13 amI shall be deeply, deeply pleased when Gnash can do this :)
Posted by Stuart Langridge on January 21st, 2008 at 7:22 amI tried pulling the curl modifications from Gnash that rob had done, but alas it kept crashing my computer, I didn’t have time to pin it down.
In other words, gnash is probably going to be the only way to do it.
Posted by Gareth on January 24th, 2008 at 5:19 pmBBC just launched an iPhone version with h.264 streaming. Could be workable for xbmc
Posted by Dan W on March 7th, 2008 at 4:43 pmInteresting stuff, thanks Dan.
Posted by Phil on March 7th, 2008 at 5:02 pmI am working on an xbmc universal type plugin to incorporate many streaming video sources, but mostly from flash video sites. I came across hulu.com which also uses RTMP streams to stream their video. I googled and read bits from the rtmp threads at xbmc.org and of course this article you wrote. :) I just wanted let you know that RTMP support on xbmc is wanted for more applications than bbc player, and what’s the xbmc status on adding this? I couldn’t find any kind of definite answer on the forums..
Thanks..
Posted by fx on March 19th, 2008 at 1:20 amIn summary: there hasn’t been any progress at all :)
Posted by Phil on March 19th, 2008 at 10:18 amWe started a RTMP implementation for Python in the RTMPy project and made the first successful connection between the flash player and python a few days ago. This should make it easy to grab streams from iPlayer, or setup your own iPlayer service.
Posted by Thijs Triemstra on March 20th, 2008 at 12:16 am