**Please note. This will only work if you’re in the UK. **
A bit of background to this. The [BBC is funded by every single household](http://www.bbc.co.uk/info/policies/charter/) with a TV in the UK (except old people). [iPlayer](http://en.wikipedia.org/wiki/BBC_iPlayer) is a platform for watching BBC shows you’ve missed. Initially iPlayer was Windows XP only, and [we had a protest about it in London and in Manchester](http://defectivebydesign.org/iPlayerProtest). Then, they released a Flash version, but as [Flash isn’t free software](http://exploringfreedom.org/2007/09/05/open-letter-to-adobe-release-flash-under-the-gnu-gpl-today/), users of free software operating systems were still left in the cold. Ashley Highfield estimated there were 400 GNU/Linux users in the UK, and [was proven badly wrong](http://www.bbc.co.uk/blogs/bbcinternet/2007/11/linux_figures_1.html).
A few days ago, they [launched an iPhone version](http://www.bbc.co.uk/blogs/bbcinternet/2008/03/bbc_iplayer_on_iphone_behind_t.html), even though they’ve still not released a GNU/Linux version.
You’ll need:
* Iceweasel, GNUzilla or Mozilla Firefox
* User Agent Switcher
* Firebug
**Finding the stream**
Add a new user agent by going to Tools > User Agent Switcher > Options > Options
The first field, Description – enter something useful here, like ‘iPhone’.
In the next field, paste this “Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3″ (without the quotes)
Click Ok, and then Ok again.
Head over to http://bbc.co.uk/iplayer/
Bring up a show, and enable Firebug from the Tools menu. A frame will appear at the bottom of your browser window. Click ‘Inspect’.
Hover over the player window, in the bottom frame ‘<object width=”512″ height=”288″ type=”video/mp4”>’ will be highlighted.
Expand this element by clicking ‘+’
You’ll see something like “http://www.bbc.co.uk/mediaselector/3/auth/iplayer_streaming_http_mp4/b00937tc” – copy this.
**Downloading**
Fire up a Terminal, and type…
> wget –user-agent=”Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3″ http://www.bbc.co.uk/mediaselector/3/auth/iplayer_streaming_http_mp4/b00937tc
**Playing**
You’ll get an MP4 file which you can play in VLC, Totem, etc. No DRM. You might want to rename it to something sensible.
[Gnash](http://www.gnu.org/s/gnash/) is a free software plugin for Flash. If you’re not already using it, please take this time to download and use it instead of Flash.
**Update**
Paul Completelymadeupname sends this:
Thanks for the instructions on how to download items from iPlayer. It works really well.
I do have one comment. I notice I’m getting around 300kBps on downloads.
It occurs to me that this download rate is way in excess of the rate an iPhone would pull and might both upset the BBC by stressing their bandwidth,encouraging them to crack down on it earlier than they otherwise might and provide a method of detecting the process.
I downloaded a 30 minute episode of a program and then divided the bytecount by the number of seconds in 30 minutes, coming up with 65062.72 Bps. Assuming all files are the same bitrate, I would like to suggest your command example be modified to:
wget –user-agent=”Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a
Safari/419.3″ –limit-rate=65063
http://www.bbc.co.uk/mediaselector/3/auth/iplayer/streaming/http_mp4/b00937tc
This will download the file in real-time, as a streaming iPhone would and hopefully not get up the system manager’s nose by spawning a pipe-maxing download-fest.
Also, someone else in the comments suggests that the User Agent is not required for the downloads. I would suggest using it anyway, as the iPhone would.
No need for setting the user agent with wget – found it works fine without.
That’s interesting. Thank you. I’d like to use this service but since
I’m living outside the UK it’s not possible for me. The same occurs
when I try to watch videos on YouTube. There are many that do not work
here. So I hope they will stop censoring the web. I know, there are
anonymization services like JAP but there are simply too slow and I
don’t want to waste their servers’ traffic.
I just found out about this through the BBC backstage mailing list. I’ve only used Linux and Apple computers for a while now(Mainly Linux).
I’m really glad that there is now a way to download the iplayer files for offline viewing.
I just hope that the BBC don’t do anything to block these downloads
Well it works although in 64bit Gutsy I had to dig into the site code a bit with firebug to find the object so for reference here is where you can locate the stream:
+
+
+
+
+
+
+
+
+
Just click the + next to each of the relevant objects above to expand.
Now playing 2 Pints of Lager and a Packet of Crisps. Video is a little small on my 1920×1200 display but the quality is pretty good.
Alex
Use a javascript bookmarklet to take you direct to the URL without fishing around:
javascript:(function(){url = document.getElementById(‘mip-flash-player’).getElementsByTagName(“object”)[0].childNodes[0].value; window.location = url;})()
Hey, nice workaround! Now we just need to make a handy script for it… Unfortunately, a friend of mine I recently introduced to GNU/Linux pretty much quit because of frustration over the iPlayer and Channel 4’s equivalent.
Does Gnash work with the flash version of the iPlayer? I’ve had pretty mixed results from Gnash and now run the proprietary flash plugin because I hate freedom 🙂
I tried this this morning, I have a feeling that BBC may have changed something. The UA string is valid to view “iPhone Facebook” but there’s no difference anymore on the BBC iPlayer site.
I tried Gnash last month and it was still too flaky to use. MPEG4 is better than Gnash solution, but a truly open video format would be perfect.