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.
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.)
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.
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.
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.
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.
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.
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?
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.)
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()
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:
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.)
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.
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.