• 1
  • 77
  • 78
  • 79(current)
  • 80
  • 81
  • 100
[Discontinued] NHL Gamecenter Addon
(2014-10-11, 01:56)timewasted Wrote: Ok, now that a game is actually streaming live, I have a better view of what's going on. I'm going to omit the majority of the responses, since it seems access controls are actually somewhat lax (at least for non-live games).

First, you get a list of games:

Code:
POST to http://gamecenter.nhl.com/nhlgc/servlets/games
Cookies: none
Parameters:
  format: xml
  app: true
Important tags in XML response:
  <season>
  <type>
  <gid>

From there, you can pull up an individual game:

Code:
POST to http://gamecenter.nhl.com/nhlgc/servlets/game
Cookies: none
Parameters:
  season: <season>
  type: <type>
  app: true
  gid: <gid>
  isFlex: true
Important tags in XML response:
  <season>
  <type>
  <gid>

Then you look up the game's publish point:

Code:
POST to http://gamecenter.nhl.com/nhlgc/servlets/publishpoint
Cookies: authenticated login cookies
Parameters:
  type: game
  gs: live
  id: <season><type (with leading zero)><gid>
  ft: <type> (I think)

Now comes the fun part... the realization that the stream is encrypted. I'm sure that Python has methods to decrypt the stream, but it's at this point that the addon would enter a legally grey area. I'll look a bit more, but at this point the outlook doesn't seem great for live streaming.

The key for streaming is is linked in the m3u8 file presented by NHLGC. Last season the only criteria to retrieve it was you had to have the proper useragent. I am not sure if that is changed as I have not tested it. But if you are able to get m3u8 links, then you should see the url to the AES-128 key file linked inside.. (which xbmc supports using and has been in place for a while)

Edit: I think you also needed to have a cookie set as well.
Reply
Changing the useragent isn't enough this time (or maybe I haven't found a working useragent yet). I think you also need to send the correct cookies each time you access a new key file. As far as I know this isn't supported by Kodi but it should be possible to create a workaround in python.

I'll do some more research tomorrow on how to access the key file.

Edit:
ahh, I was too slow...Big Grin

Edit2:
There seem to be 5000K streams now instead of 4500K.
Reply
have you checked the NFL Gamepass addon? Both services are using the same Neulion platform so I assume they probably work in a similar way. The live streams for Gamepass are also encrypted.

you can find the source code on github
they are using: 'User-Agent' : 'Safari/537.36 Mozilla/5.0 AppleWebKit/537.36 Chrome/31.0.1650.57'

hope this helps
Reply
NBA live tv seems to have had the cookies/keys implemented last year. You can see the working code here:
https://github.com/maxgalbu/xbmc.plugin....atvlive.py
Reply
Ok. I can acces the keys manually now.
The only thing left to do, is to get this to work in Kodi with "|Cookie=" appended to the url. I'm going to do this tomorrow. I'm really tired now.
Reply
Great job! Can't wait to test out the new 5000K streams. Props to timewasted and juggie aswell.
Reply
Thanks Guys :-) best news I've heard all day !!!! Tongue
Reply
(2014-10-11, 04:08)amd7674 Wrote: Thanks Guys :-) best news I've heard all day !!!! Tongue

Carb0, do they need a logged in cookie now to pull the key? That would be great news as its been pirated like crazy due to their lax controls. And when I actually pay for it, am not pleased when a popular game buffers!
Reply
Access to the decryption key url by passing the authentication cookies/url parameters is only solving one part of the problem.
Both NBA and NHL use a HLS implementation for live games that will not work on xbmc 13.X for more than one minute at a time.
Imho the best approach is to use a custom hls client (like mlbhls) to pull/decrypt the stream and feed the decoded data to xbmc via a fifo node


(2014-10-11, 04:19)juggie Wrote: Carb0, do they need a logged in cookie now to pull the key? That would be great news as its been pirated like crazy due to their lax controls. And when I actually pay for it, am not pleased when a popular game buffers!

I am thinking the same.
Sadly they only encrypt their live streams :-( Let's hope they will encrypt every type of stream soon.
Reply
I am also writing a nhl gamecenter addon. with a custom skin and live scores. since I copy and pasted the landscape view from xperience1080p skin and using some of the png, I am waiting for his permission to redistribute.

if you need help accessing the streams LEGALLY, let me know.

here is a nutshell of it.
1. login in amd get cookie
2. send a get or post to publishpoint*
3. it will return a path to the m3u8
4. get this path. the url has all the info to get the key to the stream.

publishpoint takes the following params.
type: game, video
id: gameid (201401003)
gs: live, dvr, archive, condensed, continuos
ft: 2,4 (and other values. this changes the home/away feed)

you will need to provide a user agent string as well. the server uses this to format the url. if my user agent is android it will return ...android.m3u8
desktop browser will get an adaptive:// flash type stream. and so forth.

ps. sweet I didn't know 5000kbps is a valid bitrate!
Reply
(2014-10-11, 07:51)robla Wrote: Access to the decryption key url by passing the authentication cookies/url parameters is only solving one part of the problem.
Both NBA and NHL use a HLS implementation for live games that will not work on xbmc 13.X for more than one minute at a time.
Imho the best approach is to use a custom hls client (like mlbhls) to pull/decrypt the stream and feed the decoded data to xbmc via a fifo node


(2014-10-11, 04:19)juggie Wrote: Carb0, do they need a logged in cookie now to pull the key? That would be great news as its been pirated like crazy due to their lax controls. And when I actually pay for it, am not pleased when a popular game buffers!

I am thinking the same.
Sadly they only encrypt their live streams :-( Let's hope they will encrypt every type of stream soon.

Is NHLGC using HLS now? Doesn't seem like it is.. but I am by no means an expert.

Off topic: Some games are still streamed free via CBC, but are now hooked into neulion for the streaming (they were not last season) so they are reusing NHLGC.
Reply
(2014-10-11, 04:19)juggie Wrote:
(2014-10-11, 04:08)amd7674 Wrote: Thanks Guys :-) best news I've heard all day !!!! Tongue

Carb0, do they need a logged in cookie now to pull the key? That would be great news as its been pirated like crazy due to their lax controls. And when I actually pay for it, am not pleased when a popular game buffers!

You need a cookie from the login to get the url for the m3u8 file and the cookie that is needed to access the keys. Unless it's possible to get this cookie in a different way, it's not possible to access the keys without a login cookie.

(2014-10-11, 07:51)robla Wrote: Access to the decryption key url by passing the authentication cookies/url parameters is only solving one part of the problem.
Both NBA and NHL use a HLS implementation for live games that will not work on xbmc 13.X for more than one minute at a time.
Imho the best approach is to use a custom hls client (like mlbhls) to pull/decrypt the stream and feed the decoded data to xbmc via a fifo node

You're right. It stops after a few minutes. There is an old mlbhls version of this add-on somewhere in this thread. Biggest issue with this solution was that it wasn't available on all platforms. At that time there also have been suggestions to create a server in python that downloads the keys and provides a custom version of the m3u8 files. XBMC would then play the custom m3u8 file without additional parameters.

(2014-10-11, 08:45)canucks Wrote: I am also writing a nhl gamecenter addon. with a custom skin and live scores. since I copy and pasted the landscape view from xperience1080p skin and using some of the png, I am waiting for his permission to redistribute.

if you need help accessing the streams LEGALLY, let me know.

here is a nutshell of it.
1. login in amd get cookie
2. send a get or post to publishpoint*
3. it will return a path to the m3u8
4. get this path. the url has all the info to get the key to the stream.

publishpoint takes the following params.
type: game, video
id: gameid (201401003)
gs: live, dvr, archive, condensed, continuos
ft: 2,4 (and other values. this changes the home/away feed)

you will need to provide a user agent string as well. the server uses this to format the url. if my user agent is android it will return ...android.m3u8
desktop browser will get an adaptive:// flash type stream. and so forth.

ps. sweet I didn't know 5000kbps is a valid bitrate!

Thanks. I didn't notice a difference in quality compared to the 4500kbps streams.



Edit:
(2014-10-12, 02:47)juggie Wrote: Is NHLGC using HLS now? Doesn't seem like it is.. but I am by no means an expert.

Off topic: Some games are still streamed free via CBC, but are now hooked into neulion for the streaming (they were not last season) so they are reusing NHLGC.

NHLGC has always been using HLS (atleast since this add-on exists).
Reply
(2014-10-12, 02:53)Carb0 Wrote:
(2014-10-11, 04:19)juggie Wrote:
(2014-10-11, 04:08)amd7674 Wrote: Thanks Guys :-) best news I've heard all day !!!! Tongue

Carb0, do they need a logged in cookie now to pull the key? That would be great news as its been pirated like crazy due to their lax controls. And when I actually pay for it, am not pleased when a popular game buffers!

You need a cookie from the login to get the url for the m3u8 file and the cookie that is needed to access the keys. Unless it's possible to get this cookie in a different way, it's not possible to access the keys without a login cookie.

(2014-10-11, 07:51)robla Wrote: Access to the decryption key url by passing the authentication cookies/url parameters is only solving one part of the problem.
Both NBA and NHL use a HLS implementation for live games that will not work on xbmc 13.X for more than one minute at a time.
Imho the best approach is to use a custom hls client (like mlbhls) to pull/decrypt the stream and feed the decoded data to xbmc via a fifo node

You're right. It stops after a few minutes. There is an old mlbhls version of this add-on somewhere in this thread. Biggest issue with this solution was that it wasn't available on all platforms. At that time there also have been suggestions to create a server in python that downloads the keys and provides a custom version of the m3u8 files. XBMC would then play the custom m3u8 file without additional parameters.

(2014-10-11, 08:45)canucks Wrote: I am also writing a nhl gamecenter addon. with a custom skin and live scores. since I copy and pasted the landscape view from xperience1080p skin and using some of the png, I am waiting for his permission to redistribute.

if you need help accessing the streams LEGALLY, let me know.

here is a nutshell of it.
1. login in amd get cookie
2. send a get or post to publishpoint*
3. it will return a path to the m3u8
4. get this path. the url has all the info to get the key to the stream.

publishpoint takes the following params.
type: game, video
id: gameid (201401003)
gs: live, dvr, archive, condensed, continuos
ft: 2,4 (and other values. this changes the home/away feed)

you will need to provide a user agent string as well. the server uses this to format the url. if my user agent is android it will return ...android.m3u8
desktop browser will get an adaptive:// flash type stream. and so forth.

ps. sweet I didn't know 5000kbps is a valid bitrate!

Thanks. I didn't notice a difference in quality compared to the 4500kbps streams.

Awesome news that the key now requires a valid sign in. This is a welcome addition, despite the difficulties for XBMC. I have some code that is able to get the available live streams and such using some json stuff NHL.com makes available. It also works for highlights and a ton of other stuff. I have never shared it in the past because there was no authentication on the key in the past so by simply being able to build the m3u8 links it enabled piracy.
Reply
Carb0, so what is new then that causes the stream to stop playing after a few minutes?

How would custom m3u8 files help this?
Reply
So Rogers logins won't work (we have a free preview until Dec. 31, 2014 if you are an Internet / phone customer of theirs, which I am). I did get that to work on the PS3 app, but not on an Android box running XBMC connected to another TV.
Reply
  • 1
  • 77
  • 78
  • 79(current)
  • 80
  • 81
  • 100

Logout Mark Read Team Forum Stats Members Help
[Discontinued] NHL Gamecenter Addon14
This forum uses Lukasz Tkacz MyBB addons.