Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Recent adopter of MLBviewer. Not sure how many kin I’ll have here, but I’m running Mac OS X 10.9.2 with MLBviewer revision 590 and mlbhls revision 67 with the video player mpv v0.3.6--which, as I understand it, is the successor to mplayer2--built with ffmpeg 2.2. I quite like the setup overall, but I’m having the seeking problems that others have described. When watching nexdef streams using MLBviewer, I’m unable to seek. But using the following options; which daftcat offered in response to kermitfan22 last August (on page 279); I can get a stream that is seekable by mpv and vlc (I can’t get mplayer2 to build):
I’d like to get a seekable stream from MLBviewer even if that means using -f instead of -F in the mlbhls options and losing support for inning selection. Alternatively, I’ve looked at fang2415’s patch to mlb.c in mlbhls, but I don’t know how it works, or I’m implementing it incorrectly (I don’t code) because the streams from MLBviewer remain unseekable. Though I am able to seek (using mpv or vlc) in the following file:
I'd greatly appreciate any pointers, especially re fang2415's patch to -F and the way that MLBviewer uses -F
I'm also curious about the extent of adoption of mpv.
mlbhls is not my code. I recommend trying to send fang2415 a private message to see if he can explain the patch to you. I am hesitant to fix anything around mlbhls right now as MLBAM says there will be a new player that does away with the Nexdef plugin. I do not know if that means they'll do away with the HLS streams or if they are integrating an HLS client into the Flash application.
As for mpv, if it accepts playing a stream from standard input (e.g. "mplayer2 -"), you should be able to just change the video_player= line in ~/.mlb/config to use mpv instead of mplayer.
I have been reading through the forum and looking online and was wondering if anyone could point me to a post or an article that could help a relative linux noob set this up for the upcoming season. I am not completely helpless but am relatively new to linux.
I am currently running Linux Mint and have mlb.tv premium.
If the articles from 2012 are still accurate I can follow those but I am not sure if they are still applicable.
If either of those are incomplete, let me know so I can update them. I'd rather have a good Wiki page than have to answer this question several times a season.
mlbhls is not my code. I recommend trying to send fang2415 a private message to see if he can explain the patch to you. I am hesitant to fix anything around mlbhls right now as MLBAM says there will be a new player that does away with the Nexdef plugin. I do not know if that means they'll do away with the HLS streams or if they are integrating an HLS client into the Flash application.
As for mpv, if it accepts playing a stream from standard input (e.g. "mplayer2 -"), you should be able to just change the video_player= line in ~/.mlb/config to use mpv instead of mplayer.
Thanks. mpv works fine with video_player=mpv in ~/.mlb/config; it's just that I can't seek in the streams sent to it by mlbviewer.py or mlbplay.py, whereas I can seek in the MPEG-TS output file generated when I run mlbhls manually. I can manage that way until we see what MLBAM does; though I prefer the curses GUI
Wondering how many people will adopt mpv (fork of mplayer2 and MPlayer) since mplayer2 development seems to have stopped.
The new player is live on the MLB site. RTMP streams are no longer officially available in the player. HLS support is now built in to the flash player. This is very disappointing, the extra delay with HLS really stinks.
The new player is live on the MLB site. RTMP streams are no longer officially available in the player. HLS support is now built in to the flash player. This is very disappointing, the extra delay with HLS really stinks.
However, RTMP streams still appear to work via mlbviewer. Am I missing something?
However, RTMP streams still appear to work via mlbviewer. Am I missing something?
Yeah, perhaps I could have phrased that a bit better. RTMP is working fine but I'm assuming this will not last, since PC was the only platform it was used on... feel free to voice your displeasure on the MLB.TV support forums:
Ah damn...I loved the RTMP streams! I don't get why they need this NexDef/HLS crap at all - just provide a normal, I don't know, 5000kbps RTMP stream and everyone is happy.
I guess now we have to focus on how to get a normally seekable stream out of HLS...I gotta try fang2415's mlbhls patch.
I'd greatly appreciate any pointers, especially re fang2415's patch to -F and the way that MLBviewer uses -F
I'm also curious about the extent of adoption of mpv.
Yeesh, now I need to figure out how to apply my own patch! (I don't code much either )
I think that what you'll need to do is to download the patch file I posted on page 288, as well as an up-to-date mlbhls source directory. Then do this:
Code:
cd /path/to/mlbhls/source/directory
patch < /path/to/patchfile
Hopefully, that'll do the trick. You can check it by doing
Code:
grep 'k=0' mlb.c
If it worked, the output should be 'int s, q=0, k=0;'.
Once you've got that, recompile mlbhls (type "make" from the source dir), and move the resulting "mlbhls" file to wherever your old one lived (probably something like /usr/bin/mlbhls).
That should make mlbhls -F grab the same streams as the corresponding -f does. If not then let me know what happens and I may be able to remember some clues about how to help debug it...
If it worked, the output should be 'int s, q=0, k=0;'.
I seem to have applied it correctly, but -F doesn't seem to be the root of the problem that I've been having. It's probably just some very basic difference between playing the http live stream as stdout from mlbhls (via the "-o -" option that mlbMediaStream.py uses) and playing a local MPEG-TS file (e.g. generated by "-o local_file.ts") that I'm not understanding because I'm new to this. If I change "-o -" to "-o local_file.ts" in mlbMediaStream.py, then MLBviewer generates a fully seekable file, whereas the stream from "-o -" returns to the beginning when I try to seek. I can't check it right now, but maybe I just need to tell mpv more about the stream it's receiving by enabling some demuxer option or something. In which case, sorry for my ignorance, but thanks to everyone nonetheless.
I seem to have applied it correctly, but -F doesn't seem to be the root of the problem that I've been having. It's probably just some very basic difference between playing the http live stream as stdout from mlbhls (via the "-o -" option that mlbMediaStream.py uses) and playing a local MPEG-TS file (e.g. generated by "-o local_file.ts") that I'm not understanding because I'm new to this. If I change "-o -" to "-o local_file.ts" in mlbMediaStream.py, then MLBviewer generates a fully seekable file, whereas the stream from "-o -" returns to the beginning when I try to seek. I can't check it right now, but maybe I just need to tell mpv more about the stream it's receiving by enabling some demuxer option or something. In which case, sorry for my ignorance, but thanks to everyone nonetheless.
You really should not change the "-" in mlbMediaStream.py. Even though I don't officially support downloading, there is "hidden" support for it in prepareFilename() in that file. Just read some of the comments in that routine and change your video_player= command to use those "%" flags as needed. There's an argument for mplayer/mplayer2 to write a stream to file. Search the online docs for it and mangle your video_player= line instead of the mlbhls line in my code.
Also, finding an mplayer2 binary might be easier than trying to sort this out with mpv. I'm at work right now so I can't test seeking but I'll have a look into mpv tonight perhaps.
Also, late last season I added "Free Game Of The Day" support. So all season long, whenever you see "[FREE]", that means you don't need an MLB.TV subscription to watch it. Just make sure you have your mlb.com (free registration) user= and pass= in your config.
Unrelated question: How many of you are Spotify subscribers? I just discovered pyspotify last night and I am strongly considering a mlbviewer/mlbclassics type interface for Spotify.
Also, first look at mpv. Seeking seems to work okay for me. It takes a second or two to resume playback (probably re-fetching cache) but audio and video are in sync when playback resumes. Looks like I have already patched my mlbhls, though.
gcc -O2 mlb.c utils.c output.c -lm -lcrypto -lpthread -lconfig -lcurl -o mlbhls
mlb.c: In function ‘mlb_refresh_playlists_thread’:
mlb.c:460:6: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘size_t’ [-Wformat]
Basic is working for me, and Nexdef used to work, but hasn't been working since the middle of last season. I've finally looked into this, and when I try with nexdefdl.py I get...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.