Kodi Community Forum
[RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) (/showthread.php?tid=51322)



- exobuzz - 2010-04-27

I've been modifying a version of get_iplayer to handle the akamai and limelight urls properly. Making some progress.. <3 wireshark (so i can see what the actual iplayer is sending etc)

[edit] well I thought I was on to something. As far as I can tell i'm sending the right information back but still having authentication problems with akamai. limelight is working fine though.


- Bagger - 2010-04-27

spicemuseum Wrote:What platform are you using Bagger, is it a linux box with get_iplayer and an xbox with iPlayer pointed at it (like mine) ?

Its a XBMC Live 9.11 final install (basically a minimal Karmic install with XBMC auto starting )
The March version in my case works no differently to this April release.


- spicemuseum - 2010-04-28

Bagger Wrote:Its a XBMC Live 9.11 final install (basically a minimal Karmic install with XBMC auto starting )
Presumably using get_iplayer as a back end in the same machine?
Bagger Wrote:The March version in my case works no differently to this April release.
Noted.


- Bagger - 2010-04-28

spicemuseum Wrote:Presumably using get_iplayer as a back end in the same machine?
Noted.

Sorry should have mentioned I used exobuzz's get_iplayer fix, improvised a few bits to make it run on the live install. Originally on the March version of the IPlayer plugin


- exobuzz - 2010-04-28

I wonder if there is something a bit wrong at the bbc end with authenticating with akamai. I've been looking at the data sent from the website flash player to try and work out why I've been getting access denied from akamai streams and it seems the bbc also gets the errors but retries and then it works.

for example the excellent "tropic of cancer episode 6".
Note that the "authString" for this is "auth=dbEdHbibZb4awcfcTcaa6b_a.d0bwdlcDai-bl2bQq-cOW-d0i_-EotEBoCnHDsGsyC&aifp=v001&slist=secure/800kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/400kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/1500kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/480kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/3200kbps/Tropic_of_Cancer_Episode_6_b00s7gdw" and the identifier is "secure/800kbps/Tropic_of_Cancer_Episode_6_b00s7gdw"

The flash player sends
Code:
app: ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=dbEdHbibZb4awcfcTcaa6b_a.d0bwdlcDai-bl2bQq-cOW-d0i_-EotEBoCnHDsGsyC&aifp=v001&slist=secure/800kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/400kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/1500kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/480kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/3200kbps/Tropic_of_Cancer_Episode_6_b00s7gdw
swfUrl: http://www.bbc.co.uk/emp/10player.swf?revision=18182_18346tcUrlrtmp://92.123.153.110:1935/ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=dbEdHbibZb4awcfcTcaa6b_a.d0bwdlcDai-bl2bQq-cOW-d0i_-EotEBoCnHDsGsyC&aifp=v001&slist=secure/800kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/400kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/1500kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/480kbps/Tropic_of_Cancer_Episode_6_b00s7gdw;secure/3200kbps/Tropic_of_Cancer_Episode_6_b00s7gdw

pageUrlNhttp://www.bbc.co.uk/iplayer/episode/b00s7glt/Tropic_of_Cancer_Laos_to_Hawaii/

then after rtmp handshaking the akamai sends back an "access denied", and the flash sends another request this time using parts of the authString but using the identifier for the slist - and with a new authentication key

Code:
app: ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=dbEcMducsdebIc0cOcFaqaaawaxbaahaYcz-bl2bQG-cOW-d0i_-JqlFIqAoJDpGnyD&aifp=v001&slist=secure/800kbps/Tropic_of_Cancer_Episode_6_b00s7gdw

swfUrl: http://www.bbc.co.uk/emp/10player.swf?revision=18182_18346

tcUrl: rtmp://92.123.153.110:1935/ondemand?_fcs_vhost=cp41752.edgefcs.net&auth=dbEcMducsdebIc0cOcFaqaaawaxbaahaYcz-bl2bQG-cOW-d0i_-JqlFIqAoJDpGnyD&aifp=v001&slist=secure/800kbps/Tropic_of_Cancer_Episode_6_b00s7gdw

pageUrl: http://www.bbc.co.uk/iplayer/episode/b00s7glt/Tropic_of_Cancer_Laos_to_Hawaii/

The connection then succeeds.

I have tried reproducing the second request, but I get "access denied". Perhaps it does require sending in the first, getting a denied request and then sending in the second. Seems odd though, and seems odd thy the bbc would do this, unless the first request is for old style before their changes (hence the older episodes that still play with some small modifications), and then the second for their new episodes.

Anyone else there playing with this that has any insight ?


- spicemuseum - 2010-04-28

Bagger Wrote:Sorry should have mentioned I used exobuzz's get_iplayer fix
What's that? (I know about Buzz's xbox builds, but not about any get_iplayer fixes...)


- exobuzz - 2010-04-28

I've not done any get_iplayer fixes, I just pointed out that the auth=auth= line should be auth=.

in continuing to my above post, I have seen after the first failure, the flash player gets the second connection details (as far as I can see, as i am looking though a lot of network packets)

http://www.bbc.co.uk/mediaselector/4/mtis/stream/b00s7gdw/iplayer_streaming_h264_flv/akamai

. I will continue to look into this I guess.

using the authString from this url, I can successfully stream from akamai, and using http://www.bbc.co.uk/mediaselector/4/mtis/stream/b00s7gdw/iplayer_streaming_h264_flv_high/akamai works for higher quality. So is the correct process, to use the details first from the main stream list http://www.bbc.co.uk/mediaselector/4/mtis/stream/b00s7gdw and if it is akamai and fails, then get a new auth key from new urls mentioned and try again. Seems a PITA..


- gobbledigook - 2010-04-28

i have let this be for a while as it made my head hurt Wink

i use ubuntu 9.10 and xbmc camelot.

i noticed last night that when i used the plugin it opened multiple instances of rtmpdump and the get_iplayer.cgi, for each stream i clicked even though they didn't appear to play on xbmc... i did get a stream to play after the third attempt (i had to select it twice), but then xbmc froze anyway and i had to kill it from teh CLI, this is when i noticed multiple instances of these precesses running. Also i was using my max upload/download (capped) of 2.5mb down .6mb up. after i killed the xbmc.bin process this bandwidth usage dropped too, but i had to manually kill the extra rtmpdump and get_iplayer.cgi processes as well...

I have a (lack of) memory problem at the mo' but not sure if this caused the lock-up or the bandwidth hogging! Need to pick up an extra gig of ram at the w/e

will try and replicate this tonight... without the lock-up... and see what i can get from the terminal, or maybe see if i can pipe it to a txt file Smile


- spicemuseum - 2010-04-28

exobuzz Wrote:I've not done any get_iplayer fixes, I just pointed out that the auth=auth= line should be auth=.
I would guess Bagger's just using the altered iplayer2.py which you posted and made it into Dink's 25th April release.

@Bagger, if that's correct, note that this has nothing to do with the separated backend get_iplayer.cgi <-> frontend modded iPlayer default.py solution.

Interesting that your results match mine, though. It could suggest a common root failure cause.

Looks like Buzz is getting into wiresharking the issue, so good luck to him in sorting that out, from what he's posted so far it looks like a possibility.


- exobuzz - 2010-04-28

Hi,

Firstly some help for xbox users only.. (mostly).

Please use one of my xbmc builds and this new version of IPlayer (my builds are in the same folder as the IPlayer.zip)

http://malus.exotica.org.uk/~buzz/xbmc/IPlayer.zip

It is locked down to 800kbps akamai h264 streams. xbox can't really do any more than 800kbps h264 anyway, and the limelight streams are rtmpt (rtmp over http) which the xbox build doesn't do. However, it should play the new stuff that hasn't been working.

This build also works on xbmc for linux, with the libRTMP patches. However it's still locked down to akamai and 800kbit, so it may not be that useful. You can modify it to use 1500kbit streams also with some editing, but really I first wanted to get Iplayer working on my old xbox1.

The problem and solution to the new streams, is that the authString provided by the mediaselector url for akamai streams does not work for new items. you have to instead specifically ask for an akamai stream as I mentioned in the urls in previous posts. Perhaps the BBC are half way through migrating to a new system. we shall see.

Please let me know if this works for you xbox users. If a stream happens to not be available in 800kbit on the akamai network, then I guess it won't work, but I think most if not all are.


- Bagger - 2010-04-28

spicemuseum Wrote:What's that? (I know about Buzz's xbox builds, but not about any get_iplayer fixes...)

Could have sworn it was mr exobuzz that posted how to use get_iplayer to fix the xbmc live IPlayer plugin. some of it was cached on google, thats what I used.

Cant find it now its not there any more.


- dratstab - 2010-04-28

exobuzz Wrote:Hi,

Firstly some help for xbox users only.. (mostly).

Please use one of my xbmc builds and this new version of IPlayer (my builds are in the same folder as the IPlayer.zip)

http://malus.exotica.org.uk/~buzz/xbmc/IPlayer.zip

It is locked down to 800kbps akamai h264 streams. xbox can't really do any more than 800kbps h264 anyway, and the limelight streams are rtmpt (rtmp over http) which the xbox build doesn't do. However, it should play the new stuff that hasn't been working.

This build also works on xbmc for linux, with the libRTMP patches. However it's still locked down to akamai and 800kbit, so it may not be that useful. You can modify it to use 1500kbit streams also with some editing, but really I first wanted to get Iplayer working on my old xbox1.

The problem and solution to the new streams, is that the authString provided by the mediaselector url for akamai streams does not work for new items. you have to instead specifically ask for an akamai stream as I mentioned in the urls in previous posts. Perhaps the BBC are half way through migrating to a new system. we shall see.

Please let me know if this works for you xbox users. If a stream happens to not be available in 800kbit on the akamai network, then I guess it won't work, but I think most if not all are.


Thank you, works for me for all the streams I tried!


- Al&lt;^..^&gt;ross - 2010-04-28

exobuzz Wrote:Please let me know if this works for you xbox users.

Great effort - it seems to be working well. Previously none of the following were playable but now ashes to ashes episodes 3 & 4 along with the latest snooker & bob the builder are all working like a charm.Big Grin


- exobuzz - 2010-04-29

I'm very happy it is working for those that have replied above.. I plan to actually sit down and watch the end of tropic of cancer series on my tv tonight rather than using it as a test file! finally! Smile

As soon as I have a bit more time, I will look into making the plugin work for akamai/limelight etc for all qualities based on user preference (I have some ideas now, but my unfamiliarity with the current iplayer structure means perhaps some of my ideas could me implemented better by the current maintainer, and I do hope he might reconsider to maintain it - the rtmp hash stuff is totally legal at least outside of the USA, and I am happy to host a project if in question. He has also done a great job, which is appreciated and a big well done from me in anycase!)

I guess I should post my findings/research to the current get_iplayer authors (I have partly hacked my copy, although I dont actually use get_iplayer it was very useful for debugging).

Does anyone know who is the official fork of get iplayer there is a git repository with a statement they are rewriting it and a google code dump also ?

As for the actual xbmc plugin, which has no maintainer, I would offer myself up as someone who is interested in improving it, but perhaps would like some support from others due to lack of time to do continual updates.

I'm rather spammed this thread over the last days especially right now.. oops. I've been in the pub (typical excuse) .. cheers!


- spicemuseum - 2010-04-29

exobuzz Wrote:Please let me know if this works for you xbox users. If a stream happens to not be available in 800kbit on the akamai network, then I guess it won't work, but I think most if not all are.
Confirmed working on XB0X. Great work Buzz.

I'll bet that's not the end of the arms race though. Let's see auntie's next kick in the teeth for its licence* fee payers.

One question, in respect of the player hash calculation, are you still hard coding it, or have you done some magic for XB0X mirroring the libRTMP changes in the Linux environment (viz http://trac.xbmc.org/ticket/8971) ?




* yes, it's a noun, not a verb, so it's licence with a c, not s. Grammar lesson over.