Faked iPhone BBC iPlayer

    Newer Older

    The BBC have just launched a version of their iPlayer that works with the iPhone (and iPod Touch). Instead of streaming Flash, it streams an MP4... but they don't let non-iPhone users know it's an option. So, I used the User Agent Switcher to set Firefox to claim to be an iPhone, and in place of the normal Flash playback doofer, I got a Quicktime one instead... and nothing much happened. It turns out it's because it won't actually stream, it wants to download the whole thing. That's no problem though, I get 600kb/sec downloads at work =)

    So, I got out Firebug and found the stream; then copied and pasted it into the address bar, and it started downloading to play in Firefox again. Not what I wanted - so I went to Save Page As... and saved the MP4 file. And then realised that I was actually, at this point, trying to download it three times (the original iPlayer window, the new QuickTime-only tab and the download) so I closed everything else, and watched it download the mp4 at the aforementioned 600kb/sec.

    Once finished, I knew it had worked - hovering the pointer over the file in Windows Explorer showed its dimensions (480x272), and moments later an entirely randomly chosen programme was playing in VLC.

    So, who fancies cobbling together some code to automate this, to do what the BBC has failed to do all along - make a reasonable quality iPlayer download service for platforms other than Windows, which lacks DRM?

    Tom Morris, fearghas, technex, and 31 other people added this photo to their favorites.

    View 20 more comments

    1. Irregular Shed 74 months ago | reply

      I'll investigate that later!

    2. strawp 74 months ago | reply

      Yeah, that was me pointing that out. Sending the same cookie that your browser would if it was an iPhone doesn't seem to work. I think Quicktime sends its own headers.

      A packet trace from an iPhone would solve the whole thing I think...

    3. threedaymonk 74 months ago | reply

      I've got round their 'fix' again ... for now!

      po-ru.com/diary/bbc-iplayer-fix-hacked-again/

    4. strawp 74 months ago | reply

      Heh, yours is almost identical to mine, except in Ruby. It's a bit nicer too :P

    5. Irregular Shed 74 months ago | reply

      You gents are both remarkably wonderful - I can't wait to see what the Beeb's next move is.

    6. strawp 74 months ago | reply

      The thing is - it's still authenticating based on the HTTP headers. If an MP4 over HTTP stream exists it's going to be used.

      I still have no idea why the iPhone is allowed DRM free downloads and not everyone else. This directly goes against their charter by actively giving preference over one vendor and it completely contradicts their claims of being "platform agnostic".

      They'll either can it entirely or just leave it like this. Which one they chose depends on what their content providers say about all this, I imagine.

    7. johnwards 74 months ago | reply

      Nice ones guys. I thought it was going to be a javascript test but even then it would have been cracked wide open by the end of the day.

      I think they are fighting a losing battle. I can't think of any way that I would be able to lock it down to iphone only and if it was simple to do such things we would have DRM in the first place.

      Unless they can get DRM from Apple they are stuffed...hoho

    8. Irregular Shed 74 months ago | reply

      If they license FreePlay from Apple, I can imagine the board of governors will be leaned on - why are the BBC licensing two DRM systems at great cost to the taxpayer - sorry, licence payer?

      As strawp says - they're effectively creating an artificial divide. It's like DVD regions - they're used just to treat bunches of people in different places with different amounts of favour.

      What's next? They could ditch the iPhone plans (PR disaster), try and lock down the iPhone service by relying on more quirks (throwing money in a fire), create some sort of app for the iPhone (will get packet-sniffed), or this:

      Open it up. 480x272 MPEG4 files aren't going to impact on DVD sales any more than recording episodes off the telly. Go back to various rights holders, hold up their hands and say, "Look. DRM doesn't work. It will never work. Treat people as adults and they will behave like adults. Everything we're offering is already out there on torrent sites that we can't control, let's give people a decent service that can compare but keeps them away from the shadier stuff."

      It takes that leap of faith; to realise that not everyone is out to pirate everything, to stop thinking of everyone as a criminal by default. Just treat us as grown-ups so we don't have to leap through hoops to get what we deserve.

    9. johnwards 74 months ago | reply

      Its going to be interesting to see their next step.

      They really didn't think about this at all...other than the PR it would generate to launch it on the jebus phone.

    10. blech​ 74 months ago | reply

      strawp said "I still have no idea why the iPhone is allowed DRM free downloads and not everyone else"

      Mobile Safari can't download a file, or save it to a cache, so despite the fact that it's served what (to a computer) is a file, on the iPhone (and iPod touch) it is effectively a stream. Not that this disctinction really holds once you start pretending to be an iPhone, which is where we came in.

    11. Pip 74 months ago | reply

      "They could ditch the iPhone plans (PR disaster)"

      Frankly, given some of the abusive response, if this was a personal project, this is what I'd do.

    12. savocado08 [deleted] 74 months ago | reply

      How can you use the iPlayer service outside the UK? PM me pls! thx.

    13. Irregular Shed 74 months ago | reply

      You can't, not legally at any rate. Illegally you could use a UK proxy.

    14. davidlandy 74 months ago | reply

      strawp, i'm trying your script on a win2003 box and it gets to the download but then stops at 0 bytes. can you help? the output is:

      iplayer_dl Copyright (C) 2008 Iain Wallace iain@strawp.net
      This program comes with ABSOLUTELY NO WARRANTY.
      This is free software, and you are welcome to redistribute it
      under the GPLv3 license.

      Usage:
      iplayer_dl

      Setting cookie to BBC-UID=b4978dce2285826d89d198d2e0b0f314ca2434e510b0f104547fb8
      d1cf0b76450Mozilla%2f5%2e0%20%28iPhone%3b%20U%3b%20CPU%20like%20Mac%20OS%20X%3b%
      20en%29%20AppleWebKit%2f420%2e1%20%28KHTML%2c%20like%20Gecko%29%20Version%2f3%2e
      0%20Mobile%2f4A93%20Safari%2f419%2e3; expires=Fri, 16-Mar-12 08:00:45 GMT; path=
      /; domain=bbc.co.uk;
      Getting meta data from www.bbc.co.uk/iplayer/metafiles/episode/b009hq38.x
      ml...
      Setting PID as b009hq2l, based on versions available
      title: Six Nations Rugby: 2008
      subtitle: Wales v France
      Six_Nations_Rugby_2008_-_Wales_v_France.mov
      Getting: www.bbc.co.uk/mediaselector/3/auth/iplayer_streaming_http...
      09hq2l?344178

      Done. Downloaded 0 bytes

      thanks in advance

    15. strawp 74 months ago | reply

      Hi Walesfan (congrats),

      I've updated the script but I don't think that programme is available in iPhone format.

      Everyone: I've created a wiki for this stuff. There's too many threads to track people's discoveries and bug fixes:

      beebhack.bluwiki.com

    16. davidlandy 74 months ago | reply

      Thanks strawp. What a game!

      :-)

    17. srboisvert 72 months ago | reply

      They have now screwed with the file format. You can download but it doesn't seem to play.

    18. Irregular Shed 72 months ago | reply

      Yeah. The first 0x2800 bytes are fine, and then they're XORed by 0x53 and 0x3C thereafter, except for the last 0x400 bytes; and the last two XORed bytes are out of sequence.

      Somebody sat down and came up with that. I'd love to know how the iPhone knows what to do with it.

      BTW, the up-to-date Beebhack wiki is here: beebhack.wikia.com/

    19. jamieriddell 68 months ago | reply

      Hats Off to you. This is wonderful piece of kit!

    keyboard shortcuts: previous photo next photo L view in light box F favorite < scroll film strip left > scroll film strip right ? show all shortcuts