IPhone H.264 version

31pages on
this wiki
Add New Page
Talk27 Share

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

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.

Overview of video request process Edit

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:

  1. Video page is requested and a "BBC-UID" cookie is set, containing the URL-encoded User-Agent string of the browser.
  2. Find the version_PID for the episode from{PID}. This is found in the form <item kind="programme" duration="[duration]" identifier="[version PID]" ...
  3. Request{PID}?{RAND} where {PID} is the programme's version_PID and {RAND} is a random number, although the random number is apparently unused by the service (so in practice the suffix ?{RAND} should be omitted). This URL (and all subsequent requests) must have:
    1. The Quicktime User-Agent header: "Apple iPhone v1.1.1 CoreMedia v1.0.0.3A110a"
    2. The BBC-UID cookie
    3. A "Range" header of "0-1"
    4. "Accept" header of "*/*"
  4. The video URL then 302 redirects to a much more complex URL. Save that URL.
  5. 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.
  6. 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.

The finished file should be a playable, unencrypted video.

Alternative Method Edit

Follow the above steps replacing steps 3 and 4 as follows:

   3. In your browser's Address line, type{version PID} where {version PID} (a.k.a. the identifier) is the 8-digit character string in identifier={version PID}.

   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:

<media kind="video"
        encoding="h264" >

Example HTTP headers sent by an iPhone session Edit

Accept: */*
Cookie: BBC-UID=74a79c638cbe4c2d416e453f70f0dcf063d0b78d20c0c1d4843ffaaf85b17c9c0Mozilla%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%2e0%20Mobile%2f4A93%20Safari%2f419%2e3
User-Agent: Apple iPhone v1.1.4 CoreMedia v1.0.0.4A102
Connection: close
Range: bytes=0-1

This is then followed by a redirect response and the client creates another request to the actual media location:

Cookie: BBC-UID=74a79c638cbe4c2d416e453f70f0dcf063d0b78d20c0c1d4843ffaaf85b17c9c0;
User-Agent: Apple iPhone v1.1.4 CoreMedia v1.0.0.4A102
Connection: close
Range: bytes=0-

Timeline of BBC updates to iPhone interface Edit

This seems to have stabilised and the current method of requesting video is at the top of the page.

View the page history for this section if you want to see all the fun hoops the BBC made us jump through for a while.

Notes Edit

Various methods for downloading from iPlayer have been developed, including get_iplayer at which has versions for Windows 95/98/ME/XP, Linux/Unix, and Mac OSX.

As of March 10 2010, get_iplayer has been withdrawn and is no longer available on the website ( It has been forked here: and here

RTMPdump.exe v2.1d for Windows 95/98/ME/XP remains a viable option for downloading the RTMP stream which the iPlayer uses for streaming its H.264 highest quality feeds (MP4 in an FLV wrapper). See:

RTMP Method

Details from Media Selector page -

1. Details that never change:
set protocol=rtmp
set port=1935
set application=a1414/e3

2. Contents of authString (as, av & te never change):
set as=adobe-hmac-sha256
set av=1
set te=connect
set mp=bbc7/secure_auth/modem/__________.mp4,bbc7/secure_auth/______________.mp4
set et=__________
set fmta-token=_____________________________________________________________

3. The Playpath (mp4 URL)
set identifier=mp4:bbc7/secure_auth/RBN2_bbc7_-_________________________.mp4

rtmpdump --protocol 0 --host %server% -a %application%?as=%as%&av=%av%&te=%te%&mp=%mp%&et=%et%&fmta-token=%fmta-token% -y %identifier% -o output_mp4.flv

1. Contains only details from the Media Selector page.
2. Must be run from a PIF with Initial Environment of 1024 KB.
3. Suitable only for downloading an RTMP (not HTTP) stream.

Also on Fandom

Random Wiki