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.
mlbviewer trunk will be used for getting basic service working for 2012
If you don't have an mlbviewer trunk copy to update, you can check it out with:
Code:
$ svn co https://mlbviewer.svn.sourceforge.net/svnroot/mlbviewer/trunk mlbviewer
Please do this in a separate directory from any nexdef branches.
nexdef2012 branch (not yet created) will be used for hacking in new features (if any) and getting nexdef to work (if it requires big changes from trunk)
nexdef2011 branch is now dead. The trunk now contains whatever changes I made since I created that branch last year (including mlbplay.py)
When a try to view (either a live stream or an archived one) I get:
An error occurred in locating the game stream
When I turn debug on the program crashes and I got the following on the terminal:
curtis@curtis2:~/mlbviewer$ python mlbviewer.py
Traceback (most recent call last):
File "mlbviewer.py", line 1626, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "mlbviewer.py", line 1307, in mainloop
u = g.url()
File "/home/curtis/mlbviewer/MLBviewer/mlbtv.py", line 1383, in url
'fingerprint': urllib.unquote(self.cookies['fprt']),
KeyError: 'fprt'
I'll add that this is the first time that I'm trying to use mlbviewer, so I have never had it working on my system.
I've looked into the bad decrypting issue and it seems the encryption keys are being changed after X amount of chunks. The previous behavior was to just use a single key for the entire game. I'll update mlbhls to fetch the new keys when needed (just like a 'real' HLS client).
I have a preliminary fix for the decryption issue, if anyone wants to test it.. try my experimental branch:
Code:
svn co https://mlbtv-hls-nexdef.googlecode.com/svn/branches/experimental mlb.exp
This code also has working (or it should be working) bandwidth switching . It will start out at the lowest bitrate (128k), calculate the average bitrate of the last 3 chunks, then switch to the highest available, without going over. It'll continuously switch depending on the average speed of the last 3 chunks. New options:
Code:
-L, --lock Toggle Adapative Bandwidth (default is on)
-b, --maxbit Limit Maximum bitrate
-m, --minbit Limit Minimum bitrate
-s, --startbit Bitrate to start at when using adaptive (default is lowest)
So, if you want the old behavior.. use -L with -s.
I've tested this on archived games and today's Live Mets/Tigers game. Let me know if you run into any troubles.
What has not been tested and may or may not work:
- Live audio
- Live video of any flavor
- Nexdef video using autobahn.jar
Thanks for your great work on this.
Archived games work for me, but live games fail with "'An error occurred in locating the game stream. 'Nonetype' object has no attribute 'groups'" error (as tested with the NYM/Detroit game).
The new MLB.TV standard streams seem to cause problems with my version of mplayer (the video "sticks" and then aborts), but that does not appear to be a mlbviewer issue, as vlc works OK.
When a try to view (either a live stream or an archived one) I get:
An error occurred in locating the game stream
When I turn debug on the program crashes and I got the following on the terminal:
curtis@curtis2:~/mlbviewer$ python mlbviewer.py
Traceback (most recent call last):
File "mlbviewer.py", line 1626, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "mlbviewer.py", line 1307, in mainloop
u = g.url()
File "/home/curtis/mlbviewer/MLBviewer/mlbtv.py", line 1383, in url
'fingerprint': urllib.unquote(self.cookies['fprt']),
KeyError: 'fprt'
I'll add that this is the first time that I'm trying to use mlbviewer, so I have never had it working on my system.
Do you have user= and pass= filled out in ~/.mlb/config? Basic question, I know. But I'm not sure why you would be getting an incomplete cookie.
Archived games work for me, but live games fail with "'An error occurred in locating the game stream. 'Nonetype' object has no attribute 'groups'" error (as tested with the NYM/Detroit game).
The new MLB.TV standard streams seem to cause problems with my version of mplayer (the video "sticks" and then aborts), but that does not appear to be a mlbviewer issue, as vlc works OK.
Live games is going to need more hacking. I don't really understand the AMF necessary for handshaking and getting a stream going with rtmpdump and why this is different for live games vs archived. The best I can do is wait for another live game (the last one just finished) and try to match my outgoing requests with what I can partially see through wireshark.
Do you have user= and pass= filled out in ~/.mlb/config? Basic question, I know. But I'm not sure why you would be getting an incomplete cookie.
I'm an idiot, I had my user name filled out (which I can use on mlb.com) but it required my full email address. Sorry about that, archived games appear to be working now. Thanks!
P.S. Maybe have it prompt with a "could not login" error, for stupid people like me
Now Im getting a different error. I'm not even getting to the game selection screen:
[kweisen@localhost mlbviewer]$ python mlbviewer.py
Traceback (most recent call last):
File "mlbviewer.py", line 1626, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.7/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "mlbviewer.py", line 474, in mainloop
+ len(coveragetoggle.get(cfg['coverage'])) + 2
TypeError: object of type 'NoneType' has no len()
Now Im getting a different error. I'm not even getting to the game selection screen:
[kweisen@localhost mlbviewer]$ python mlbviewer.py
Traceback (most recent call last):
File "mlbviewer.py", line 1626, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.7/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "mlbviewer.py", line 474, in mainloop
+ len(coveragetoggle.get(cfg['coverage'])) + 2
TypeError: object of type 'NoneType' has no len()
Change the speed in your config file to 1200. Prior default was 800 but I don't think they are going to have an 800K stream this year from the debugging I've done so far.
Change the speed in your config file to 1200. Prior default was 800 but I don't think they are going to have an 800K stream this year from the debugging I've done so far.
Yes, that was it. Now I can select the games. Still, can just listen to the archived games. With live, getting the 'Nonetype' object has no attribute 'groups' error, but from I read, others are also.
Yes, that was it. Now I can select the games. Still, can just listen to the archived games. With live, getting the 'Nonetype' object has no attribute 'groups' error, but from I read, others are also.
Thanks for your help.
Yeah. I don't know that I checked in the "fix" for live games yet.
Brief answer, live games are not working yet and I am aware of this. I have been able to test a fix for live games just now and it seems to work. However, this seems "fix" seems to break archived games. A bit more testing needs to be done and I don't think I will be home tonight before the last live game finishes.
Hopefully I'll have a fix for live games (without breaking archived games) sometime this weekend.
I have a preliminary fix for the decryption issue, if anyone wants to test it.. try my experimental branch:
Code:
svn co https://mlbtv-hls-nexdef.googlecode.com/svn/branches/experimental mlb.exp
This code also has working (or it should be working) bandwidth switching . It will start out at the lowest bitrate (128k), calculate the average bitrate of the last 3 chunks, then switch to the highest available, without going over. It'll continuously switch depending on the average speed of the last 3 chunks. New options:
Code:
-L, --lock Toggle Adapative Bandwidth (default is on)
-b, --maxbit Limit Maximum bitrate
-m, --minbit Limit Minimum bitrate
-s, --startbit Bitrate to start at when using adaptive (default is lowest)
So, if you want the old behavior.. use -L with -s.
I've tested this on archived games and today's Live Mets/Tigers game. Let me know if you run into any troubles.
Oooh! I definitely want to try this out. But right now, I'm focusing my effort on getting basic service working. Hopefully I'll have that working tomorrow so I can test this out with premium service.
Thanks for your continued support of this fine tool.
I believe I have a fix for live audio and video for basic service.
Tested and working:
- Live audio
- Live basic service video
- Archived audio
- Archived basic service video
Let me know how this all works.
Next up: If basic service is working, I'll look at what it will take to integrate the latest changes to mlbhls into mlbviewer. I tested briefly last night and it occasionally cycled to a different stream speed. Mplayer handled this perfectly but it might be worth it to add in some configuration file option to specify the command-line options to mlbhls for those who want to try to lock on the desired bitrate.
I'm an idiot, I had my user name filled out (which I can use on mlb.com) but it required my full email address. Sorry about that, archived games appear to be working now. Thanks!
P.S. Maybe have it prompt with a "could not login" error, for stupid people like me
Better to figure out why the login code isn't catching the "login unsuccessful" status. I'll put it on the list for later after all basic/nexdef/highlights/condensed, etc functionality is taken care of. But at least I know how to reproduce this now.
I believe I have a fix for live audio and video for basic service.
Tested and working:
- Live audio
- Live basic service video
- Archived audio
- Archived basic service video
Let me know how this all works.
Next up: If basic service is working, I'll look at what it will take to integrate the latest changes to mlbhls into mlbviewer. I tested briefly last night and it occasionally cycled to a different stream speed. Mplayer handled this perfectly but it might be worth it to add in some configuration file option to specify the command-line options to mlbhls for those who want to try to lock on the desired bitrate.
It works! I can get both the live and archived audio. Thanks for your work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.