Download 1080p streams from iPlayer
Way back in 2010, Paul Battley was blogging about device discrimination on the Internet. The new iPlayer service was using TLS certificates to ensure that only specific devices were able to stream media from the BBC's servers.
That's a situation which continues over a decade later. If you watch iPlayer on your laptop, you're stuck with 720p quality. If you want 1080p and above, you need a specially certified device.
Well, that's what everyone thought!
A few weeks ago, I found this curious forum post which said
Yes, iPlayer 1080p is possible, not as simple as just using one of these webUI tools but its certainly possible with youtube-dl and a good look around..
audio_eng_1=128000-video=12000000.m3u8
There wasn't much information about it that I could find. And then I stumbled onto this GitHub issue for youtube-dl
.
With a bit of faffing around, I was able to patch my YouTube downloader (/usr/local/lib/python3.9/dist-packages/youtube_dl/extractor/bbc.py
) with this code:
Python 3
for fmt in formats:
if '-video=5070000.m3u8' in fmt.get('url', ''):
formats = [
{'url': fmt['url'].replace('-video=5070000.m3u8', '-video=12000000.m3u8'),
'height': 1080, 'vbr': 12000,
'abr': fmt.get('abr'),
'protocol': fmt.get('protocol'),
'preference': fmt.get('preference'),
'format_id': fmt.get('format_id', 'hack') + '-really12M',
}, fmt]
(To be clear, this is a horrible hack. It changes the iPlayer download function so it only downloads 1080p. It also doesn't rename the file properly once reconstructed, so you'll have to do that yourself. This is a quick hack - not for production!)
And, with that, I was able to download iPlayer in 1080p.

Sadly there's no surround sound - AAC stereo only.
Learning from history
Back in 2008 (!) I was blogging about the BBC's ridiculous decision to restrict iPlayer streaming to iPhones. And in 2012 I blogged about how the BBC's insistence on using Flash had misfired. The BBC (and, to be fair, the video rights-holders) are desperately trying to avoid their content being shown at high quality on "unsanctioned" devices.
I get that they don't want to lose revenue. But anyone with a USB stick can record HD off air. 4K rips of every movie appear on the Internet 5 minutes after they're released. Trying to restrict who can view your content is a losing battle. It only takes one person to figure it out, and then the genie is out of the bottle.
What's the technical overhead of trying to manage this complicated infrastructure they've created? What is the tangible loss if someone watches a 4K stream from their browser rather than the app?
At some point, surely, media companies will have to realise that making easy access to their content is more powerful than blocking off every creative use. Right?
Bah. I'm off to count the pixels on the latest episode of Doctor Who.
Alex Gibson says:
Of course, you need all the pixels you can get to properly identify the mobile phones in use, technology having converged to the point you have to measure the notch shape exactly.
With the debacle of CBS suddenly yanking Star Trek Discovery rights from the Rest Of The World (Not Murica/Canadia) and now being forced by gigantic backlash to make it available (at specific linear TV style time slots!) on previously unknown to me Pluto.TV service, just maybe content houses may realise that the days of controlling regional access to content are if not over, increasingly hard to justify.
mike says:
get_iplayer can only get What We Do in the Shadows at around DVD resolution so I guess the BBC's licensing of that only allows them to put it on iPlayer at that resolution. Twelve Monkeys is still available on iPlayer and at 1080 with this hack.
Reply to original comment on twitter.com
|Caruthers says:
@edent says:
Jeff says:
Thanks so much!
@edent says:
_process_media_selector
function - immediately before the linereturn formats, subtitles
Caruthers says:
Caruthers says:
@edent says:
Caruthers says:
Kelvin says:
@edent says: