• 1
  • 16
  • 17
  • 18(current)
  • 19
  • 20
  • 22
[WIP] MLB.TV Boxee App port (developers needed!)
Debug logs pending. Meanwhile, here's mlb.py from the Boxee app:

http://pastebin.com/PKSM9V4q

Line 620 looks interesting, but it may be tied into Boxee's "tracker" script, which is part of their internal social networking architecture. Not sure though. Line 708 also looks promising.
Reply
So I conferred with the developer of mlbviewer, who has been investigating the same thing. Turns out the "NexDef" plugin is essentially an "HTTP Live Streaming" (HLS) client. Boxee actually has HLS support built into its player, so it is able to access the HD "NexDef" streams natively, with no need for the plugin.

It looks like spiff has branch with preliminary HLS support, so that might be a good starting place. If we can get a properly formatted M3U8 file, that's probably step one.

Also see my post in the mlbviewer thread concerning the state of things, including a python/gstreamer HLS client we might use for testing.
Reply
Yeah, looks like this may be doable. Your mlb.py showed me how to decode the url from above. The url is a m3u8 with a choice of quality from 800k to 4500k from there you can get the m3u8 with the actual stream I think - http://mlblive-l3c.mlb.com/ls03/mlbam/20...plete.m3u8

That's from yesterdays free game I don't think it's still playable.
Reply
Oh, hey, look at that. I guess the next step is playback. If we can generate the appropriate .m3u8, maybe that can be passed to HLS Player, at least for testing. If that works, I'll try to grab spiff's branch and see how that works.
Reply
With this default.py , if you change the userdata/addon-data/plugin.video.mlbmc/setting.xml as above it should print the m3u8 url to the log. I don't have a way to test untill the free game is on. I wonder if the archive games have cloud wired setting? Seems like I remember that thay do but I'm not sure.
Reply
Good deal. I'm pulling spiff's repo right now, and will hopefully have it built in time to try those .m3u8 playlists with it. I'll try them with HLS-player as well.

BTW, will this remain the development thread for this addon?
Reply
divingmule Wrote:With this default.py , if you change the userdata/addon-data/plugin.video.mlbmc/setting.xml as above it should print the m3u8 url to the log. I don't have a way to test untill the free game is on. I wonder if the archive games have cloud wired setting? Seems like I remember that thay do but I'm not sure.

All right, so I'm not having much luck. I get the master m3u8, and I assume I need to open it and pick the stream I want, and append that to the URL. This gives me the m3u8 URL for the game in that stream, but nothing seems to be able to play it. Spiff's patched XBMC, hls-player, mplayer, vlc, ffplay, even Boxee itself. But I tried using the MLB plugin in Boxee again, since that does work, and took another look at the URL:

Code:
18:42:01 T:139801685395200 M:1640071168    INFO: ffmpeg[1DCC0700]: Input #0, mpegts, from 'playlist://http%3A%2F%2Fmlblive-l3c.mlb.com%2Fls02%2Fmlbam%2F2011%2F06%2F28%2FMLB_GAME_VIDEO_BOSPHI_VISIT_20110628%2Fmaster_wired.m3u8?stream-fingerprint=IwKH6Le0Pu4vEiHsGC1aVYohiMQ%3D&stream-params=playback%3DHTTP_CLOUD_WIRED%26contentId%3D16092553%26appAccountName%3Dmlb%26eventId%3D14-288088-2011-06-28%26ipid%3D8820296%26sessionKey%3D9y6jRhU1%252Bg5Zvrd30frsA4BzNCU%253D%26country%3Dus%26postalCode%3D39203%26platform%3DBOXEE&tracking-url=http%3A%2F%2Fmlbglobal08.112.2o7.net%2Fb%2Fss%2Fmlbglobal08%2F1%2FG.5--NS%2F26860164%3Fch%3DMedia%26pageName%3DBOXEE%2520Media%2520Return%26c25%3D16092553%257CHTTP%255FCLOUD%255FWIRED%26c27%3DMedia%2520Player%26c43%3DBOXEE&startDate=19%3A00%3A07&quality=1&live=1&bx-ourl=http%3A%2F%2Fmlb.mlb.com%2Fmedia%2Fplayer%2Fentry.jsp%3Fcalendar_event_id%3D14-288088-2011-06-28%26source%3DboxeeRef':

So it looks like the player expects the URL to have more parameters than just the location of the .m3u8 file.

(Incidentally, I was able to open the 4500k m3u8 and directly download one of the .ts segments. Nothing was able to identify or play that either. Huh.)
Reply
theophile Wrote:BTW, will this remain the development thread for this addon?

I don't really have a preference it's up to you.

That's good info! I'll see if I can work out the code to get the parameters into the url and we'll go from there. It may be tomorrow before I can get it all sorted.
Reply
theophile, could you edit your default.py with this code it starts around line 669 -
Code:
if not game_url.startswith('rtmp://'):
                request_params = base64.b64decode(game_url).split('|')
                print '----------> HLS URL: '+str(request_params[0]).replace('master_wired.m3u8','4500K/4500_complete.m3u8')+'?stream-fingerprint='+str(request_params[1])+'&stream-params='+str(request_params[2])
                url = str(request_params[0]).replace('master_wired.m3u8','4500K/4500_complete.m3u8')+'?stream-fingerprint='+str(request_params[1])+'&stream-params='+str(request_params[2])
                item = xbmcgui.ListItem(path=url)
                xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)


When I enter the hls url from this into hls-player I don't get any video, my console crashes but it definetly starts downloading something at a high rate until I do killall hls-player.
Reply
Looks like progress. This may be an erroneous assumption, but I'm assuming that if we get the URL formatted properly, it should be possible to put that in a .strm file and have Boxee play it, since we know Boxee can handle the HLS streams. Once that's working, the next step is seeing whether XBMC can play it.

So with your mod, I got a longer URL. Boxee attempted to play it and got as far as displaying a black screen, but no video. I then fired up the same game in the Boxee plugin. Here's a comparison of the URLs.

First, as generated by MLBMC:
Code:
http://mlblive-l3c.mlb.com/ls03/mlbam/2011/06/28/MLB_GAME_VIDEO_FLOOAK_VISIT_20110628/4500K/4500_complete.m3u8?stream-fingerprint=9Fqm6gRL6X/7YANptcl6jGW1sHM=&stream-params=playback=HTTP_CLOUD_WIRED&contentId=16092765&appAccountName=mlb&eventId=14-288092-2011-06-28&ipid=8820296&sessionKey=wG0dR8BRV30HCULZuZVRsLQzT%2Bw%3D&country=us&postalCode=39203

Then as generated by the Boxee app:
Code:
http%3A%2F%2Fmlblive-l3c.mlb.com%2Fls03%2Fmlbam%2F2011%2F06%2F28%2FMLB_GAME_VIDEO_FLOOAK_VISIT_20110628%2Fmaster_wired.m3u8?stream-fingerprint=9Fqm6gRL6X%2F7YANptcl6jGW1sHM%3D&stream-params=playback%3DHTTP_CLOUD_WIRED%26contentId%3D16092765%26appAccountName%3Dmlb%26eventId%3D14-288092-2011-06-28%26ipid%3D8820296%26sessionKey%3DwG0dR8BRV30HCULZuZVRsLQzT%252Bw%253D%26country%3Dus%26postalCode%3D39203%26platform%3DBOXEE&tracking-url=http%3A%2F%2Fmlbglobal08.112.2o7.net%2Fb%2Fss%2Fmlbglobal08%2F1%2FG.5--NS%2F34832448%3Fch%3DMedia%26pageName%3DBOXEE%2520Media%2520Return%26c25%3D16092765%257CHTTP%255FCLOUD%255FWIRED%26c27%3DMedia%2520Player%26c43%3DBOXEE&startDate=22%3A00%3A08&quality=1&live=1&bx-ourl=http%3A%2F%2Fmlb.mlb.com%2Fmedia%2Fplayer%2Fentry.jsp%3Fcalendar_event_id%3D14-288092-2011-06-28%26source%3DboxeeRef

Hope this helps!
Reply
Looks like someone is a few steps ahead of us on HLS implementation, and we'll have an mlbviewer-compatible HLS player soon.

Of course, that doesn't really help us unless that work can be incorporated into XBMC. The other option, of course, is to implement the player in the addon and have it write the stream to a file, which XBMC could then play back.

On the matter of HLS support in XBMC, I got a somewhat unhelpful response from spiff. But after looking at the patches, it seems to me that in the best case, these changes would only work on unencrypted HLS streams, whereas MLB.TV are definitely encrypted, judging by daftcat's work on mlbviewer.

So unless I'm missing something, even if we do get a properly formatted URL, it will be a while before XBMC will be able to play it. We'd need to use external tools in the meantime.
Reply
Good to know. I was in hopes that spiffs hls code would work sense it was a boxee port. I guess we'll wait for the new hls player to see how we might implement it.
Reply
divingmule Wrote:Good to know. I was in hopes that spiffs hls code would work sense it was a boxee port. I guess we'll wait for the new hls player to see how we might implement it.

Hi, I'm the author of the HLS client that works with MLB.tv. You can find it here:

Here

a README is here:

Readme

Let me know if you need any help.
Reply
thegryghost Wrote:Hi, I'm the author of the HLS client that works with MLB.tv. You can find it here:

Here

a README is here:

Readme

Let me know if you need any help.

Wink Nod Wink

http://code.google.com/p/mlbtv-hls-nexdef/wiki/README
Reply
Saving to local file and playing back with XBMC = full DVR controls. Cool
Reply
  • 1
  • 16
  • 17
  • 18(current)
  • 19
  • 20
  • 22

Logout Mark Read Team Forum Stats Members Help
[WIP] MLB.TV Boxee App port (developers needed!)3