Most of BBC Radio programmes to become downloadable...

Vangelis forthnet northmedia1 at the.forthnet.gr
Mon Jul 20 16:47:16 PDT 2015


On Mon Jul 20 17:41:10 BST 2015, SquarePenguin wrote:

> I downloaded an episode of Infinite Monkey Cage
> and it was 70MB for 27 min and 51 seconds.

Yes, you are right! I did my own searching on the net,
since I can't try the app myself, and found many references,
among which this:

https://photos.google.com/share/AF1QipMGOd20-aknM1jDC2ZxyNsRFcUClP60u6d5lAntsAZX7LHnALK57ctiggahguE3rg/photo/AF1QipOLkkG8am2tH6y59VqNInMg-_Bch7VDFHYJNeFR?key=VTctMUJrMm50c1VjQ2NTVU14bkcwMGVHWUgyMHBB

So it's ~ 140MB/hour; but they promise to offer
smaller files later in the year:

https://media.info/radio/review/bbc-iplayer-radio-app-v2-sets-the-standard#2032

The high bitrates launched initially are to coincide with Proms 2015 
coverage...

>  An uneducated guess is that the bit rate would
> therefore probably be 320kbps or thereabouts.

Spot-on! (see my analysis below...)

On Mon Jul 20 17:13:45 BST 2015, I wrote:

> can you perform some kind of URL sniffing
> on your tablet/smartphone to possibly reveal
> the download URLs template for those new
> (drm'd) audio downloads?
> I'd like to take a look at their specs,

Well, I couldn't "lay my hands" on the iOS app,
but I did manage to grab a copy of the Android app
and store it onto my Win32 laptop via:

http://www.apkpure.com/bbc-iplayer-radio/uk.co.bbc.android.iplayerradio

(thank you apkpure.com !)

Then I unzipped the .apk file and probed its contents...
Lots of interesting stuff to be found inside,
among which a working/valid NitroAPI key the
app uses to gain access to the new Nitro indexing database...

 Also, by loading the following URL in your desktop browser
http://polling.bbc.co.uk/appconfig/iplayerradio/tablet/android/2.0.0/info.html
you can get a quick glimpse of the app's GUI!

But what I was after was the URLs employed for the DRM'd downloads
- as it turns out, on Android devices they use a new type of "mediaset"
called "android-download-high"; the actual URL tempate is of the format:

http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/vpid/[vpid]/format/json/mediaset/android-download-high/proto/http

which yields a JSON file; [vpid] is the actual "version PID" string that
corresponds to a radio show's PID string.
For simplicity, I will substitute the above URL with a simpler one,

http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/android-download-high/vpid/[vpid]

which produces the same data, but in XML format.
Today's episode of TIMC is found at
http://www.bbc.co.uk/programmes/b062jy94
pid=b062jy94
http://www.bbc.co.uk/programmes/b062jy94/playlist.json
reveals that (for "Original" version) vpid=b062jwx6
Then,
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/android-download-high/vpid/b062jwx6
(when loaded from a UK IP) reveals:

<media bitrate="320" encoding="aac" expires="2015-08-19T16:00:00Z" 
kind="audio" media_file_size="1817" 
service="download-uk-audio_download_drm_aac_high" 
type="audio/mp4"><connection 
href="http://aod-mspr-uk-live.edgesuite.net/mod/af_mp4_aaclc_320_jit_playready/l2o/b062jwx6_7045d8bf-f786-420b-9e18-6e50465481c5.ism/MANIFEST" 
priority="10" protocol="http" supplier="mf_akamai_uk_smooth_notok" 
transferFormat="smooth"/></media>

where you can see the indicated bitrate is indeed:
media bitrate="320"

Noteworthy is the "connection href" URL;
this does not point to a standalone DRM'd MP4 file,
but rather to a "Smooth Streaming" manifest file.
"Smooth Streaming" is a method of chunked delivery
over HTTP, initially developed by Microsoft to be
used by their proprietary Silverlight browser plugin.
Visit http://alexzambelli.com/blog/smooth-streaming-faq/
to read more...
"playready" in the URL denotes the type of DRM
encryption used (https://en.wikipedia.org/wiki/PlayReady).

If you download the manifest file onto disk
http://aod-mspr-uk-live.edgesuite.net/mod/af_mp4_aaclc_320_jit_playready/l2o/b062jwx6_7045d8bf-f786-420b-9e18-6e50465481c5.ism/MANIFEST
and open it with a text editor,
you can plainly see the file's specs
that I was after:
Bitrate="320000" SamplingRate="48000" Channels="2" BitsPerSample="16" 
PacketSize="4" AudioTag="255" FourCC="AACL"
plus you'll see that the actual end download
is the product of the concatenation
of 302 chunks, each lasting 6.4sec
(read more at:
https://msdn.microsoft.com/en-us/library/ee673438%28v=vs.90%29.aspx )

Regards,
V. 




More information about the get_iplayer mailing list