LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-03-2016, 09:15 AM   #4801
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled

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.
 
Old 04-03-2016, 09:25 AM   #4802
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
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.
Attached Files
File Type: txt retry.patch.txt (2.8 KB, 13 views)
 
Old 04-03-2016, 12:01 PM   #4803
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
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.
 
Old 04-03-2016, 12:09 PM   #4804
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by tonycpsu View Post
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.
 
Old 04-03-2016, 12:16 PM   #4805
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by chrisVV View Post
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.
 
Old 04-03-2016, 12:21 PM   #4806
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
OK, I created a fork here with chrisVV's m3u8 parsing fix and my retry logic patch. The changes are in the "experimental" branch.

And yeah, I'm concerned about the 5/1 deadline as well -- they'll lose me as a customer if I don't have a way to watch the games on my laptop.
 
Old 04-03-2016, 01:19 PM   #4807
gwynp
LQ Newbie
 
Registered: Apr 2016
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by tonycpsu View Post
OK, I created a fork with chrisVV's m3u8 parsing fix and my retry logic patch. The changes are in the "experimental" branch.
Thanks tonycpsu - I cloned this and I'm using it now, the picture quality is really good.
 
Old 04-03-2016, 01:58 PM   #4808
HFinch
LQ Newbie
 
Registered: Apr 2016
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
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.

Thanks, and sorry for jumping the gun.
 
Old 04-03-2016, 06:48 PM   #4809
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
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)?
 
Old 04-03-2016, 09:43 PM   #4810
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
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.
 
Old 04-04-2016, 01:49 AM   #4811
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
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...??
 
Old 04-04-2016, 02:20 PM   #4812
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Quote:
Originally Posted by tonycpsu View Post
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?
 
Old 04-04-2016, 03:23 PM   #4813
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
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.
 
Old 04-04-2016, 05:41 PM   #4814
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by BostonPeng View Post
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.

In any event, time will tell.
 
Old 04-04-2016, 09:59 PM   #4815
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
Quote:
Originally Posted by chrisVV View Post
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.
 
  


Reply

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:25 AM.

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