IPhone H.264 version

On the 7th of March 2008 the BBC launched an iPhone compatible version of their web-based iPlayer service. Visitors to the BBC's iPlayer site using an iPhone would be presented with a slightly tweaked interface, but, crucially, where visitors to the site using a desktop web browser saw an embedded Flash Player using the RTMP protocol, iPhone users would see an embedded Quicktime player streaming H.264 video (referred to by iPlayer as MP4) over a normal HTTP protocol. This is the current method used by download scripts.

Contents

Note: As of the 10th December 2010, this process no longer works as the connection to the stream download is negotiated over TLS requiring a client certificate found only in iOS versions 3 and above. This also means older Apple devices not running updated version of iOS are prevented from using the service.

The process for requesting the H.264 video is as follows:

Video page is requested and a "BBC-UID" cookie is set, containing the URL-encoded User-Agent string of the browser.

The video URL then 302 redirects to a much more complex URL. Save that URL.

Then request that URL with "Range" of "bytes=0-1" to get the "Content-Range" header back, containing the full byte length of the video.

Step through the video length, using the "Range" header, from zero (or from the existing size of a partially downloaded file), in steps of under 70MB, until the download is finished, appending to a file with a .mp4 extension.

4. In the XML page that opens, find the section (a.k.a. "media element") containing the attribute service="iplayer_streaming_http_mp4", then find the href attribute of the connection sub-element. This is the URL. For example: