On Tue Oct 7 12:52:44 BST 2014, dinkypumpkin wrote:

For TV programmes, vPID is buried in the source of the episode
player page. View the page source and search for "vpid".

Huge thanks for this priceless tip!

For radio programmes, the online player appears to still retrieve the episode playlist and look for the vPID there. So for radio, you would need to do URL sniffing

Yes, the player gets the vPID by fetching this json file:

http://www.bbc.co.uk/programmes/[pid]/playlist.json

So, for this radio show:

http://www.bbc.co.uk/programmes/b04k6p56

it would get this file (open in a Firefox tab):

http://www.bbc.co.uk/programmes/b04k6p56/playlist.json

=> {"vpid":"b04k6p3j","kind":"audio","duration":10800}

Notice the following line:

"legacyPlaylist":"http:\/\/www.bbc.co.uk\/iplayer\/playlist\/b04k6p56"

Does this mean that the default "playlist URL" used by GiP is now a "legacy" option, soon to be retired?

And I want to share an important find here:
Although the .json file states: "readme":"For the use of Radio, Music and Programmes only", I thought I should try it on one of the TV shows mentioned earlier in this thread, that fail to download with GiP via the PID method:

http://www.bbc.co.uk/iplayer/episode/b04jmx7l/
http://www.bbc.co.uk/iplayer/episode/b04jtmbc/
http://www.bbc.co.uk/iplayer/episode/b04jthhv/
http://www.bbc.co.uk/iplayer/episode/b04kk759/

If you take e.g. the link the OP mentioned, the "json" playlist DOES RETURN the correct vpid string:
http://www.bbc.co.uk/programmes/b04jmx7l/playlist.json
=> {"vpid":"b04jmwzz","kind":"video","duration":5400}

So, in theory at least, GiP could be patched to use this "NEW" playlist URL to access the "vpid" string and hence retrieve the needed stream parameters to feed to rtmpdump...

to retrieve the stream parameters you could use to construct a rtmpdump command line.

You'd have to agree with me that both tasks (manually retrieve the stream details/manually construct a working rtmpdump command for a certain CDN) is beyond the skills of an average GiP user, who just wants to fetch to disk the episode of Eastenders from a fortnight ago. Many windows users are unfamiliar/uncomfortable with a CLI tool like rtmpdump, and wouldn't know what to do with the template commands I provided... Moreover, rtmpdump will get you an untagged flv file with a meaningless string as a file name... I personally know how to proceed further (i.e. remux losslessly to MP4/M4A container, tag with CLI or GUI MP4 taggers), but the average Joe/Jill would struggle...

What my aging mind proposes is that (for an interim crude fix) a new "vpid" option be created, its value would be the string one finds manually via, e.g., the "page source" method you kindly revealed; this option would work alongside the standard "pid "one and the script would be instructed to look for the manually fed value in cases where the standard method of using the (now "legacy") "playlist URL" returns either of these:

<noItems reason="preAvailability"/>
<noItems reason="postAvailability"/>
<noItems reason="noMedia"/>

If no "vpid" value, then it would proceed to display the standard error message:
WARNING: No programmes are available for this pid with version(s): default'

So, I envisage this working command:

get_iplayer --type=tv --pid=b04jmx7l  --vpid=b04jmwzz  --modes=flashvhigh

(This request is addressed not only to DP, but to any list member with Perl writing skills - I totally lack those; and you can't teach new tricks to an old dog :-) ). To communicate to the average Joe/Jill that a new "patched" version of GiP has been created is another difficult task - many are oblivious to the existence of this list and/or SP's support forum...

Sincere greetings,
Vangelis.

_______________________________________________
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer

Reply via email to