LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-21-2015, 03:47 PM   #4696
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Mlblive updated for 2015


I finally got my Jenkins environment (build automation) set up for building mlblive, the live CD and virtual machine version of mlbviewer. It's normally a two page HOWTO I have to grind through to make changes to the ISO image. It's much easier now to open the ISO and squashfs inside, make some changes, and re-package.

I have updated the mlblive image for 2015. It's basically just an SVN up over the last one. But it's a start. I want to explore some enhancements for it this season like either persistence or configuration import (possibly auto-import?) and definitely an auto-update feature so I don't have to upload a new image every time I want to include new commits.

If I'm really ambitious, I'll look into how to create debian dpkgs so if I make any distro/OS changes, users can patch them in instead of downloading an entirely new image. I wonder if Sourceforge has a REST API that can help me automate updating the Live CD such as querying the latest mlblive-debian-update.dpkg and automatically install it if it's newer than the version included in the image.

Basically, I want to setup the VM version once and then be able to launch mlblive like an application without having to reconfigure it every time. I'm not sure if this will be persistence or some form of configuration import (I want this more but haven't yet looked into whether it's possible.)

Anyway, so yeah, new mlblive image. Only difference is an SVN update of mlbviewer over last July's image. More improvements to mlblive coming this summer.
 
Old 05-27-2015, 09:42 PM   #4697
rnrubun
LQ Newbie
 
Registered: Apr 2015
Posts: 5

Rep: Reputation: Disabled
New Mlb TV player

Noticed this today, and then got a notification from mlbtv 4hrs ago "...the new MLB.TV player is now available. There are no downloads required to experience the new in-page layout with simplified controls. Simply click a game and watch in HD from your browser."
Observations from Windows machines:
A separate window no longer opens.
Much more information in the window (scores, game status, etc)
Also is driving the video hardware harder, laptop kept overheating.

BTW, an Mlbtv game running on my android tablet, when chromecast to the TV, is NOTICEABLY higher quality than either Windows Chromecast/ wired, or Linux (Ubuntu), and both boxes are HDMI cabled. Haven't tried cygwin install yet.

In any case, does this "new player" change anything re:mlbviewer? Is it REALLY a new player, or just new content (New AND improved!)

My goal is the mlblive vm environment you are working on that doesn't require reconfiguring. Ubuntu screens, sound, & playback quality are all giving me fits tho, so I'm messing with all the alternatives. Mlblive from a CD works great, so its not you, its me...:-\
 
Old 05-28-2015, 04:06 PM   #4698
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Near as I can tell the new player is just that. It's a new interface on their end but the core of the service is still the same. It seems this new player has as much effect on us as a new mplayer fork would have on non-Linux users.

That said, it sure is pretty and I will not miss the old interface. I say that now but I haven't verified whether this new interface is even available on Linux. mlblive has an older version of iceweasel and flash and thus it looks like it's being directed to the old player if you use the web player instead of mlbviewer. Did not boot up the home laptop last night.

Has anybody verified whether the new player works on Linux? It's moot since we have mlbviewer but I do like that interface.
 
Old 06-10-2015, 01:56 PM   #4699
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
Hey y'all. I'm finally back on Linux (thank Tux) and I need to get this installed on the new laptop. Am I seeing that I want MLBLive and not mlbviewer?
 
Old 06-11-2015, 01:04 AM   #4700
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN rev 656 = 2015 Sourceforge Release 1

Just checked in and uploaded 2015-sf-1. Nothing was really needed to support 2015 over 2014 that I didn't even think about changing version strings and uploading a new version.

mlbivewer is still maintained.

mlblive is a Live CD / Virtual Machine version of mlbviewer. It's a Debian Wheezy image that's been customized to have mlbviewer, mlbhls, rtmpdump, and mplayer2. In addition, the XFCE interface is customized especially for mlbviewer. VirtualBox Guest Tools is also already preinstalled. With a reasonably modern machine (Core 2 Duo or better), you can boot mlblive as a virtual machine, fullscreen it, and watch a game like you were running the app natively. On my work laptop, I can go from Start->VirtualBox to watching my game in under a minute.

The biggest drawback of the live version is that you have to set the timezone and edit the ~/.mlb/config every time you boot. I have made both easy and painless in the image but it still has to be done each time. The discussion the other week was me thinking aloud about how I want to fix that. I'll probably change the image to search for a shared folder to save/read configuration from the host. But I want to also explore a way to automatically search for an update deb on each boot so that I can make the image able to refresh itself rather than having to keep uploading and downloading 1 GB images. In fact, I want this first so that the next image will hopefully be the last full one I have to upload. Everything else can be packaged as a patch dpkg.

So yeah, things just worked with mlbviewer2014 that I haven't been thinking about mlbviewer. The live version especially making it auto-updating and persistent has me more excited.
 
Old 06-12-2015, 09:10 AM   #4701
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
The live version sounds pretty good but I saw the update of mlbviewer and I'll snag that. Do you still update code to update like I used to run? I can't recall what app it uses and I haven't had a chance to go back through my old posts here yet.
 
Old 06-12-2015, 05:27 PM   #4702
iamtheaardvark
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Rep: Reputation: Disabled
I have recently noticed that mpv can play HLS streams natively, see e.g. https://github.com/mpv-player/mpv/bl...am_lavf.c#L370 Would it possible to use this feature instead of mlbhls, similar to librtmp instead of rtmpdump?
 
Old 06-12-2015, 08:27 PM   #4703
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by iamtheaardvark View Post
I have recently noticed that mpv can play HLS streams natively, see e.g. https://github.com/mpv-player/mpv/bl...am_lavf.c#L370 Would it possible to use this feature instead of mlbhls, similar to librtmp instead of rtmpdump?
I can look into it. Are there any pointers to the URL syntax required? Even though I noticed a version of vlc with ffmpeg/hls support awhile back, I don't think it simply takes the base64 chunk that mlb.tv gives us. So if I knew what mpv is expecting, it will help me formulate the player command.
 
Old 06-14-2015, 01:38 PM   #4704
iamtheaardvark
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
I can look into it. Are there any pointers to the URL syntax required? Even though I noticed a version of vlc with ffmpeg/hls support awhile back, I don't think it simply takes the base64 chunk that mlb.tv gives us. So if I knew what mpv is expecting, it will help me formulate the player command.
I believe it's just hls://<url>, but it might also be something like hls+http:// I just tried using Python's base64 module to decode one of the URL strings and I got something reasonable, starting with http://mlblive-akc.mlb.com. I could not play that URL in mpv...not sure why.
 
Old 06-14-2015, 09:41 PM   #4705
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by iamtheaardvark View Post
I believe it's just hls://<url>, but it might also be something like hls+http:// I just tried using Python's base64 module to decode one of the URL strings and I got something reasonable, starting with http://mlblive-akc.mlb.com. I could not play that URL in mpv...not sure why.
Of course it wouldn't be that simple. It wasn't that simple with librtmp either. Just like librtmp required all those flags and args to rtmpdump to be encoded into an ffmpeg-compatible URI, I suspect that it will be a poorly documented struggle to do the same for HLS.
 
Old 06-15-2015, 05:46 PM   #4706
iamtheaardvark
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
Of course it wouldn't be that simple. It wasn't that simple with librtmp either. Just like librtmp required all those flags and args to rtmpdump to be encoded into an ffmpeg-compatible URI, I suspect that it will be a poorly documented struggle to do the same for HLS.
OK, well it would be cool to get it working, but it's no big deal since we have mlbhls. Thanks for looking into it!
 
Old 06-22-2015, 07:30 PM   #4707
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by iamtheaardvark View Post
OK, well it would be cool to get it working, but it's no big deal since we have mlbhls. Thanks for looking into it!
Admittedly, I didn't spend very long on this, but it looks like the HLS support you found in ffmpeg is for encoding, e.g. you can make an m3u8 out of an mpeg file and stream it via HLS. I don't see any documentation pointing to using mpv/mplayer as an HLS decoder. Presumably mpv/mplayer2 should already have m3u8 support but it could be the encryption that MLBAM uses that prevents a simple drop-in replacement for mlbhls.

What you can try...

Code:
$ ./mlbplay v=kc n=1 nu=1
This should produce a base64 string. You can decode this in python:

Code:
>> from base64 import b64decode
>> b64decode(base64string_goes_here)
This should be a couple of URLS.

For example, I tried with the live Philly game and got this:

But if you try to give that, or just the m3u8 part to mplayer2/mpv, it doesn't work. As I'm sure you have already tried. So there's probably something in there, maybe that second bit that looks like it's still base64, that would tell the application how to proceed if only someone would tell me what piece that is and the command syntax.

Like I said, though, I think the HLS support you found is encoding and not playback. If you find anything else to help me out here, let me know.
 
Old 06-22-2015, 11:33 PM   #4708
iamtheaardvark
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Rep: Reputation: Disabled
mpv definitely has HLS playback -- try some of the test URLs here: http://stackoverflow.com/a/13265943. There are some other hints it's supported: a couple github issues concerning it, and the option --hls-bitrate in the man page (last option in the network options section: http://mpv.io/manual/stable/#network).

Looking more closely at the decoded URL, I think the stuff following the m3u8 filename might be passable to mpv through the --http-header-fields option (in the same man page section). Of course it would need to be parsed and reformatted so mpv can understand. I'm not sure about the encoded token immediately after the .m3u8. I don't have time to test this right now but I'll give it a shot tomorrow.

For what it's worth, this software appears to have done similar work for a number of other live-streaming services: http://docs.livestreamer.io/
 
Old 06-23-2015, 11:41 AM   #4709
iamtheaardvark
LQ Newbie
 
Registered: Oct 2014
Posts: 18

Rep: Reputation: Disabled
The encoded bit must be an encryption key, and indeed I've found a number of posts around the web regarding AES encrypted HLS, but I'm still not sure how to pass it to mpv/ffmpeg. Here's what I've tried:

- extracted a test base64 URI using mlbplay
- decoded it using python base64.b64decode
- removed the encryption key from the URI and replaced it with a ? so mpv can parse it
- took the encryption key (not including the | delimiters) and converted it to hex using python binascii.b2a_hex(binascii.a2b_base64(key))
- tried to pass the key to mpv using the --demuxer-lavf-cryptokey option

So my full mpv test command was

Code:
mpv --demuxer-lavf-cryptokey='2d7e5124a2fdc4ca4f1511904cc1f0004ad0f6ab' 'http://mlblive-akc.mlb.com/ls04/mlbam/2015/06/21/MLB_GAME_VIDEO_NYNATL_HOME_20150621/master_wired.m3u8?playback=HTTP_CLOUD_WIRED&contentId=150363783&appAccountName=mlb&eventId=14-414696-2015-06-21&ipid=33762664&sessionKey=uwV2l7tZPwjDVYnO7cmicjbL%2BfY%3D'
This does not work, but it does appear to be closer than before. It takes a second doing something (as if it's loading the stream), then I get these errors

Code:
[ffmpeg] https: HTTP error 400 Some how, we weren't able to populate request, either from cookie or URL params. Content/playback not resolved
[ffmpeg] ?: Unable to open key file https://mlb-ws.mlb.com/pubajaxws/bamrest/MediaService2_0/op-generateKey/v-2.3?contentId=150363783&kid=20036132
and then it spews out a ton more errors like this

Code:
[ffmpeg/demuxer] hls,applehttp: Failed to open segment of playlist 0
[ffmpeg] crypto: Unable to open resource: http://mlblive-akc.mlb.com/ls04/mlbam/2015/06/21/MLB_GAME_VIDEO_NYNATL_HOME_20150621/800K/21/19/21.ts
so it does find the stream, it just can't decrypt it.
 
Old 06-23-2015, 01:16 PM   #4710
thegryghost
Member
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 30

Rep: Reputation: 1
Talking

Quote:
Originally Posted by iamtheaardvark View Post
so it does find the stream, it just can't decrypt it.
If it was as simple as supplying a crypto key to ffmpeg we wouldn't need mlbhls. If you want to use ffmpeg/mpv to watch mlb stream natively, you'll need to patch up ffmpeg to do mlb.tv's service calls to get the actual decryption keys. The ffmpeg peeps will probably never accept your patches but at least you'll have a properly working HLS client, as opposed to my quick hack of a client.

Last edited by thegryghost; 06-23-2015 at 01:17 PM.
 
  


Reply

Tags
help, install, installation, instructions, seek, vlc, windows



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mlb.com gameday audio stream statmobile Linux - Newbie 6 05-06-2008 10:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration