Kodi Community Forum
[RELEASE] NHL Gamecenter Addon - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] NHL Gamecenter Addon (/showthread.php?tid=118853)



RE: - spektr - 2012-04-14 09:33

(2012-03-04 04:39)apok Wrote:  Alright, update!

Here's a mlbhls.exe (with dependancy DLLs) that I compiled in cygwin. Extract it to somewhere convenient i.e. c:\mlbhls-nhl\

MLBHLS-NHL (Windows EXE and source) http://www.2shared.com/file/f8GjtoPK/mlbhls-nhl.html
NHLGC 0.3.2.1 http://www.2shared.com/file/0MbP0hX8/pluginvideonhl-gamecenter-mlb-.html

I added an enhancement to the mlbhls-nhl for pulling the TARGETDURATION from the m3u8 streams, since the original is coded for a 12 second delay. This should prevent some edge cases from occurring.

You will need to configure the "Path to MLBHLS Binary" and "HLS Output DIR" settings, as these will be OS-dependent.

For the Binary, if you are on linux so long as it's under /usr/bin you can just enter "mlbhls". Use a full path for Windows.
For the Output Dir, supply a trailing slash i.e. '/' on Linux or '\' on Windows.

Sleep on start specifies how long to wait for the stream to start building locally.

Files to buffer is only used when you select a live stream instead of viewing a game from the start. Keep in mind that each file segment is ~10 seconds long.

With the default of 3 and a sleep time of 15 seconds, you'll allow 30-40 seconds of video to be written to the output file prior to xbmc launching it.

I noticed changing the add-on settings seems to crash XBMC, so beware.

On Windows, the mlbhls does open in an external window - just alt-tab and it'll run in the background. Unfortunately I couldn't figure out how to kill the program when you stop viewing the screen if it is hidden (on Windows), because it's a child process that's executed. On Linux, pkill takes care of it Smile

Hey apok, thanks for this mod! Unfortunately, I've followed your instructions above, but am not having any luck - I click on Live Games, and they come up, but when I select any of them I don't get that "home/away" box or whatever pop up, it just takes me to another 'directory' (which is empty).

I'm on linux (Ubuntu), and I'm able to watch condensed/archive/etc games beautifully with this plugin, so any ideas as to what I'm missing?


RE: - spektr - 2012-04-15 05:03

(2012-04-14 09:33)spektr Wrote:  
(2012-03-04 04:39)apok Wrote:  Alright, update!

Here's a mlbhls.exe (with dependancy DLLs) that I compiled in cygwin. Extract it to somewhere convenient i.e. c:\mlbhls-nhl\

MLBHLS-NHL (Windows EXE and source) http://www.2shared.com/file/f8GjtoPK/mlbhls-nhl.html
NHLGC 0.3.2.1 http://www.2shared.com/file/0MbP0hX8/pluginvideonhl-gamecenter-mlb-.html

I added an enhancement to the mlbhls-nhl for pulling the TARGETDURATION from the m3u8 streams, since the original is coded for a 12 second delay. This should prevent some edge cases from occurring.

You will need to configure the "Path to MLBHLS Binary" and "HLS Output DIR" settings, as these will be OS-dependent.

For the Binary, if you are on linux so long as it's under /usr/bin you can just enter "mlbhls". Use a full path for Windows.
For the Output Dir, supply a trailing slash i.e. '/' on Linux or '\' on Windows.

Sleep on start specifies how long to wait for the stream to start building locally.

Files to buffer is only used when you select a live stream instead of viewing a game from the start. Keep in mind that each file segment is ~10 seconds long.

With the default of 3 and a sleep time of 15 seconds, you'll allow 30-40 seconds of video to be written to the output file prior to xbmc launching it.

I noticed changing the add-on settings seems to crash XBMC, so beware.

On Windows, the mlbhls does open in an external window - just alt-tab and it'll run in the background. Unfortunately I couldn't figure out how to kill the program when you stop viewing the screen if it is hidden (on Windows), because it's a child process that's executed. On Linux, pkill takes care of it Smile

Hey apok, thanks for this mod! Unfortunately, I've followed your instructions above, but am not having any luck - I click on Live Games, and they come up, but when I select any of them I don't get that "home/away" box or whatever pop up, it just takes me to another 'directory' (which is empty).

I'm on linux (Ubuntu), and I'm able to watch condensed/archive/etc games beautifully with this plugin, so any ideas as to what I'm missing?

Ok, would like to add to this: in testing, I've now found *one* of the four 'live' games has links in the next 'directory' after you select it, with the whole live from start, home/away etc etc. Unfortunately, it still doesn't play for me. I thought this might have been because it appears you may have made a typo in the plugin, specifying -H instead of -B parameter when passing to mlbhls, but changing that didn't fix it (have also tried to play a stream from the command line without success).

This turns up another issue for me though. I'm in Australia, so there's a massive time difference between when a game is being played in the US vs here. For some reason, the method you're using to pull the list of live games (live.xml, from my review of the plugin code), expires the games quickly once they're finished. The problem is, they don't go into the 'Archive' for me to be able to watch them there for about 24 hours or so. Soooo, the game is essentially in a 'black hole' for that time. However, on the official website itself, I'm of course able to go and watch those 'not live, but not archived' games. This is why I think most of the 'Live' links in the plugin are empty for me.

Any ideas?


RE: [RELEASE] NHL Gamecenter Addon - Carb0 - 2012-04-15 06:17

You're right. The plugin does download the live.xml file from the NHL servers. This file contains valid links as long as the game is still running. There's nothing you can do about it unless you scrape the NHL website directly.


RE: [RELEASE] NHL Gamecenter Addon - spektr - 2012-04-15 06:20

(2012-04-15 06:17)Carb0 Wrote:  You're right. The plugin does download the live.xml file from the NHL servers. This file contains valid links as long as the game is still running. There's nothing you can do about it unless you scrape the NHL website directly.

Yup, I've been trying to reverse engineer how your plugin works from the gamecenter.py file, trying to brush up on my coding at the same time Smile

I just saw that the games that were in the 'live' listings now are in Archive, so it takes ~12 hours for that move. Any ideas where we could parse the URLs for 'live'-but-completed, non-archived games? It has to show up somewhere I'd imagine (given I can still go to the webpage and watch, for example, the Coyotes game).

Also, any ideas why apok's HLS method isn't working for me? I can play the m3u8 files with ffmpeg, but mlbhls doesn't seem to like it...

Code:
mlbhls -B http://smb.cdnak.neulion.com/fs/nhl/mobile/iphone/video/senators/ced_3000.m3u8 -o test2.ts
[MLB] Reading cfg file: mlb.cfg
[MLB] Output file: test2.ts
[MLB] Max. Bandwidth: 3000000(bps)
[MLB] Min. Bandwidth: 0(bps)
[MLB] Bandwidth Locking: 1
[MLB] Fetching Master URL Ûi...
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out

Alternatively, I've also recompiled xbmc with the patch here, and it seems to play m3u8 files fine. Do I need to do anything special to watch live games using your plugin? (I reverted back to your version after I couldn't get apok's to work).


RE: [RELEASE] NHL Gamecenter Addon - Vini - 2012-04-15 09:57

Thank yiu, thank you, thank you for this plugin!!

Currently watching last nights Hawks Coyotes game!


RE: [RELEASE] NHL Gamecenter Addon - spektr - 2012-04-15 11:21

(2012-04-15 06:17)Carb0 Wrote:  You're right. The plugin does download the live.xml file from the NHL servers. This file contains valid links as long as the game is still running. There's nothing you can do about it unless you scrape the NHL website directly.

One more question for you: I see games hit the 'archive' about 5-7 hours after they're played (from what I can figure). Let's take Saturday's Coyotes game for example, I can watch the Archived (1600kbps) game. However, the 'Live' 3000/1600/800 kbps version remains up for a few days after the game's been played. Any way to grab those streams? I saw a 'calendar.xml' file that may be interesting.... If you could look into it, would be greatly appreciated (as it fixes the 'hole' issue between 'live' and 'archive')!


RE: [RELEASE] NHL Gamecenter Addon - Carb0 - 2012-04-15 17:18

(2012-04-15 06:20)spektr Wrote:  Yup, I've been trying to reverse engineer how your plugin works from the gamecenter.py file, trying to brush up on my coding at the same time Smile

I just saw that the games that were in the 'live' listings now are in Archive, so it takes ~12 hours for that move. Any ideas where we could parse the URLs for 'live'-but-completed, non-archived games? It has to show up somewhere I'd imagine (given I can still go to the webpage and watch, for example, the Coyotes game).

Look at at the source code of the webpage where you can watch the game. Or try Wireshark and look at the web traffic when you start the game.


(2012-04-15 06:20)spektr Wrote:  Also, any ideas why apok's HLS method isn't working for me? I can play the m3u8 files with ffmpeg, but mlbhls doesn't seem to like it...

Sorry, I can't help you with that. I use a custom build.


(2012-04-15 06:20)spektr Wrote:  Alternatively, I've also recompiled xbmc with the patch here, and it seems to play m3u8 files fine. Do I need to do anything special to watch live games using your plugin? (I reverted back to your version after I couldn't get apok's to work).

No, it just works. Big Grin


(2012-04-15 11:21)spektr Wrote:  One more question for you: I see games hit the 'archive' about 5-7 hours after they're played (from what I can figure). Let's take Saturday's Coyotes game for example, I can watch the Archived (1600kbps) game. However, the 'Live' 3000/1600/800 kbps version remains up for a few days after the game's been played. Any way to grab those streams? I saw a 'calendar.xml' file that may be interesting.... If you could look into it, would be greatly appreciated (as it fixes the 'hole' issue between 'live' and 'archive')!

Does the file contain video links? Can you send me a PM with the URL?


RE: [RELEASE] NHL Gamecenter Addon - spektr - 2012-04-16 06:15

(2012-04-15 17:18)Carb0 Wrote:  
(2012-04-15 06:20)spektr Wrote:  Alternatively, I've also recompiled xbmc with the patch here, and it seems to play m3u8 files fine. Do I need to do anything special to watch live games using your plugin? (I reverted back to your version after I couldn't get apok's to work).

No, it just works. Big Grin

Yup, you're right - one of the live games happened to be actually 'live' when I woke up this morning, and it worked perfectly Smile Only problem is that it starts the game where the current 'live' position is (as it would when you go to the website) - is there anything you can do to provide the option between starting at the 'live' point, or starting at the beginning of the stream? Would make this more useful for us outside of the timezone (which is most of the users of this plugin & NHLGC I imagine, as they black out all the locals!).

What I'd really like to do in the interim, in order to be able to watch these 'live' games, is grab the 'start of game' m3u8 file, and use hls or ffmpeg to dump the game to a TS file, which I can watch when I get home. I'll handle the ffmpeg/HLS bit myself, but I'd be greatful for any guidance you can provide around how to grab the right m3u8 file (Given you must have parsed these pages to find the initial files in the first place - you grabbed the 'iphone' ones? I can't seem to find these myself).


(2012-04-15 17:18)Carb0 Wrote:  
(2012-04-15 11:21)spektr Wrote:  One more question for you: I see games hit the 'archive' about 5-7 hours after they're played (from what I can figure). Let's take Saturday's Coyotes game for example, I can watch the Archived (1600kbps) game. However, the 'Live' 3000/1600/800 kbps version remains up for a few days after the game's been played. Any way to grab those streams? I saw a 'calendar.xml' file that may be interesting.... If you could look into it, would be greatly appreciated (as it fixes the 'hole' issue between 'live' and 'archive')!

Does the file contain video links? Can you send me a PM with the URL?

I'll go through the site for you on the weekend and see what I can come up with.


RE: [RELEASE] NHL Gamecenter Addon - Carb0 - 2012-04-16 23:15

(2012-04-16 06:15)spektr Wrote:  Yup, you're right - one of the live games happened to be actually 'live' when I woke up this morning, and it worked perfectly Smile Only problem is that it starts the game where the current 'live' position is (as it would when you go to the website) - is there anything you can do to provide the option between starting at the 'live' point, or starting at the beginning of the stream? Would make this more useful for us outside of the timezone (which is most of the users of this plugin & NHLGC I imagine, as they black out all the locals!).

Apok's version has that option. I don't know if it's possible without external program. The m3u8 file contains the URL to all video files from the beginning of the stream.

(2012-04-16 06:15)spektr Wrote:  What I'd really like to do in the interim, in order to be able to watch these 'live' games, is grab the 'start of game' m3u8 file, and use hls or ffmpeg to dump the game to a TS file, which I can watch when I get home. I'll handle the ffmpeg/HLS bit myself, but I'd be greatful for any guidance you can provide around how to grab the right m3u8 file (Given you must have parsed these pages to find the initial files in the first place - you grabbed the 'iphone' ones? I can't seem to find these myself).

I did find the live.xml with Wireshark in the web traffic to the boxee app. Unfortunately the app doesn't exist anymore. I think they used the term 'iphone' because they use Apple's HTTP streaming protocol.


RE: [RELEASE] NHL Gamecenter Addon - apok - 2012-04-25 01:49

(2012-04-15 06:20)spektr Wrote:  
(2012-04-15 06:17)Carb0 Wrote:  You're right. The plugin does download the live.xml file from the NHL servers. This file contains valid links as long as the game is still running. There's nothing you can do about it unless you scrape the NHL website directly.

Yup, I've been trying to reverse engineer how your plugin works from the gamecenter.py file, trying to brush up on my coding at the same time Smile

I just saw that the games that were in the 'live' listings now are in Archive, so it takes ~12 hours for that move. Any ideas where we could parse the URLs for 'live'-but-completed, non-archived games? It has to show up somewhere I'd imagine (given I can still go to the webpage and watch, for example, the Coyotes game).

Also, any ideas why apok's HLS method isn't working for me? I can play the m3u8 files with ffmpeg, but mlbhls doesn't seem to like it...

Code:
mlbhls -B http://smb.cdnak.neulion.com/fs/nhl/mobile/iphone/video/senators/ced_3000.m3u8 -o test2.ts
[MLB] Reading cfg file: mlb.cfg
[MLB] Output file: test2.ts
[MLB] Max. Bandwidth: 3000000(bps)
[MLB] Min. Bandwidth: 0(bps)
[MLB] Bandwidth Locking: 1
[MLB] Fetching Master URL Ûi...
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out

Alternatively, I've also recompiled xbmc with the patch here, and it seems to play m3u8 files fine. Do I need to do anything special to watch live games using your plugin? (I reverted back to your version after I couldn't get apok's to work).

[MLB] Fetching Master URL Ûi...

it's expecting a Master URL... not a stream URL. don't force quality on it, it just needs the ced.m3u8. It'll default to 3000000, and there's a flag (maybe -b) for setting bitrate... look at mlb.c.

(2012-04-16 06:15)spektr Wrote:  What I'd really like to do in the interim, in order to be able to watch these 'live' games, is grab the 'start of game' m3u8 file, and use hls or ffmpeg to dump the game to a TS file, which I can watch when I get home. I'll handle the ffmpeg/HLS bit myself, but I'd be greatful for any guidance you can provide around how to grab the right m3u8 file (Given you must have parsed these pages to find the initial files in the first place - you grabbed the 'iphone' ones? I can't seem to find these myself).

the mlbhls program will do this if you don't specify -S 4 or whatever it may be...run it in a console and it'll grab the file. You'd need to setup some sort of schedule to grab it say, within an hour after the game ends.


RE: [RELEASE] NHL Gamecenter Addon - spektr - 2012-04-25 09:30

(2012-04-25 01:49)apok Wrote:  
(2012-04-15 06:20)spektr Wrote:  
(2012-04-15 06:17)Carb0 Wrote:  You're right. The plugin does download the live.xml file from the NHL servers. This file contains valid links as long as the game is still running. There's nothing you can do about it unless you scrape the NHL website directly.

Yup, I've been trying to reverse engineer how your plugin works from the gamecenter.py file, trying to brush up on my coding at the same time Smile

I just saw that the games that were in the 'live' listings now are in Archive, so it takes ~12 hours for that move. Any ideas where we could parse the URLs for 'live'-but-completed, non-archived games? It has to show up somewhere I'd imagine (given I can still go to the webpage and watch, for example, the Coyotes game).

Also, any ideas why apok's HLS method isn't working for me? I can play the m3u8 files with ffmpeg, but mlbhls doesn't seem to like it...

Code:
mlbhls -B http://smb.cdnak.neulion.com/fs/nhl/mobile/iphone/video/senators/ced_3000.m3u8 -o test2.ts
[MLB] Reading cfg file: mlb.cfg
[MLB] Output file: test2.ts
[MLB] Max. Bandwidth: 3000000(bps)
[MLB] Min. Bandwidth: 0(bps)
[MLB] Bandwidth Locking: 1
[MLB] Fetching Master URL Ûi...
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out
[MLB] Get Master URL ERR: name lookup timed out

Alternatively, I've also recompiled xbmc with the patch here, and it seems to play m3u8 files fine. Do I need to do anything special to watch live games using your plugin? (I reverted back to your version after I couldn't get apok's to work).

[MLB] Fetching Master URL Ûi...

it's expecting a Master URL... not a stream URL. don't force quality on it, it just needs the ced.m3u8. It'll default to 3000000, and there's a flag (maybe -b) for setting bitrate... look at mlb.c.

(2012-04-16 06:15)spektr Wrote:  What I'd really like to do in the interim, in order to be able to watch these 'live' games, is grab the 'start of game' m3u8 file, and use hls or ffmpeg to dump the game to a TS file, which I can watch when I get home. I'll handle the ffmpeg/HLS bit myself, but I'd be greatful for any guidance you can provide around how to grab the right m3u8 file (Given you must have parsed these pages to find the initial files in the first place - you grabbed the 'iphone' ones? I can't seem to find these myself).

the mlbhls program will do this if you don't specify -S 4 or whatever it may be...run it in a console and it'll grab the file. You'd need to setup some sort of schedule to grab it say, within an hour after the game ends.

Hey,

So I've grabbed a new stream from the archive (it lines up with our times here, has all commercials/etc cut out of it, and I can get a 3000kbps feed even though it's not advertised through the flash interface), and when I try to grab the file in console with mlbhls...

Code:
mlbhls -VV -B http://nhl.cdn.neulion.net/u/nhlmobile/vod/nhl/2012/04/23/116/ced/3_116_nyr_ott_1112_h_whole/v1/playlist_3000.m3u8 -o sens_rangers.ts -f -s 0
[MLB] Reading cfg file: mlb.cfg
[MLB] Output file: sens_rangers.ts
[MLB] Segment Avg. Count: 3
[MLB] Max Bandwidth: 0 (bps)
[MLB] Min Bandwidth: 0 (bps)
[MLB] Bandwidth Locking: 0
[MLB] Fetching Master URL: http://nhl.cdn.neulion.net/u/nhlmobile/vod/nhl/2012/04/23/116/ced/3_116_nyr_ott_1112_h_whole/v1/playlist_3000.m3u8
[MLB] Current Priority: -1 (bw: 0)

[MLB] Master URL: http://nhl.cdn.neulion.net/u/nhlmobile/vod/nhl/2012/04/23/116/ced/3_116_nyr_ott_1112_h_whole/v1/playlist_3000.m3u8
[MLB] Base URL: http://nhl.cdn.neulion.net/u/nhlmobile/vod/nhl/2012/04/23/116/ced/3_116_nyr_ott_1112_h_whole/v1/
[MLB] No Decryption

[MLB] Playlist refresh time: 12 (s)
[MLB] Stream thread exiting

This is with the very latest MLBHLS version from the dev's website. I tried with your modified older version, and it doesn't work (still get the 'Get Master URL ERR'). However, simply passing the m3u8 URL to ffmpeg works fine. I'd rather use MLBHLS though, as I can start at specific points in the stream, and it seems more stable than ffmpeg in this regard.

Ideas?


RE: [RELEASE] NHL Gamecenter Addon - apok - 2012-05-01 02:13

Again, make sure you aren't specifying 3000kbps quality in your settings (go to the add-on settings). It's grabbing the _3000 m3u8, but that's not the master url... the playlist.m3u8 would be.


RE: [RELEASE] NHL Gamecenter Addon - micahg - 2012-08-10 20:33

Hello everyone. My HLS streaming patch was accepted onto the mainline of XBMC, so gamecenter should be good to go for next season without any workarounds.

See commit: https://github.com/xbmc/xbmc/commit/8f043b4a1f06a6c2d27373d4bcb4194cdaeff40f/


RE: [RELEASE] NHL Gamecenter Addon - ksosez - 2012-08-14 00:09

Do you know if this will be released in the .1 release for Eden or the next version?


RE: [RELEASE] NHL Gamecenter Addon - micahg - 2012-08-14 01:33

Presently its only on the main trunk. It would need to be backported into eden along with the settings work for the bandwidth.