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 03-31-2013, 08:45 PM   #3871
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86

Quote:
Originally Posted by dovf View Post
Regarding (2), here is an adaptation of the patch which is more "local" -- i.e., it should only affect condensed games:

Code:
diff -r b196f7e51de5 MLBviewer/mlbMediaStream.py
--- a/MLBviewer/mlbMediaStream.py   Sun Mar 31 04:49:09 2013 +0000
+++ b/MLBviewer/mlbMediaStream.py   Sun Mar 31 15:46:40 2013 +0300
@@ -390,6 +390,8 @@

     def prepareMediaPlayer(self,game_url):
         if self.streamtype == 'condensed':
+            if self.cfg.get('use_librtmp'):
+                return game_url
             return 'rtmpdump -r %s' % game_url
         elif self.cfg.get('use_nexdef') and self.streamtype != 'audio':
             self.nexdef_media_url = game_url
AFAICT, locateMedia is too early to make a change, since it is only after returning from there that the command line is modified by prepareMediaPlayer.

Truthfully, what I'm really interested in is not "librtmp" per se, but rather just the ability to construct my own command line (by setting the video_player) around a given condensed game's url. However, normally (when use_librtmp=0), the command line is partially created by mlbviewer, to pipe rtmpdump's output via whatever is set as the player; thus, if the command line I provide is not prepared to read from stdin, it breaks; in the past, I believe that setting use_librtmp=1 would circumvent that (presumably, because that setting means that mlbviewer no longer needs to apply rtmpdump itself, since use_librtmp=1 means that whatever I specify on the command line is already rtmp-aware), passing on just the naked url, around which my own command line could be built; so it is that behavior that I am trying to preserve in these patches. Possibly, there's a more correct way to fix my root problem, although it would probably also involve more invasive changes.

Regarding (3), what I intended was to set up a mirror which would then make it somewhat easier to submit patch proposals. But yes, it would require manual updating (which *I* intended to do) in order to remain up-to-date with the official subversion repository; and the version numbers would be different; so it may be more confusing than it is worth. I'll drop this for now.
I am getting used to the new system sourceforge uses. You can always submit a patch through sourceforge's trouble tickets on the mlbviewer page and I could review it and comment on it. Since you are not a full subscriber, I would have to test all the use cases before I could accept it. Now that I understand what you are after, I can test that patch (maybe not tonight - still on vacation) and see if that works and doesn't affect other cases.

I am not sure where it is, maybe in one of the prepare commands that the bug is bypassing, that will do a couple of translations for you. If %s is in the player command, %s is substituted with the stream url. If %f is in the player command, a filename is generated from the game id and substituted into the command string. I'm not sure what command string you are trying to build but those may help and/or there may be some other undocumented way of doing what you want to do. For example, I implemented a "y" command to play all the highlights in a game as a playlist (though this is a very mplayer-specific implementation at the moment.)
 
Old 03-31-2013, 08:53 PM   #3872
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by BostonPeng View Post
I'm noticing looking at the top plays for games doens't seem to show all of the available highlight videos. A case in point: Yesterday's final spring Freeway Series game between the Dodgers and the Angels in Anaheim shows four clips:
  • Conger's walk-off blast
  • Kemp opens scoring with sac fly
  • Punto's sparkling inning-ender
  • Trout's RBI groundout
But if I go to the league site and pull up a video, then click the More From This Game link and I see two additional clips:
  • Hanson's great outing
  • Greinke's strong spring start
If I go to the MLB Media Center and click the Highlights link it shows the complete list of all six videos. I'm guessing it's due to how MLBAM provides data about the videos but I wanted to mention it in case it's something that can be tweaked in mlbviewer.
This is true. There are a couple of different places where highlights come from. Current mlbviewer implementation uses highlights from a source that does not have the same highlights list that mlb.com has. I am not sure why the difference or where the other highlights are coming from but I can look into this sometime later this month.

There's a rather tricky feature I've been wanting for a few years that I am working on. But it requires a change (also a bug fix in a sense) that I've also wanted for a few years. Getting that to work will allow other features to come in more easily. So I want to want to get that all sorted out.
 
Old 04-01-2013, 02:07 AM   #3873
mkomko
Member
 
Registered: Mar 2010
Posts: 97

Rep: Reputation: 3
Hey daftcat,

can you please take a look at my post when you have a little time? The mlbplay script doesn't seem to work:
http://www.linuxquestions.org/questi...ml#post4922019

Thanks!
 
Old 04-01-2013, 09:29 AM   #3874
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
This is true. There are a couple of different places where highlights come from. Current mlbviewer implementation uses highlights from a source that does not have the same highlights list that mlb.com has. I am not sure why the difference or where the other highlights are coming from but I can look into this sometime later this month.

There's a rather tricky feature I've been wanting for a few years that I am working on. But it requires a change (also a bug fix in a sense) that I've also wanted for a few years. Getting that to work will allow other features to come in more easily. So I want to want to get that all sorted out.
Thanks. I didn't realize the league didn't have things more centralized. Now that I know there are different lists I can check out the available clips in mlbviewer and then hit the Media Center (or use the Highlights link in the post-game emails, if they're still sending them out this season) to see what other clips there are for me to enjoy.

Thanks for all the hard work to get ready for Opening Day 2013! Once again Linux users not only have a way to watch the videos easily, we have a great program that the other big OSes don't have.
 
Old 04-01-2013, 01:30 PM   #3875
shaveyourlife
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
Every time I try to launch a stream using Nexdef, I get the following message printed:

Code:
Buffering streammlbhls: invalid option -- 'F'
mplayer: could not connect to socket
mplayer: No such file or directory
Segmentation fault
I modified mlbtv.py to run mlbhls in gdb using the DEFAULT_HD_PLAYER string. I then re-compiled mlbhls with debug flags to produce the following log with backtrace:

Code:
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7ffff1202700 (LWP 31130)]

Program received signal SIGSEGV, Segmentation fault.
0x000000000040398a in mlb_process_stream_key (stream=0x7ffff7f88750, 
    line=0x7fffec00ae87 "#EXT-X-MEDIA-SEQUENCE:0", pos=5) at mlb.c:678
678                     ks[1][strlen(ks[1])-1] = '\0';
#0  0x000000000040398a in mlb_process_stream_key (stream=0x7ffff7f88750, 
    line=0x7fffec00ae87 "#EXT-X-MEDIA-SEQUENCE:0", pos=5) at mlb.c:678
#1  0x0000000000403f88 in mlb_process_streams (stream=0x7ffff7f88750) at mlb.c:800
#2  0x0000000000405164 in main (argc=10, argv=0x7fffffffda38) at mlb.c:1190
A debugging session is active.

        Inferior 1 [process 31127] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
Any ideas? I'm wondering if it is a problem with my cURL version. I have the Ubuntu libcurl3-gnutls package installed, and when I try to install libcurl4-gnutls-dev, apt-get wants to uninstall a bunch of packages that I don not want installed. I downloaded the src for the newest curl, and tried to compile and link mlbhls to that version, but was unsuccessful.
 
Old 04-01-2013, 01:41 PM   #3876
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by shaveyourlife View Post
Every time I try to launch a stream using Nexdef, I get the following message printed:

Code:
Buffering streammlbhls: invalid option -- 'F'
mplayer: could not connect to socket
mplayer: No such file or directory
Segmentation fault
Grab mlbhls from the experimental branch.

Code:
svn co https://mlbtv-hls-nexdef.googlecode.com/svn/branches/experimental mlbhls
-F option support is in experimental branch.

-F was an option the developer put in to start a stream at a particular timecode. Very useful for watching archived games as the 0 timecode had way too much useless "game will start shortly" before the game actually started.
 
Old 04-01-2013, 02:03 PM   #3877
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by mkomko View Post
Hey daftcat, I've got a few problems with the mlbplay script. I'll explain using the game 2013-03-30-nyamlb-abkbbc-1-YES-HD.

Using the newest revision (397) mlbplay doesn't work. There is no output at all. I'm using the following command:

use_librtmp is 0 and so is use_nexdef, speed is set to 1200. When enabling debug I get:


Using revision 383 of mlbplay doesn't work either, but gives errors as above:
Code:
MPlayer 1.1-4.5.4 (C) 2000-2012 MPlayer Team

Playing -.
Reading from stdin...
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: HandleInvoke, error decoding invoke packet
ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 16181142
The old revision is not that important - but the current one doesn't seem to do anything after getting the media URL.

Using mlbviewer works though - in both revisions.

Thanks for any help you can provide! Does mlbplay work for you?
Works for me. Today's a travel day so I may not get a chance to look into it.
 
Old 04-01-2013, 02:45 PM   #3878
shaveyourlife
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
Yep that fixed it. Definitely should have thought of that one..

Thanks for the help, and the great program!
 
Old 04-01-2013, 09:20 PM   #3879
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by mkomko View Post
Hey daftcat, I've got a few problems with the mlbplay script. I'll explain using the game 2013-03-30-nyamlb-abkbbc-1-YES-HD.

Using the newest revision (397) mlbplay doesn't work. There is no output at all. I'm using the following command:

use_librtmp is 0 and so is use_nexdef, speed is set to 1200. When enabling debug I get:


Using revision 383 of mlbplay doesn't work either, but gives errors as above:
Code:
 (C) 2000-2012 MPlayer Team

Playing -.
Reading from stdin...
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: HandleInvoke, error decoding invoke packet
ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 16181142
The old revision is not that important - but the current one doesn't seem to do anything after getting the media URL.

Using mlbviewer works though - in both revisions.

Thanks for any help you can provide! Does mlbplay work for you?
Ah. You are using "MPlayer 1.1-4.5.4"

Please try again with mplayer2 http://www.mplayer2.org
 
Old 04-01-2013, 09:53 PM   #3880
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
SVN revision 398: Fixed blackout error message

Blackout error messages were something I needed to wait for opening day to test since the rewrite. Looks like I had some bugs in the new code. Now blacked out status should be reported correctly.

Let me know if there are any other errors that are not displaying correctly.

Also, media location replies are being to (un)successful-1.xml/(un)successful-2.xml in ~/.mlb/log. You can parse these with test/mediaxml.py. If any errors are happening, you can look at the latest ~/.mlb/unsuccessul-2.xml (errors usually don't occur in the first reply.)
 
Old 04-01-2013, 10:33 PM   #3881
edsmith123
LQ Newbie
 
Registered: Apr 2013
Posts: 17

Rep: Reputation: Disabled
Getting the following error from mlbviewer as it crashes when logging into mlb.com. Any suggestions?

Code:
Traceback (most recent call last):
  File "mlbviewer.py", line 632, in <module>
    curses.wrapper(mainloop, mycfg)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "mlbviewer.py", line 158, in mainloop
    mywin.statusRefresh()
  File "/home/smith/bin/mlbviewer2013/MLBviewer/mlbListWin.py", line 141, in statusRefresh
    + len(speedstr) + len(hdstr) + len(coveragestr) + 2
TypeError: object of type 'NoneType' has no len()
 
Old 04-02-2013, 12:55 AM   #3882
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by edsmith123 View Post
Getting the following error from mlbviewer as it crashes when logging into mlb.com. Any suggestions?

Code:
Traceback (most recent call last):
  File "mlbviewer.py", line 632, in <module>
    curses.wrapper(mainloop, mycfg)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "mlbviewer.py", line 158, in mainloop
    mywin.statusRefresh()
  File "/home/smith/bin/mlbviewer2013/MLBviewer/mlbListWin.py", line 141, in statusRefresh
    + len(speedstr) + len(hdstr) + len(coveragestr) + 2
TypeError: object of type 'NoneType' has no len()

That line is created from the three lines above it:

Code:
        speedstr = SPEEDTOGGLE.get(self.mycfg.get('speed'))
        hdstr = SSTOGGLE.get(self.mycfg.get('adaptive_stream'))
        coveragestr = COVERAGETOGGLE.get(self.mycfg.get('coverage'))
Those toggles are:

Code:
SSTOGGLE: {False: '[--]', True: '[>>]'}  (adaptive_stream= setting)
SPEEDTOGGLE: {'300': '[ 300K]', '2400': '[2400K]', '1200': '[1200K]', '500': '[ 500K]', '1800': '[1800K]'} (speed= setting)
COVERAGETOGGLE: {'home': '[HOME]', 'away': '[AWAY]'} (coverage= setting.)
I am guessing that your coverage setting is wrong. At least that is how I am able to reproduce that exact error. I either get different errors or no errors at all for invalid or absent values of speed and adaptive_stream.

coverage= should be either home or away, e.g.

Code:
coverage=home
or

Code:
coverage=away
The easiest way to verify this is to move your ~/.mlb/config to ~/.mlb/config.bak:

Code:
mv ~/.mlb/config ~/.mlb/config.bak
And then restart mlbviewer twice. Even if you get an authentication error (because you haven't entered your user= and pass= yet), you should still see the listings. At this point, you can go about customizing ~/.mlb/config the way you want it (at the least, add user= and pass= values back in.)
 
Old 04-02-2013, 12:59 AM   #3883
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
BTW, once you have figured out which value was incorrect, let me know. The rewrite of mlbviewer included removing direct access to cfg[] dictionary and using get() and set() calls. I envisioned it this way so that I can add any necessary value checking code into those routines rather than cluttering up the main program. As I understand which settings can go wrong, I can create the necessary sanity code in the get() and set() to either work around this or throw a more descriptive error.
 
Old 04-02-2013, 02:01 AM   #3884
mkomko
Member
 
Registered: Mar 2010
Posts: 97

Rep: Reputation: 3
Quote:
Originally Posted by daftcat View Post
Works for me. Today's a travel day so I may not get a chance to look into it.
Quote:
Originally Posted by daftcat View Post
Ah. You are using "MPlayer 1.1-4.5.4"

Please try again with mplayer2 http://www.mplayer2.org
Thanks. Since mlbviewer itself is working fine, I don't think that's the problem. But to be up-to-date I uninstalled mplayer and installed mplayer2. I changed the relevant config-entries to mplayer2 instead of mplayer.

mlbviewer is still working fine, but mlbplay doesn't do anything. I have checked the .mlb/log file and the mlbplay entries look the same as when producing them with mlbviewer.

It seems as though the player is never called or not called as specified in the config file. I'll check out the code later, but maybe you can check it out as well. If I can do anything to help debug, I'll do it. Thank you for your help!
 
Old 04-02-2013, 03:35 AM   #3885
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by BostonPeng View Post
I finally have my 2013 article about setting up mlbviewer written for my site. If anyone sees anything I missed or got wrong (I was writing it from a system already able to run mlbviewer and may have forgotten something I did to get it working) please let me know on the article's comments.
Had a chance to quickly review this.

Please remove the bit about nexdef.jar and plugin detector. Not only is this not necessary, but mlbhls/mlbviewer doesn't even use it.

Also, I believe it is necessary to leave user= and pass= blank for non-subscribers to watch condensed games. Thus, I have added this to the documentation and removed the requirement for non-subscribers to use an mlb.com account.
 
  


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 03:30 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