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.
I've taken some 'visual' testing today. First I tried an archived game under Xp, Ie8 and FlashPlayer, then I rebooted under gentoo and tried replaying with mplayer a file being downloaded by rtmpdump launched via mlbdvr.py.
I cannot appreciate any difference.
The only issue is that the same game which worked with flash couldn't be started by rtmpdump (next time I'll try to report some output from the program )
I've taken some 'visual' testing today. First I tried an archived game under Xp, Ie8 and FlashPlayer, then I rebooted under gentoo and tried replaying with mplayer a file being downloaded by rtmpdump launched via mlbdvr.py.
I cannot appreciate any difference.
The only issue is that the same game which worked with flash couldn't be started by rtmpdump (next time I'll try to report some output from the program )
Again daftcat, thanks.
It seems we have at least a couple of problems with rtmpdump:
1. rtmpdump is trying to write an .flv, e.g. it's not writing a proper h264 file. Mplayer is being very forgiving with archived games, not so much with live games.
2. rtmpdump can't hang onto an archived stream very long.
For #1, there's not a lot we can do. The rtmpdump developer seems to have gone missing and after looking at some h264 source, I feel even less inclined to try to write a h264 file.
For #2, I still don't know what rtmpdump's "beef" is here. All I know is that my retry algorithm still needs a bit of work.
I'm looking into replacements for rtmpdump. I have already received a response from the flazr developer though I have yet to give the code much time. There's also the gnash project and rumor of rtmp support in both libcurl and vlc nightlies. XBMC also has rtmp support. I can have a look at how complete it is and whether it can be extracted for our use since it is written in python. Finally, Adobe has indicated that it will open it's RTMP specification sometime in the first half of 2009. This might mean several new clients or one good one. Or maybe that's the kick in the pants the mplayer team is looking for to put an rtmp transport in mplayer.
So anyway, I'll be focusing my efforts in improving the restart algorithm for archived games and I recommend using the 'f' key for live games.
SVN revision 148: Gameday audio archived game support and gamedayaudio.py test tool
Revision 148 includes:
+ Some more error checking around the SOAP replies (that's for you, poorboywilly) Also, soap reply errors will now display the status code to the screen if it's unsuccessful and print the soap reply to the log file (only if it's unsuccessful unless the debug flag is set.)
+ Gameday audio archived game support is in and tested but the retry code needs more work.
+ gamedayaudio.py was added to the test directory. This is the equivalent of soapevent.py except for audio and it supports both live and archived games. (I use both gamedayaudio.py and soapevent.py to test network code before it goes into MLBviewer/mlbtv.py.)
From here on, until I make headway with rtmpdump or another rtmp client, the main development focus will be on improving the restart algorithm and to a lesser extent, the player/recorder cooperation. My goal is to get rtmpdump to dump an entire archived game unattended.
$ python /home/onip/mlbviewer/mlbdvr.py
Traceback (most recent call last):
File "/home/onip/mlbviewer/mlbdvr.py", line 1243, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/home/onip/mlbviewer/mlbdvr.py", line 875, in mainloop
u = g.soapurl()
File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 878, in soapurl
reply = client.service.find(**soapd)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 228, in __call__
return target.call(*args, **kwargs)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 367, in call
return method(*args, **kwargs)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 228, in __call__
return target.call(*args, **kwargs)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 410, in call
return client.invoke(args, kwargs)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 468, in invoke
result = self.send(msg)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 499, in send
result = self.failed(binding, e)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 550, in failed
r, p = binding.get_fault(reply)
File "//usr/lib/python2.5/site-packages/suds/bindings/binding.py", line 209, in get_fault
raise WebFault(p, faultroot)
suds.WebFault: Server raised fault: 'Error in JiBX marshalling'
4/7/09, Milwakee Brewers @ SanFrancisco Giants
Code:
$ python /home/onip/mlbviewer/mlbdvr.py
Traceback (most recent call last):
File "/home/onip/mlbviewer/mlbdvr.py", line 1243, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/home/onip/mlbviewer/mlbdvr.py", line 875, in mainloop
u = g.soapurl()
File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 889, in soapurl
raise Exception,self.error_str
Exception: Requested Media Not Found
So anyway, I'll be focusing my efforts in improving the restart algorithm for archived games and I recommend using the 'f' key for live games.
My goodness, a speedy way to get to the games (i.e. no navigating MLB's terrible site), and it's true the autobahn.jar works! This looks INCREDIBLE. Now all I need to do is figure out how to make flash v-sync.
Thanks for the updated SVN, I've got some new crash code:
Code:
Traceback (most recent call last):
File "/home/.../apps/mlbviewer-svn/mlbdvr.py", line 1243, in <module> curses.wrapper(mainloop, mycfg.data)
File "/usr/lib64/python2.6/curses/wrapper.py", line 44, in wrapper return func(stdscr, *args, **kwds)
File "/home/.../apps/mlbviewer-svn/mlbdvr.py", line 875, in mainloop u = g.soapurl()
File "/home/.../apps/mlbviewer-svn-148/MLBviewer/mlbtv.py", line 852, in soapurl raise Exception,self.error_str
Exception: System Error
This came when trying to play the opening day Phillies/Braves game; I recall the many people said this archive was playable.
Thanks for all the work DC.
Last edited by poorboywilly; 04-09-2009 at 04:51 PM.
$ python /home/onip/mlbviewer/mlbdvr.py
Traceback (most recent call last):
File "/home/onip/mlbviewer/mlbdvr.py", line 1243, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/home/onip/mlbviewer/mlbdvr.py", line 875, in mainloop
u = g.soapurl()
File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 878, in soapurl
reply = client.service.find(**soapd)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 228, in __call__
return target.call(*args, **kwargs)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 367, in call
return method(*args, **kwargs)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 228, in __call__
return target.call(*args, **kwargs)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 410, in call
return client.invoke(args, kwargs)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 468, in invoke
result = self.send(msg)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 499, in send
result = self.failed(binding, e)
File "//usr/lib/python2.5/site-packages/suds/client.py", line 550, in failed
r, p = binding.get_fault(reply)
File "//usr/lib/python2.5/site-packages/suds/bindings/binding.py", line 209, in get_fault
raise WebFault(p, faultroot)
suds.WebFault: Server raised fault: 'Error in JiBX marshalling'
4/7/09, Milwakee Brewers @ SanFrancisco Giants
Code:
$ python /home/onip/mlbviewer/mlbdvr.py
Traceback (most recent call last):
File "/home/onip/mlbviewer/mlbdvr.py", line 1243, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/home/onip/mlbviewer/mlbdvr.py", line 875, in mainloop
u = g.soapurl()
File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 889, in soapurl
raise Exception,self.error_str
Exception: Requested Media Not Found
They are both server errors. I verified that 4/8 game is "not found" and 4/7 game returns a url but rtmpdump doesn't play it. Have patience with mlb and use 'f' key when mlbdvr.py can't do it.
My goodness, a speedy way to get to the games (i.e. no navigating MLB's terrible site), and it's true the autobahn.jar works! This looks INCREDIBLE. Now all I need to do is figure out how to make flash v-sync.
Thanks for the updated SVN, I've got some new crash code:
Code:
Traceback (most recent call last):
File "/home/.../apps/mlbviewer-svn/mlbdvr.py", line 1243, in <module> curses.wrapper(mainloop, mycfg.data)
File "/usr/lib64/python2.6/curses/wrapper.py", line 44, in wrapper return func(stdscr, *args, **kwds)
File "/home/.../apps/mlbviewer-svn/mlbdvr.py", line 875, in mainloop u = g.soapurl()
File "/home/.../apps/mlbviewer-svn-148/MLBviewer/mlbtv.py", line 852, in soapurl raise Exception,self.error_str
Exception: System Error
This came when trying to play the opening day Phillies/Braves game; I recall the many people said this archive was playable.
Thanks for all the work DC.
System Error is an ever helpful way of mlb saying, "we fscked up". Why you get it and I don't, I'm not sure. I encourage a liberal helping of patience and the 'f' key. (Think of the 'f' key as the "oh fudge it!" key. :-)
Speaking of "Go Fudge Yourself", I may look into writing a South Park client if I ever get this rtmpdump crap figured out.
System Error is an ever helpful way of mlb saying, "we fscked up". Why you get it and I don't, I'm not sure. I encourage a liberal helping of patience and the 'f' key. (Think of the 'f' key as the "oh fudge it!" key. :-)
Don't worry, I'm not really angry about it or anything, I'm just keeping a good flow of information to you since I figure that might help.
They are both server errors. I verified that 4/8 game is "not found" and 4/7 game returns a url but rtmpdump doesn't play it. Have patience with mlb and use 'f' key when mlbdvr.py can't do it.
So I have to blame mlb and hope this get fixed along the way... well.
I suspected so because of the kind of error reported, but I posted those stacktraces anyway just in case I was wrong.
The 4/9 Royals@White Sox game returns "Exception: Requested Media Not Found" despite being available on mlb.com. This is the first game I've seen whose archive plays from mlb.com but not mlbdvr. Any clues?
The 4/9 Royals@White Sox game returns "Exception: Requested Media Not Found" despite being available on mlb.com. This is the first game I've seen whose archive plays from mlb.com but not mlbdvr. Any clues?
I've been noticing that more lately. I can have another go with HTTPAnalyzer this weekend and see if they have changed up the SOAP requests.
In other news, I think I may finally have the retry code figured out (object-oriented programming has its subtle gotchas) so when I have the Requested Media Not Found (and the more frustrating AccessDenied errors) figured out, there might be a decent chance of finally running the recorder and player simultaneously as was originally intended. Or at the very least, we should be able to download a game from the archives in about 20 minutes and watch it later at our convenience.
if you could please encourage people to NOT mirror our sofware on their own servers, we can hopefully keep the legal department out of the picture as long as possible.
Whenever we do a new build of NexDef, I'll put the jar at this download link, along with md5's so you know it's legit.
It also sounds like, from the rest of the email, that I have an mlb.com developer contact should I need to ask questions.
So what I gather from this email is that the developers (or at least this one) are receptive to our efforts. Though that's not likely an official viewpoint of mlb.com.
It also sounds like, from the rest of the email, that I have an mlb.com developer contact should I need to ask questions.
So what I gather from this email is that the developers (or at least this one) are receptive to our efforts. Though that's not likely an official viewpoint of mlb.com.
I've edited the post to point to the mlb location and removed the autobahn.jar file from my server.
Thanks to mlb for being nice and not just unleashing the lawyers on me.
It turns out at the beginning of the spring training beta test, the soap reply contained only one user-verified-content item and that was video. The key for that is content-id which is used in fetching the url. Now that mlb.com is getting up to full-speed, there are four content listings: two video and two audio (home and away each.) I was still using just a lazy shorthand and pulling the first content-id. This meant you were likely asking the content server for an audio stream but specifying the video app (I do this automatically in the connect request depending on the streamtype aka 'a' vs. 'Enter'.)
Revision 151 checks for the content type now and makes requests with the correct app and content-id for the requested stream type. I tested against yesterday's archives and all streams that were available on the media center website were returning a url in mlbdvr.py.
I still can't guarantee that every request will result in a successful stream though. I've added one more parameter to the rtmpdump command to produce a connect request as close to the flash player as possible.
ALSO in revision 151:
I've figured out why the restart code wasn't working and I believe I have that fixed now. As such, I'm also reinstating the error handling. As I did "catch" an SOAP error I wasn't previously catching before, you should see one less "Uncaught error" scenario. Let me know if you see any more "Uncaught error"s in this revision.
Finally, I've redirected the rtmpdump stdout to /tmp/rtmpdump.log. If you uncomment the printf()'s in the source that print the KB % progress, you can monitor the progress of your download with "tail -f /tmp/rtmpdump.log" I've redirected rtmpdump stderr (if it even uses stderr) to ~/.mlb/log. If you have rtmpdump errors, check the /tmp/rtmpdump.log file.
FINALLY,
Revision 151 has mlblistings.py updated to produce event-id's which can
be fed to soapevent.py or gamedayaudio.py. These have both been modified to request the correct stream type as well.
I've edited the post to point to the mlb location and removed the autobahn.jar file from my server.
Thanks to mlb for being nice and not just unleashing the lawyers on me.
Yeah no kidding. Hey, I just re-read the email and it's a Director Of Operations at MLBAM and not just a random generous developer. Nice! Double lucky on you, though I don't think he was referring specifically to you and your post.
So I had a pretty good day. I got quite a bit of code fixed up and figured out and the blessing of MLBAM to continue my 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.