Jibble News Archive

Back to 2008-03

BBC iPlayer DRM hack

BBC iPlayer has been available for a while now, but there have been a few things I still don't like about it. The iPlayer client started off as a Windows-only application that rather covertly stole lots of your bandwidth by installing a peer to peer network client which remained running even when you weren't using iPlayer. Crappy digital rights management meant that you could only watch downloaded programmes for a certain amount of time, and even then, things would tend to break and you would have to download everything again in order to watch it. After a while, they started to let you stream programmes directly from their website without needing to install this junk, but the quality was not as good.

Fortunately, a few days ago, the BBC made iPlayer available to iPhone users. The video quality is much nicer, and it doesn't contain any of that wanky DRM bollocks. The BBC iPlayer website currently determines whether you're using an iPhone by looking at the User-Agent header that the web browser sends to the server each time it makes an HTTP request.

So, using Firefox and Chris Pederick's User-Agent Switcher, it is possible to trick the BBC iPlayer site into thinking that you're using an iPhone, thus giving you access to the better-quality DRM-free downloads.

Spoofing the iPhone

Set your browser's User-Agent to something that looks like an iPhone:

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

Now have a look around the BBC iPlayer website and find your favourite episode of Eastenders...

The next bit is slightly awkward. Firefox will want to open the video within the browser using something horrible like Apple Quicktime, but all we want to do is download the video so we can keep it forever (remember, its DRM-free!). I made the following piece of JavaScript which will create a new web page that contains a direct download link for the video. Simply redirecting to the video URL makes the browser try to play it, so you'll need to right-click on the URL and use "save as". The default filename will have a ".htm" extension, so rename the whole file to something meaningful and give it a ".mp4" extension instead.

Downloading the DRM-free video the easy way

To make it easier to use the JavaScript, you can save it as a bookmark and keep it to hand on Firefox's bookmarks toolbar. This is the code you'll need to bookmark (all on one line):

javascript:window.location = 'data:text/html,<p>Download the video with <a href="' + document.getElementById('mip-flash-player').getElementsByTagName('object')[0].firstChild.value + '">this link</a> (right-click, save as, rename with .mp4 extension)</p>';

So now it's trivial to get hold of DRM-free content from BBC iPlayer:

  1. Install User-Agent Switcher.
  2. Add a new User-Agent string to Firefox so you can pretend to be an iPhone.
  3. Go to the iPlayer site with your iPhoney browser and find something worth watching (hint: Eastenders).
  4. Click on the special JavaScript bookmark shown above.
  5. Right-click on the link it gives you and save it somewhere, giving the file an ".mp4" extension.
  6. Finally, play the video (as often as you like!) using VLC.

12 Mar 2008 - 13:04:17 PDT
[Permanent link]

 

Search this site

 

Copyright Paul Mutton 2001-2013
http://www.jibble.org/
Feedback welcomed
email

~
Dreamhost
Web Hosting

~
Dreamhost
Web Hosting