LinuxQuestions.org
Help answer threads with 0 replies.
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 08-21-2013, 11:15 PM   #4216
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86

Quote:
Originally Posted by charlie460 View Post
I've been getting this quite a bit lately, on TOR/NYY, I am in France, not a blackout area, the NYY feed results in this error (TOR works):

Code:
An error occurred locating the media URL: Stream URL not found in reply. Stream may not be available yet.
Can you follow the instructions for test/mediaxml.py on the last page? NYY has an in-market broadcast (Yankees on YES) that might be getting selected over the regular broadcast. If you can paste those statuses here, I might see if I'm picking the wrong broadcast.

I can't seem to connect to pastebin.com or I'd ask you to paste the whole unsuccessful-2.xml there. If you can reach them, do that. I might be able to reach them from work.

Basically, I can tell you nothing from that error message, but I can probably tell quite a bit from what's in your ~/.mlb/unsuccessful-2.xml.
 
Old 08-22-2013, 12:39 PM   #4217
mgoetze
LQ Newbie
 
Registered: Aug 2013
Posts: 12

Rep: Reputation: Disabled
For some reason I can no longer log into mlb.com. When I start mlbviewer I get

"Logging into mlb.com..."
"Something went wrong. A more descriptive error should be here."
"No listings available for this day."

If I try to change the day I get "There was a parser problem with the listings page."

All this while I can still log on to mlb.tv with my browser and watch games there.

Funnily enough, I can switch to the MiLB listings with M and even watch games there. If I then switch back to the major league listings with l, the program crashes.

Traceback (most recent call last):
File "./mlbviewer.py", line 1014, in <module>
curses.wrapper(mainloop, mycfg, mykeys)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "./mlbviewer.py", line 181, in mainloop
mywin.statusRefresh()
File "/home/mgoetze/mlbviewer2013/MLBviewer/mlbListWin.py", line 250, in statusRefresh
+ len(speedstr) + len(hdstr) + len(coveragestr) + 2
TypeError: object of type 'NoneType' has no len()
 
Old 08-23-2013, 12:17 AM   #4218
mkomko
Member
 
Registered: Mar 2010
Posts: 97

Rep: Reputation: 3
Just for info: It works for me...
 
Old 08-23-2013, 03:16 AM   #4219
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by mgoetze View Post
For some reason I can no longer log into mlb.com. When I start mlbviewer I get

"Logging into mlb.com..."
"Something went wrong. A more descriptive error should be here."
"No listings available for this day."

If I try to change the day I get "There was a parser problem with the listings page."

All this while I can still log on to mlb.tv with my browser and watch games there.

Funnily enough, I can switch to the MiLB listings with M and even watch games there. If I then switch back to the major league listings with l, the program crashes.

Traceback (most recent call last):
File "./mlbviewer.py", line 1014, in <module>
curses.wrapper(mainloop, mycfg, mykeys)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "./mlbviewer.py", line 181, in mainloop
mywin.statusRefresh()
File "/home/mgoetze/mlbviewer2013/MLBviewer/mlbListWin.py", line 250, in statusRefresh
+ len(speedstr) + len(hdstr) + len(coveragestr) + 2
TypeError: object of type 'NoneType' has no len()
I cannot reproduce this.

But that particular line of code is:

Code:
        status_str_len = len(status_str) +\
                            + len(speedstr) + len(hdstr) + len(coveragestr) + 2
So that error message is saying one of those fields is NoneType (null value.)

From your config, what are the values for:
  • speed=
  • adaptive_stream=
  • coverage=
 
Old 08-23-2013, 03:40 AM   #4220
mgoetze
LQ Newbie
 
Registered: Aug 2013
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
  • speed=
  • adaptive_stream=
  • coverage=
speed=3000

adaptive_stream=0

coverage=home

I see now that 3000 is not actually a valid speed, it works with 1800. The error is rather, uh, misleading though.
 
Old 08-23-2013, 05:01 AM   #4221
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by mgoetze View Post
speed=3000

adaptive_stream=0

coverage=home

I see now that 3000 is not actually a valid speed, it works with 1800. The error is rather, uh, misleading though.
3000 is a nexdef only speed. You can set it as max_bps which now takes kbps values but speed itself only goes up to 2400.

I have checked in a fix that defaults the speed to 1200 if the speed is set to an invalid value and prints an error message when it does this.
 
1 members found this post helpful.
Old 08-26-2013, 01:05 AM   #4222
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Checked in fix for innings showing spoilers for home victories. I didn't realize this was happening again but looking at the code, I was actually only hiding home losses. Now I'm hiding both losses and victories again.
 
Old 08-26-2013, 01:14 AM   #4223
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Haven't forgotten about adding wildcard games back to standings except it's not that straightforward. Current standings code can just process the standings from top to bottom straight into printable strings. Wildcard is held in a different data structure (from the same standings request) but sorted in wildcard order. So I either have to add a new window just for wildcard standings, or I have to convert my standings from a list of printable strings to some kind of indexed, yet ordered, structure where I can insert the WCGB, WCE#, and E# entries. I'll try to get it done this week. Even if my Royals are looking like too much of a long shot...
 
Old 08-26-2013, 12:26 PM   #4224
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Fix to get mlbhls -F working in all players

Phew, okay, I've figured out the puzzle of why mlbhls options -f and -F have been grabbing different streams, and how to get -F working in all players (including mplayer 1.1).

The playlist files for the game streams contain what looks like an encryption key every minute. mlbhls's -f option sets the start position to the specified key, while -F has simply been grabbing the line nearest to the time specified. (So mlbhls -f 6 would start at the sixth key, around minute 6 of the stream, probably around line 130 or so of the file.) I'm guessing that this means that -F has usually been grabbing up to a minute of still-encrypted data, which some players can't parse.

The patch below contains an extra check for the lines containing keys, and sets the stream position to the last key line before the time specified by -F. So the start position may be up to a minute before the specified time, but it should now always be properly decrypted.

I tried to keep the patch as tidy as I could, but my C skillz are nonexistant, so if anybody spots any trouble with the patch please post an alert here.

Hope people find this helpful -- I know I will relish getting rid of my silly dd hack!

Here's the patch:
Code:
Index: branches/experimental/mlb.c
===================================================================
--- branches/experimental/mlb.c	(revision 67)
+++ branches/experimental/mlb.c	(working copy)
@@ -1484,20 +1484,27 @@
 
 							if (master->streams[i].line_count > (diff2*1.5))
 							{
-								int s, q=0;
+								int s, q=0, k=0;
 								char tmp_str[MAX_STR_LEN] = {0};
 
 								for(s=0; s< master->streams[i].line_count; s++)
 								{
 									mlb_stream_getline(&master->streams[i], s, (char*)&tmp_str, MAX_STR_LEN);
 									if (tmp_str[0] == '#' && tmp_str[1] == 'E' && tmp_str[2] =='X' && tmp_str[3] =='T' &&
+										tmp_str[4] =='-' && tmp_str[5] =='X' &&  tmp_str[6] =='-' && tmp_str[7] =='K' &&
+										tmp_str[8] =='E' && tmp_str[9] =='Y' &&  tmp_str[10] ==':') // check if the temp string starts "#EXT-X-KEY:"
+									{
+									k = s;
+									}
+									if (tmp_str[0] == '#' && tmp_str[1] == 'E' && tmp_str[2] =='X' && tmp_str[3] =='T' &&
 										tmp_str[4] =='I' && tmp_str[5] =='N' &&  tmp_str[6] =='F' && tmp_str[7] ==':')
 									{
 										q++;
 										if (q == diff2)
 										{
 //											printf("OFFSET!! %d (%s)\n", s, tmp_str);
-											master->current_seg_line = s+1;
+											master->current_seg_line = k;
+											//master->current_seg_line = s+1;
 											break;
 										}
 									}

Last edited by fang2415; 08-26-2013 at 03:08 PM. Reason: typo, not in the code
 
Old 08-26-2013, 03:28 PM   #4225
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Hmm, I just played around a bit with mplayer2, and I realize that my hypothesis about decryption may not be right: mplayer2 can read the stuff that a unpatched mlbhls -F grabs even before it gets to the first key, which I assume wouldn't be possible if that data was actually encrypted. VLC, on the other hand, just pauses until it gets to where the first key is and plays from there; mplayer 1.1 apparently doesn't wait so long and simply crashes immediately.

So probably not actually an encryption issue, but maybe the key URL also provides some header information that helps less permissive video players to read the file?

Not sure if it matters either way -- I know I'm just enjoying not having to run mlbhls manually any more!...
 
Old 08-27-2013, 12:41 AM   #4226
mkomko
Member
 
Registered: Mar 2010
Posts: 97

Rep: Reputation: 3
Wow, good job fang2415! I haven't been able to try it yet but I hope thegryghost can take a look at that and incorporate it into his code! For the next time the rtmp streams fail ;-). Thanks.
 
Old 08-30-2013, 02:14 AM   #4227
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN revision 529: E# and WCGB added to standings

So it turns out I had 'elim' and gb_wildcard' in the team data structure all along. I just wasn't extracting those pieces into the team dictionaries that the standings are constructed with.

I have inserted E# and WCGB into the standings display and shifted RS, RA, and +/- off the 80x24 display. These columns still exist in the standings window. You just have to maximize or expand the terminal width.
 
Old 09-05-2013, 02:39 PM   #4228
WaltH
LQ Newbie
 
Registered: Sep 2013
Posts: 24

Rep: Reputation: Disabled
Teams missing from standings/one other question

Has anyone run across this? When I set a team as a favorite (e.g., favorite=bos) in the config file then go into mlbviewer, that team no longer shows up in the standings. If I leave the favorite field blank in the config file, then all teams appear in the standings.

I just found out about this program today, and I love it! I'm sure someone else has asked about this and/or it may have already been addressed, but is there a way in Xfce (SolydX with the Whisper Menu) to create menu entries for both mlbviewer and mlbvideos? If so, it is hopefully easy as I am not much good at code and such. If not, then I guess I'll be getting more familiar with using the terminal.

Thanks!
 
Old 09-05-2013, 11:33 PM   #4229
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by WaltH View Post
Has anyone run across this? When I set a team as a favorite (e.g., favorite=bos) in the config file then go into mlbviewer, that team no longer shows up in the standings. If I leave the favorite field blank in the config file, then all teams appear in the standings.

I just found out about this program today, and I love it! I'm sure someone else has asked about this and/or it may have already been addressed, but is there a way in Xfce (SolydX with the Whisper Menu) to create menu entries for both mlbviewer and mlbvideos? If so, it is hopefully easy as I am not much good at code and such. If not, then I guess I'll be getting more familiar with using the terminal.

Thanks!
I have fixed this in the latest SVN revision. If you downloaded from sourceforge, read the bit in the README about how to checkout the SVN version (you'll need the subversion package from your distro.) If you already have the SVN version, just do an "svn up".

The problem was, that if use_color=0, most everywhere else, mlbviewer will underline the team. I didn't really like the way this looked in standings when I wrote that code. Looking at it now, I think it's okay. Not great, but I'm not going to put in the effort to fix the underlining to not underline the spaces. If you aren't crazy about the underlining, try setting use_color=1 and read the README about selecting the color to use for favorite_color= (default is cyan.)

As for xfce menu items, search google:

Code:
https://www.google.com/search?q=xfce+menu+items
The command in the menu will be something like this:

Code:
xterm -e /home/matthew/mlb2013/mlbviewer.py
Replace that last part with the full path to your mlbviewer or mlbvideos.
 
Old 09-06-2013, 12:19 PM   #4230
WaltH
LQ Newbie
 
Registered: Sep 2013
Posts: 24

Rep: Reputation: Disabled
Thanks, daftcat! I found out my distro has a program called Alacarte that allows adding menu items to the Whisker Menu in Xfce. Found a couple of baseball icons I could use and I am set with separate menu listings for MLBviewer, MLBvideos, and MLBstats.

Last edited by WaltH; 09-06-2013 at 12:59 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 09:02 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