Kodi Community Forum
Broken [UK] BT Sport Video - 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: Broken [UK] BT Sport Video (/showthread.php?tid=325188)

Pages: 1 2 3 4 5


[UK] BT Sport Video - Leopold - 2017-12-08

Notice - this add-on is subject to a DMCA takedown request and is no longer available or supported. .

Plugin for BT Sport Videos

Now with access to the live channels with a valid subscription.

Available from the Official Repository.

Donations for this addon gratefully accepted.


RE: BT Sport Video - Izzy16 - 2017-12-18

(2017-12-08, 01:36)Leopold Wrote: Plugin for BT Sport Videos

Available from the Official Repository.

This doesn't play live video, which explains why no one has commented on this thread.


RE: BT Sport Video - dirk41 - 2017-12-18

Yes, if it was possible to support the live video, this addon would be ace. I have a really bad experience streaming directly off btsport's website.


RE: BT Sport Video - Leopold - 2018-01-03

I don't have a BT Sport subscription so I can't look into adding support for that. If someone is willing to share their login with me I can investigate.


RE: BT Sport Video - markeymark - 2018-01-06

I can maybe get a spare bt login, ive studied their stream system for a while, so if u want to exchange ideas lmk


RE: BT Sport Video - Leopold - 2018-01-07

Sounds good. I heard somewhere that they used to use Silverlight but the streams are now flash based?


RE: BT Sport Video - markeymark - 2018-01-07

They just normal hls streams, 8 hour token


RE: BT Sport Video - gb160 - 2018-05-14

I take it theres no news on this? would be great to have their live streams on Kodi as well.
I done a bit of playing around and got their streams to play on kodi, but no idea how to get around the token expiry so i'll probably stick to airplaying it from the app for now.


RE: BT Sport Video - Leopold - 2018-05-15

I do have a subscription now and I'm keen to get the streams working. I haven't worked out yet how to retrieve a logged-in stream URL but I've had another look now and got a bit further. I'll report back...


RE: BT Sport Video - gb160 - 2018-05-15

That's excellent news, be great to have these working now that they're all 50fps, as I mentioned I was able to get the streams playing, but unfortunately working out how that cookie thing gets generated is above my pay grade lol.

Unrelated but excellent work with the Spurs TV addon...been great keeping an eye on the new stadium over the last year or so!


RE: BT Sport Video - Leopold - 2018-05-16

To make sure we are on the same page and to (hopefully) start a technical discussion I will document what I have discovered so far.

This was mainly discovered using the Network tab in Firefox Web Developer Tools. I used the Edit and Resend option to modify the requests until I found what was actually required. I then used curl/jq/ffplay on the Linux command line to test the requests.

Retrieving and playing the HLS stream

(id=2020 is BT Sport 1)
Code:
ffplay "$(curl 'https://be.avs.bt.com/AVS/besc?action=GetCDN&type=LIVE&id=2020&channel=WEBHLS&asJson=Y' -H 'Cookie: avs_cookie=eyJhbGciOiJIbEszR1...'  | jq -r '.resultObj.src')"

The avs_cookie is generated with the following POST request when logged in and visiting the BT Sport website.
Code:
curl -si -X POST 'https://be.avs.bt.com/AVS/besc?action=LoginBT&channel=WEBHLS' -H 'Content-Type: application/x-www-form-urlencoded' -d 'SAMLResponse=PFJlc3B...ZT4='  | grep 'Set-Cookie: avs_cookie='
  
So the key to it is the SAMLResponse (it’s base64 encoded XML). This will be generated from the main BT login somehow and that is going to be the difficult (impossible?) bit.

Additional (possibly useful) information

AVS in the URLs is Accenture Video Solution.

The main BT login appears to be using Oracle SiteMinder SSO and is done with the following request that creates an SMSESSION cookie.
Code:
curl -si -X POST -d 'TARGET=https%3A%2F%2Fhome.bt.com%2Fsecure%2Floginforward%3Fview%3Dbtsport%26redirectURL%3DHTTPS%253A%252F%252Fsport%252Ebt%252Ecom%252Fss%252FSatellite%252Fbtsportplayer%252Fbt%252Dsport%252D1%252D01363810201090%253Fsite%253Dbtsport&[email protected]&PASSWORD=*****' -H 'Content-Type: application/x-www-form-urlencoded' https://signin1.bt.com/siteminderagent/forms/login.fcc | grep 'Set-Cookie: SMSESSION='
 
Hopefully someone has an idea of where to go from there!


RE: BT Sport Video - Leopold - 2018-05-17

OK so it looks like I've found the missing piece that's required to log in and watch live streams in Kodi.

Code:
curl -s -H 'Cookie: SMSESSION=gzF05...Oqh'  https://samlfed.bt.com/sportgetfedwebhls

This returns HTML with the SAMLResponse.

I'll try to put this all together with a Python script to test the whole sequence of requests.


RE: BT Sport Video - gb160 - 2018-05-17

Superb work buddy, id love to offer input/assistance but this is way over my head im afraid, maybe i could make you a cup of tea?

Seriously though, im happy to help with any testing if required.


RE: BT Sport Video - Leopold - 2018-05-17

(2018-05-17, 11:52)gb160 Wrote: Superb work buddy, id love to offer input/assistance but this is way over my head im afraid, maybe i could make you a cup of tea?
And a biscuit please Wink
(2018-05-17, 11:52)gb160 Wrote: Seriously though, im happy to help with any testing if required.
I've confirmed it's working with a Python script, so I'll start adding it to the plugin and let you know when there's something ready to test.


RE: BT Sport Video - stammie - 2018-05-17

This would be great if you manage to get it working,
from us mere non coding mortals can I say thanks for your efforts whether you get BT Sports working in Kodi or not, the effort is greatly appreciated