BBC iPlayer on GNU/Linux without Flash using only free software (2008)
**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.
Published: Sat Mar 08 2008 10:59:06 GMT-0500 (Eastern Standard Time) by Dr. Matt Lee