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.
I just tested the patch with a few of yesterday's games with min_bps = max_bps = 3500 and things look good. Definitely not as crisp as the 4500kbps bandwidth from last season, but still an acceptable 1280x720 stream, and certainly better than the adaptive flickering. Thanks, chrisVV.
Looking at the mlbhls code in some more detail, it occurs to me that it shouldn't be that heavy a lift to port what's in there to Python to make things easier to maintain in the future if there are more upstream changes. All it's really doing is parsing the URLs, grabbing TS segments, decrypting them, and appending them to the output file/pipe. It seems to have a bunch of other code in there for launching programs on the output file, writing the resulting data to a TCP/UDP stream, etc. but I doubt any of that functionality is getting much use, and such things would be trivial to add in Python on top of the core functionality of grabbing and decrypting the video segments.
Since what we have is working now, I can't say that it would be my highest-priority side project, but as the season goes on maybe I'll crack this open again, especially if anyone can figure out where those higher-bandwidth streams are.
BTW, in case it helps anyone else, here is the patch I did a while back to have mlbhls retry segment downloads. I was tired of streams crapping out when there was a momentary problem grabbing video segments, either due to upstream problems or wifi crapping out, so I added some logic for it to keep trying when a segment fails to download. It maxes out at 10 retries.
Great work guys! Can you create a github for mlbhls with the new patches? I don't think the original author will mind. He has moved on to bigger and better things.
I just tested the patch with a few of yesterday's games with min_bps = max_bps = 3500 and things look good. Definitely not as crisp as the 4500kbps bandwidth from last season, but still an acceptable 1280x720 stream, and certainly better than the adaptive flickering. Thanks, chrisVV.
Looking at the mlbhls code in some more detail, it occurs to me that it shouldn't be that heavy a lift to port what's in there to Python to make things easier to maintain in the future if there are more upstream changes. All it's really doing is parsing the URLs, grabbing TS segments, decrypting them, and appending them to the output file/pipe. It seems to have a bunch of other code in there for launching programs on the output file, writing the resulting data to a TCP/UDP stream, etc. but I doubt any of that functionality is getting much use, and such things would be trivial to add in Python on top of the core functionality of grabbing and decrypting the video segments.
Since what we have is working now, I can't say that it would be my highest-priority side project, but as the season goes on maybe I'll crack this open again, especially if anyone can figure out where those higher-bandwidth streams are.
I like the idea of a Python implementation. I had tried years ago to do it myself but I didn't understand the AES code or the Python AES module well enough to get anything working.
I'm also nervous about the May 1 date and what exactly is going to be deprecated then.
This also seems to show that the HLS stream speeds have changed: they are now 450K, 800K, 1200K, 1800K, 2500K and 3500K. That may require separate patches to mlbviewer (I do not know what the NEXDEF_SPEEDS variable actually does).
I'm not sure what that tuple is used for either. I see it defined in mlbConstants.py but not referenced anywhere else. Maybe it was going to be used for interface and I never got around to it.
Aside from bug fixes, I want to freeze development (mostly because I'm overworked anyway) until after May 1 to see if they are just deprecating a web player or if backend is changing/going away too.
You got stream. Be patient. How long did you give this?
Depending on the buffer size you selected in your mplayer command, it could take several seconds for the picture to appear. That could seem like an eternity when you are getting a wall of "ERROR" messages. Those are coming from mplayer which is why/how I can say you got the stream. The A: V: stuff is also from mplayer. Neither should be cause for concern alone.
1. Try waiting longer.
2. Try a different speed or stream (home vs away or another game)
3. If you still don't get picture, read the TOOLS file and create a small download using mlbgamedl.py or nexdefdl.py. When you have a downloaded file, you can isolate the video playback problem (as it would seem to be if stream is there but no picture) to the mplayer command or your driver setup and consult Google on "mplayer no video".
You got Linux up and running and my program and its dependencies installed correctly. That's more than most can say. You did get stream. You're almost there. You can do this.
Well I did say I was a linux newbie...
You are right I do have the stream. It seems to only do the error thing while waiting for the game to start or while on commercial break.
Wow, great work on the mlbhls fixes guys! I'll try to give them a spin tomorrow. Also sounds like a great idea to merge the functionality into the Python code, sounds like that could make things a lot easier both for development and for idiot users like me!
tonycpsu, now that we've got a live mlbhls fork, might that make it fairly easy to apply to the public source my patch for the -F functionality? That would be great since it means that the mlbhls streams that mlbviewer downloads can be viewed with any media player (not just mpv) without users having to find and apply the patch locally! The patch is attached to this comment; let me know if you'd prefer me to clone the git repo and send you a pull request and I can (remember how to use git properly and then) do that.
Also, would the new fork make it easy to rearrange the branches so that the master branch is the correct one (rather than the "experimental" one)?
fang2415, I'm pretty sure I had already applied the -F patch to my local copy of the source code, and that it got included with my retry patch by mistake. So it should be in there, just not explicitly called out as such.
In terms of the experimental vs. master branch, I'll wait a bit to see if there are any upcoming changes from MLB.tv in the next month or so and if things are stabilized, I'll move it all over to master.
Hello from Germany!
As season is on its way I just returned to this forum, reading interesting things about my favorite mlb player (thanks again, daftcat, for all your work and of course thanks to all you other guys!!)...
Just one question: What the hell is going to happen on may 1st...??
fang2415, I'm pretty sure I had already applied the -F patch to my local copy of the source code, and that it got included with my retry patch by mistake. So it should be in there, just not explicitly called out as such.
Ah, yep, looks like it's there all right -- all the archived streams I've tried now seem to be working in mplayer(1) at the expected speeds. Thanks again to you and chrisVV for patching it up -- hopefully it'll keep on working now with no more major headaches!
But, uh, yeah, what are they saying will happen on May 1?
It looks like the biggest change for 1 May will be the end of support for older Flash versions. Linux is stuck at version 11 as Adobe no longer supports Linux for the newer versions. I'm seeing version 21 for Windows 8 and 10. I really hope this won't be a deal-breaker for mlbviewer because as of 1 May I won't be able to watch my beloved Dodgers with the browser-based player.
ETA: According to the MLB.TV system requirements page audio is supported for Flash 10+, but I can't seem to get video streaming in Chrome, despite having a Flash 21 plugin built into Chrome. I may need to do some more poking about on this issue if mlbviewer is bitten by the new requirements.
ETA2: Never mind about my Flash whining. Chrome doesn't seem to like MLB.TV but Fx plays it okay. Dammit. I never fire up Fx anymore.
Last edited by BostonPeng; 04-04-2016 at 03:29 PM.
It looks like the biggest change for 1 May will be the end of support for older Flash versions. Linux is stuck at version 11 as Adobe no longer supports Linux for the newer versions. I'm seeing version 21 for Windows 8 and 10. I really hope this won't be a deal-breaker for mlbviewer because as of 1 May I won't be able to watch my beloved Dodgers with the browser-based player.
ETA: According to the MLB.TV system requirements page audio is supported for Flash 10+, but I can't seem to get video streaming in Chrome, despite having a Flash 21 plugin built into Chrome. I may need to do some more poking about on this issue if mlbviewer is bitten by the new requirements.
ETA2: Never mind about my Flash whining. Chrome doesn't seem to like MLB.TV but Fx plays it okay. Dammit. I never fire up Fx anymore.
Stop worrying. It seems highly unlikely that the HLS streams will be switched off because as far as I can tell that is what the latest flash viewer uses. It is possible, though unlikely, that the RTMP streams will go.
If you want to use Chrome with MLB.TV, then when the flash interface presents itself go to settings and choose the Standard Video option (or something like that, I can't remember the exact words, but it is the last option of the settings). You will not get audio overlay however, and it may be (or may not be) that it will disappear on 1st May. But I suspect that all they are going to switch off is their old flash interface to the existing streams, not any of the existing streams themselves.
Stop worrying. It seems highly unlikely that the HLS streams will be switched off because as far as I can tell that is what the latest flash viewer uses. It is possible, though unlikely, that the RTMP streams will go.
If you want to use Chrome with MLB.TV, then when the flash interface presents itself go to settings and choose the Standard Video option (or something like that, I can't remember the exact words, but it is the last option of the settings). You will not get audio overlay however, and it may be (or may not be) that it will disappear on 1st May. But I suspect that all they are going to switch off is their old flash interface to the existing streams, not any of the existing streams themselves.
In any event, time will tell.
Thanks, Chris. It is called Standard Video, and there's a note that enabling it disabled the Live DVR functionality. I can now use the new video page.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.