<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>iplayer-dl &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/iplayer-dl/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Fri, 11 Apr 2025 09:11:19 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>iplayer-dl &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Download 1080p streams from iPlayer]]></title>
		<link>https://shkspr.mobi/blog/2021/11/download-1080p-streams-from-iplayer/</link>
					<comments>https://shkspr.mobi/blog/2021/11/download-1080p-streams-from-iplayer/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 26 Nov 2021 12:34:03 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[iplayer]]></category>
		<category><![CDATA[iplayer-dl]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[NaBloPoMo]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=41074</guid>

					<description><![CDATA[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&#039;s servers.  That&#039;s a situation which continues over a decade later. If you watch iPlayer on your laptop, you&#039;re stuck with 720p quality. If you want 1080p and above, you need a…]]></description>
										<content:encoded><![CDATA[<p>Way back in 2010, Paul Battley was blogging about <a href="https://po-ru.com/2010/06/07/device-discrimination-on-the-internet">device discrimination on the Internet</a>. The new iPlayer service was using TLS certificates to ensure that only specific devices were able to stream media from the BBC's servers.</p>

<p>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.</p>

<p>Well, that's what everyone <em>thought!</em></p>

<p>A few weeks ago, I found <a href="https://www.avforums.com/threads/is-there-a-way-to-get-iplayer-content-in-1080p.2319869/#post-29211339">this curious forum post</a> which said</p>

<blockquote><p>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..
<code>audio_eng_1=128000-video=12000000.m3u8</code></p></blockquote>

<p>There wasn't much information about it that I could find. And then I stumbled onto <a href="https://github.com/ytdl-org/youtube-dl/issues/30136">this GitHub issue for <code>youtube-dl</code></a>.</p>

<p>With a bit of faffing around, I was able to patch my YouTube downloader (<code>/usr/local/lib/python3.9/dist-packages/youtube_dl/extractor/bbc.py</code>) with this code:</p>

<pre><code class="language-python">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]
</code></pre>

<p>(To be clear, this is a <strong>horrible</strong> hack. It changes the iPlayer download function so it <em>only</em> 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!)</p>

<p>And, with that, I was able to download iPlayer in 1080p.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2021/11/1080p.jpg" alt="Screenshot of VLC reporting that the video is 1080p." width="1788" height="845" class="aligncenter size-full wp-image-41075">

<p>Sadly there's no surround sound - AAC stereo only.</p>

<h2 id="learning-from-history"><a href="https://shkspr.mobi/blog/2021/11/download-1080p-streams-from-iplayer/#learning-from-history">Learning from history</a></h2>

<p>Back in 2008 (!) I was blogging about the <a href="https://shkspr.mobi/blog/2008/03/bbc-iplayer-on-your-phone-in-4-easy-steps-and-2-hard-ones/">BBC's ridiculous decision to restrict iPlayer streaming to iPhones</a>. And in 2012 I blogged about how the <a href="https://shkspr.mobi/blog/2012/08/itoldyouso/">BBC's insistence on using Flash had misfired</a>. 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.</p>

<p>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.</p>

<p>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?</p>

<p>At some point, surely, media companies will have to realise that making <em>easy</em> access to their content is more powerful than blocking off every creative use. Right?</p>

<p>Bah. I'm off to count the pixels on the latest episode of Doctor Who.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=41074&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2021/11/download-1080p-streams-from-iplayer/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[iplayer-dl on Xbox Xebian]]></title>
		<link>https://shkspr.mobi/blog/2010/04/iplayer-dl-on-xbox-xebian/</link>
					<comments>https://shkspr.mobi/blog/2010/04/iplayer-dl-on-xbox-xebian/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 11 Apr 2010 09:58:46 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[iplayer]]></category>
		<category><![CDATA[iplayer-dl]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[xebian]]></category>
		<category><![CDATA[xNAS]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=1992</guid>

					<description><![CDATA[I&#039;m a huge fan of Paul Battley&#039;s iplayer-dl.  In brief, it downloads videos from iPlayer by pretending to be an iPhone.  The .MP4 files it grabs are suitable for playback on most mobile devices (480 x 272 and stereo audio).  It also downloads radio programmes as .MP3 files.  I was having a bit of trouble installing it on my XNAS - running Xebian Linux, so I&#039;ve written this as an aide-mémoire.  I …]]></description>
										<content:encoded><![CDATA[<p>I'm a huge fan of Paul Battley's <a href="https://github.com/threedaymonk/iplayer-dl">iplayer-dl</a>.  In brief, it downloads videos from iPlayer by pretending to be an iPhone.  The .MP4 files it grabs are suitable for playback on most mobile devices (480 x 272 and stereo audio).  It also downloads radio programmes as .MP3 files.</p>

<p>I was having a bit of trouble installing it on my <a href="https://shkspr.mobi/blog/2008/11/building-the-ultimate-xbox-server/">XNAS</a> - running <a href="http://web.archive.org/web/20100617003825/http://www.xbox-linux.org/wiki/Xebian_HOWTO">Xebian Linux</a>, so I've written this as an <em>aide-mémoire</em>.  I hope you find it useful.</p>

<p>Install Ruby and Ruby Gems</p>

<pre><code class="language-bash">apt-get install ruby rubygems
</code></pre>

<p>Download and install the latest version of <a href="http://rubygems.org/gems/rake">Rake</a></p>

<pre><code class="language-bash">wget http://rubygems.org/downloads/rake-0.8.7.gem
gem install rake
</code></pre>

<p>Download and install the latest version of <a href="http://rubygems.org/gems/mocha">Mocha</a></p>

<pre><code class="language-bash">wget http://rubygems.org/downloads/mocha-0.9.8.gem
gem install mocha-0.9.8.gem
</code></pre>

<p>Download and install the latest version of <a href="http://rubygems.org/gems/iplayer-dl">iplayer-dl</a></p>

<pre><code class="language-bash">wget http://rubygems.org/downloads/iplayer-dl-0.1.19.gem
gem install iplayer-dl-0.1.19.gem &lt;/pre&gt;
</code></pre>

<p>Done!</p>

<p>To download a show,</p>

<pre><code class="language-bash">iplayer-dl [pid]
</code></pre>

<p>To find the pid, visit an iPlayer page like
<code>http://www.bbc.co.uk/iplayer/episode/b00s0vs1/Doctor_Who_Confidential_Series_5_All_about_the_Girl/</code>
The pid is the weird string of letters and numbers before the episode name.  So, in this case, to download the video, you just type</p>

<pre><code class="language-bash">iplayer-dl b00s0vs1
</code></pre>

<p>If you want to download several files using only one command, you would type</p>

<pre><code class="language-bash">iplayer-dl b00s0vs1 b123abc bdef456
</code></pre>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=1992&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/04/iplayer-dl-on-xbox-xebian/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
