XBMC BBC iPlayer Plugin

I’m sure the BBC won’t approve of this but within the last few days an XBMC plugin for the BBC iPlayer has been released for general consumption. Though it’s far from a finished product, it neatly lists and plays the H.264 encoded iPlayer streams designed for the Apple iPhone.
The BBC’s provision of non-DRM MPEG streams only for iPhone users has sparked widespread controversy not least because they have previously stated and continue to take the line that non-DRM versions can not be made available for legal reasons, meaning those wanting to download and watch iPlayer content are forced to use Microsoft Windows.
BBC iPlayer programmes specify the dates for which they are valid and
whether the programme is available for download at all.In the interest of common decency, the [XBMC iPlayer plugin] should store and honour these
values - deleting programmes once they expire. - Developer of the XBMC iPlayer Plugin
So, just what argument can the BBC come up with to justify referring to projects such as this as ‘hacking’?
The XBMC iPlayer plugin looks like the first step on a promising path toward the British public being permitted to use an actual TV to watch the programming that they’re forced to pay for. Here’s hoping that this trend continues, and sets a precedent for the abandonment of pointless applications of badly executed DRM.
Posted in Rants | Tagged with: anti-DRM, bbc, iplayer, open source, xbmc


May 11th, 2008 at 10:33 am
Hi, Would just like to say thanks, have just installed it and have been thoroughly impressed. Thanks very much for your hard work!
May 12th, 2008 at 11:03 am
I’d just like to point out that i didn’t write the XBMC plugin. PLease forward your love in the direction of this guy
June 9th, 2008 at 9:14 am
Hi,
“The XBMC iPlayer plugin looks like the first step on a promising path toward the British public being permitted to use an actual TV to watch the programming that they’re forced to pay for. Here’s hoping that this trend continues, and sets a precedent for the abandonment of pointless applications of badly executed DRM.”
Kinda of incorrect. You’re not ‘paying’ for the iPlayer. If you don’t have a TV and only use the iPlayer, you don’t have to pay the license fee.
See http://tinyurl.com/66mmok for details
I’m also kind of miffed that this plugin no longer works (according to google code).
June 9th, 2008 at 9:29 am
It’s very interesting to see that the official line is no TV no TV license. It has been suggested in various arenas (one of those being the BBC Backstage mailing list) that the introduction of the iPlayer service is part of a plot to enforce TV licences on anyone who has an internet connection. But this obviously isn’t (currently) the case.
Sorry to hear the iPLayer plugin is b0rked. I’ve never really used it since playing around with it initially. I tend to just use a perl script to dump mp4 streams direct to a share accessible by my xbox. With a bit of work the script can also pull down preview images from the BBC programmes service as they use the same naming convention across both services, but i watch so little TV lately that i’ve not really bothered.
June 9th, 2008 at 9:35 am
update: As of this month it appears that even my method will fail. although it is still possible to freely download the mp4 streams, the BBC have started encoding them so that they can only be played on Apple devices. Make of that what you will.
This from http://beebhack.wiki.com
From early June 2008, the BBC changed the mechanism used to encode their videos for the iPhone/iPod Touch. Although downloading via spoofing still works, the downloaded files will not play on any common desktop software. It is possible that a DRM scheme has been applied to the previously unencrypted H.264 video.
A look at the video file headers suggests that the audio is now encoded by libfaac (1.26.1 unstable). Although no DRM scheme has been formally identified, the most likely candidate is Fairplay, which is built into QuickTime and the iPhone.
In fact the DRM appears to be a simple XOR of a large section of the plain vanilla MP4 with a repeating two-byte pattern. Specifically, the first 0×2800 bytes are unchanged, then the next bytes are XOR’d with values beginning 0×3c, 0×53, 0×3c, etc., then the last 0×400 bytes are unchanged. Just to make things interesting the two bytes immediately before the last 0×400 clean ones are XOR’d with reversed values. So (for example) the file is XOR’d with 0, 0,..(0×2800 times).., 0×3c, 0×53, …. ,0×3c, 0×53, 0×3c, 0×53, 0×53, 0×3c, 0, 0, ..(0×400 times)… To recover the original file, just XOR again with these values.
June 11th, 2008 at 10:56 am
Thanks for the precise description of the encryption, however what is the decoding algorithm for a file with an odd number of bytes in length.
I’ve come up with the following code fro decryption, but not sure what to do with byte n-403
Is this correct?
(i=0;i++<0×2800;ch=get(*in))
put(*out,ch);
(;i<n-403;i++)
{
ch=get(*in);
i++;
put(*out,ch ^ 0×3c);
ch=get(*in);
put(*out,ch ^ 0×53);
}
if (n%2=1)
{
ch=get(*in);
i++;
put(*out,ch ^ 0×3c);
}
ch=get(*in); i++ ; put(*out,ch ^ 0×53);
ch=get(*in); i++ ; put(*out,ch ^ 0×3c);
(;i++<n,ch=get(*in))
put(*out,ch);
June 11th, 2008 at 11:32 am
take a look here