LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 07-06-2010, 01:48 PM   #3016
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76

Quote:
Originally Posted by fang2415 View Post
Hah, okay, turns out that (I thought) I had commented out the default mplayer options in .mlb/config; after setting show_player_command=1, I realized that it was trying to run "rtmpdump blahblah|mplayer #-cache 64 -really-quiet -". Doubt that's the desired behavior, but pretty easy to work around. Although still not sure why that would throw "ERROR: Download"...

Anyway, after fixing that (by getting rid of the #), I remembered why I had put it in in the first place: mplayer does seem to be doing something, but all it shows is "1027kb / 43 s" (or something similar) -- the numbers keep increasing for a few minutes with no sound, then the player cuts. My mplayer is pretty old (1.0rc2-4.3.2-DFSG-free, from Debian Lenny); I guess I could (ugh) try compiling a newer one.

Also, I'm getting access restrictions frequently. Is there a reason why mlbviewer might be failing to log out properly?

Guess I'll try vlc tomorrow when the access ban wears off, then if that doesn't work, bite the bullet and compile a new mplayer...
Hi! Sorry it's taken me awhile to reply.

The config file code isn't how you expect it to be. Only full lines that begin with the # character are ignored. A # character that appears in the middle of the line will be treated literally. So you were feeding mplayer a command string it didn't recognize and mplayer was bailing out. The counter figures and the error message you were seeing were actually from rtmpdump wondering where its output file went (mplayer reading from standard input.)

You can try these instead:

Code:
#audio_player=mplayer -cache 64 -really-quiet
audio_player=mplayer
Then just switch the line that begins with "#" when you want to try different options.

Incidentally, putting "-" at the end of the command is not necessary as mlbviewer does that for you.

Last edited by daftcat; 07-06-2010 at 01:51 PM.
 
Old 07-06-2010, 03:54 PM   #3017
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Yeah, sorry, maybe my earlier post wasn't too clear:

When the config line read "audio_player=mplayer #-cache 64 -really-quiet", I got the download error (with no counters).

I then realized that the hash wasn't commenting out the end of the line, so I tried it with both "audio_player=mplayer -cache 64 -really-quiet" and with just "audio_player=mplayer". Both of those gave me the counters with no error message (or sound).

I haven't tried putting "-" in the config lines (or "%s") but I assume that's not the problem here.

Is there a way to write the debug/show_player_command output to a file? I'd post it here but right now it's just flashing to the screen too fast for me to grab (and I can't find it in ~/.mlb/log).

Haven't tried vlc / compiling mplayer yet, hope to get around to it this evening...
 
Old 07-06-2010, 11:10 PM   #3018
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Uh, well, I guess I've solved this problem, sort of. To avoid irking MLBAM, I won't go into too much detail, but let's just say that I am now sure that rtmpdump is getting the stream properly, that that output can be piped to other programs, and that my old mplayer can play that output. But only with a disk in between -- that is, I can do rtmpdump -> disk -> mplayer, but not rtmpdump -> mplayer.

Soo, my workaround sorta makes this a bug into a feature, but not in the way that the software intends... Any ideas why the direct pipe to mplayer wouldn't work? Just in case anybody else gets the same issue and doesn't want to have to work around it?
 
Old 07-08-2010, 03:28 AM   #3019
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by fang2415 View Post
Uh, well, I guess I've solved this problem, sort of. To avoid irking MLBAM, I won't go into too much detail, but let's just say that I am now sure that rtmpdump is getting the stream properly, that that output can be piped to other programs, and that my old mplayer can play that output. But only with a disk in between -- that is, I can do rtmpdump -> disk -> mplayer, but not rtmpdump -> mplayer.

Soo, my workaround sorta makes this a bug into a feature, but not in the way that the software intends... Any ideas why the direct pipe to mplayer wouldn't work? Just in case anybody else gets the same issue and doesn't want to have to work around it?
How old is your rtmpdump? v1.6 was the first version that supported piping to stdout. But v1.8 is the first version that doesn't require the patch I include. I think they are up to v2.2c which works well for me.
 
Old 07-08-2010, 07:52 PM   #3020
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Nope, rtmpdump is at v2.3 at least, cuz that what I've got.

I have noticed that although mplayer plays the saved stream, it doesn't seem very comfortable with it -- if I try seeking at all it says "[flv @ 0xb7fd8108]skipping flv packet: type 97, size 7627011, flags 0" about 50 times (but with different numbers) and then dies. And my vlc won't play it at all (it just says "[00000281] main playlist: nothing to play"). So maybe mplayer is missing some metadata or something and as a result can neither seek nor pick up from the middle of a live stream?

I am so going to have to compile a new mplayer. And I am so procrastinating doing it. If anybody has any other suggestions in the meantime, please let me know so I can put it off longer.
 
Old 07-20-2010, 12:24 AM   #3021
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Well, as it turns out, my reluctance to compile mplayer was incredibly justified. I've now spent about five full-time days working on this and still can't get it working. Missing libraries, bad CPU detection, segfaults, nonspecific compiler failures, the works. (Of course, it doesn't help that my OLPC takes three hours to do a full compile, but that's probably only added about a day to the total.)

Does anybody know a good place to get help on compiling mplayer (or even, perhaps, compiling in general)? I guess I could file bug reports for the svn builds, but I assume they wouldn't get rapid response and besides I'm not even sure they're bugs. Someone linked to an Ubuntu thread a while back, but I'm running Debian Lenny so I'm reluctant to ask questions there...
 
Old 07-20-2010, 03:31 PM   #3022
dovf
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Rep: Reputation: 1
For the past few days I've been getting a 404 error when trying to watch the condensed games. Turns out that the content_id must have just gone beyond 9999999, so an additional digit was added and therefore the indexes accessing individual digits in the content_id are no longer correct. The following patch seems to solve it:

Code:
diff -r a7b6f0cafe58 MLBviewer/mlbtv.py
--- a/MLBviewer/mlbtv.py        Tue Jul 20 20:45:06 2010 +0300
+++ b/MLBviewer/mlbtv.py        Tue Jul 20 23:06:35 2010 +0300
@@ -759,7 +759,7 @@
             if elem[0] == gameid:
                 content_id = elem[1]['condensed'][0][2]
         url = 'http://mlb.mlb.com/gen/multimedia/detail/'
-        url += content_id[4] + '/' + content_id[5] + '/' + content_id[6]
+        url += content_id[-3] + '/' + content_id[-2] + '/' + content_id[-1]
         url += '/' + content_id + '.xml'
         try:
             req = urllib2.Request(url)
Hope this helps!
Dov
 
Old 07-24-2010, 07:35 PM   #3023
Wolfvorkian
Member
 
Registered: Sep 2007
Distribution: Arch
Posts: 108

Rep: Reputation: 15
Quote:
Originally Posted by dovf View Post
For the past few days I've been getting a 404 error when trying to watch the condensed games. Turns out that the content_id must have just gone beyond 9999999, so an additional digit was added and therefore the indexes accessing individual digits in the content_id are no longer correct. The following patch seems to solve it:

Code:
diff -r a7b6f0cafe58 MLBviewer/mlbtv.py
--- a/MLBviewer/mlbtv.py        Tue Jul 20 20:45:06 2010 +0300
+++ b/MLBviewer/mlbtv.py        Tue Jul 20 23:06:35 2010 +0300
@@ -759,7 +759,7 @@
             if elem[0] == gameid:
                 content_id = elem[1]['condensed'][0][2]
         url = 'http://mlb.mlb.com/gen/multimedia/detail/'
-        url += content_id[4] + '/' + content_id[5] + '/' + content_id[6]
+        url += content_id[-3] + '/' + content_id[-2] + '/' + content_id[-1]
         url += '/' + content_id + '.xml'
         try:
             req = urllib2.Request(url)
Hope this helps!
Dov
Same error here. How do you apply your patch? Baby-step me through it if you will.

thanks...
 
Old 07-25-2010, 03:08 PM   #3024
dovf
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Rep: Reputation: 1
Quote:
Originally Posted by Wolfvorkian View Post
Same error here. How do you apply your patch? Baby-step me through it if you will.

thanks...
Well, in this case the patch is really simple, so the easiest way is just to manually apply the change this patch expresses to your local copy: using your text-editor of choice, open the file MLBviewer/mlbtv.py in your mlbviewer tree. Next, look for the line which in the patch begins with '-', i.e.,
Code:
url += content_id[4] + '/' + content_id[5] + '/' + content_id[6]
Now, just replace it with the line from the patch beginning with '+'; or in other words, replace the '4', '5' and '6' with '-3', '-2' and '-1', respectively. That's it.

Wikipedia has a good explanation of the diff format.

More generally, for more complicated patches you could take a patch file (in this case, you would copy the CODE block containing the patch into a file, but that may not work because of differences in whitespace) and have the 'patch' utility automatically apply the change for you:

Code:
/path/to/mlbviewer$ patch -p1 < /path/to/patchfile
but again, in the case of a patch as simple as this, and given that I quoted it and didn't attach it as a standalone file, that would be overkill...
 
Old 07-25-2010, 06:04 PM   #3025
Wolfvorkian
Member
 
Registered: Sep 2007
Distribution: Arch
Posts: 108

Rep: Reputation: 15
Thanks dovf, worked like a charm.
 
Old 07-27-2010, 02:35 AM   #3026
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Revision 263: Condensed game patch accepted

Thanks Dov.

I've incorporated the condensed game patch into both branches. Life's been super-busy right now.

I have one or two more patches planned soon and then I'll call it good enough for the rest of the season (or until something else breaks.)
 
Old 07-27-2010, 08:44 AM   #3027
Haffalump
LQ Newbie
 
Registered: Jun 2010
Posts: 7

Rep: Reputation: 0
daftcat
is it possible to implement a feature of choosing/toggling HOME/AWAY coverage inside mlbviewer, like it can be done for speed setting?
If it isn't really difficult to implement, could you please include it in your todo list for some not so distant future?
 
Old 07-27-2010, 01:34 PM   #3028
Wolfvorkian
Member
 
Registered: Sep 2007
Distribution: Arch
Posts: 108

Rep: Reputation: 15
Quote:
Originally Posted by Haffalump View Post
daftcat
is it possible to implement a feature of choosing/toggling HOME/AWAY coverage inside mlbviewer, like it can be done for speed setting?
If it isn't really difficult to implement, could you please include it in your todo list for some not so distant future?
You can chose home or away with the "s" key.
 
Old 07-27-2010, 02:47 PM   #3029
Haffalump
LQ Newbie
 
Registered: Jun 2010
Posts: 7

Rep: Reputation: 0
Wolfvorkian

great! never know about it and it isn't mentioned on help screen
nevertheless it works!
thank you, and off course many thanks to daftcat!
 
Old 07-28-2010, 03:42 AM   #3030
Haffalump
LQ Newbie
 
Registered: Jun 2010
Posts: 7

Rep: Reputation: 0
Another question:
is it possible to use mlbviewer behind corporate firewall?

I'm trying to use mlbviewer under cygwin.
With proper setting of http_proxy variable I can get listing and watch TopPlays.
But when accessing games I'm getting message "Error occured on login page".
Account/pass is correct and it works Ok at home under linux and without Firewall.

standard mlb.tv flash player works fine

What is the cause and what should I do?

Last edited by Haffalump; 07-28-2010 at 03:43 AM.
 
  


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


All times are GMT -5. The time now is 07:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration