Kodi Community Forum

Full Version: [UK] BT Sport Video
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
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.
(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.
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.
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.
I can maybe get a spare bt login, ive studied their stream system for a while, so if u want to exchange ideas lmk
Sounds good. I heard somewhere that they used to use Silverlight but the streams are now flash based?
They just normal hls streams, 8 hour token
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.
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...
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!
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)
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.
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.
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!
OK so it looks like I've found the missing piece that's required to log in and watch live streams in Kodi.

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.
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.
(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.
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
Pages: 1 2 3 4 5