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.
NexDef is hosed right now. Fortunately, it's MLB.com's fault.
Thanks for the update. I was seriously getting pissed off. Unfortunately, I've got sign-on restriction error on one machine, but not the other. The one that is not locked out can't run the flash player either. Hmm...I wonder... Cool, copying the cookie and sessionkey over worked.
I don't know what this means, but I think I have found a way to play part of the game at least with a non-premium account.
(I think it might just be a preview, but it seems to change every time you view it)
I ran autobahn
I installed svn mplayer and the requirements for mlbviewer (However, I couldn't figure out how to install rtmpdump, so I just made it)
I downloaded svn mlbviewer and ran the setup.
I then did the mlbdvr thing, got the 14-13613-4361346-34 like string, and ran nexdef.py with that as an argument.
It failed, and it seemed to be requesting URLs like "base64:&max_bps=2500000&v=0"
also got Server returned Invalid+target+URI%3A+%3F%3F%5B%3F%00%00%3FM4%3FK%00%00
however, when I scrolled through the list, I saw 'preview-url = ( I cannot post a link because this is my first post, but it was from mediadownloads.mlb and it was under the directory /mlbam/preview/flowas_800_preview.mp4)' I thought I would try opening it in mplayer, and to my surprise, it started playing. It seemed to be the current game, and lasted for a little bit before crapping out. I thought it might just be like the first two minutes or something, but when I played it again, it was different. However, I would have to run the nexdef thing again before it would start playing. (or not, it seems to work repeatedly in a row now). The parts it was playing seemed to be incrementally further in the game. I could seek in the stream, and it correctly knew the end of the clip.
I just tested it, it works without autobahn.jar running
I wonder if it would be possible to stitch these streams together, or if you were already aware of this.
Thanks for everything, daftcat and theophile!
EDIT: It does seem to show updated video, as currently the toronto-oakland game is in the top of the twelfth and the "preview" shows video starting at the beginning of the twelfth
EDIT: I've notice that the team codes are different for the preview than for the game (fla vs wsh as opposed to (flo vs was)
It failed, and it seemed to be requesting URLs like "base64:&max_bps=2500000&v=0"
also got Server returned Invalid+target+URI%3A+%3F%3F%5B%3F%00%00%3FM4%3FK%00%00
This is interesting. It means that the soap requests aren't returning an authenticated url for use with autobahn. This could be because mlb.com doesn't allow use of NexDef at all with non-premium accounts, or it could be a more general authentication problem.
jeremeybub, did you create a ~/.mlb/config file with your username and password in it?
You requested a game that's under National Blackout. In your pastebin, the SOAP response (line 531), there is:
Code:
<blackout>MLB_NATIONAL_BLACKOUT</blackout>
mixed in with everything else. I forget the weekend rules for national blackout. I have code to detect national blackout in mlbdvr but not in nexdef.py.
According to the Media Center web page, the games starting at 7:05 ET are the remaining live non-blackout games today. If you're around later tonight, please try those.
The procedure for trying archived games is a bit harder. It would be better just to wait until I have that code integrated into mlbviewer.
Oops, that was a mistake, I accidentally pasted one from when I tried to do a blacked out game. I will paste one from a non blacked-out game as soon as I am back on the computer I have been doing this with. My whole post deals with non blacked-out games, I just happened to be experimenting with blacked out ones right before I posted that so that was the game ID used.
Actually, the content-id's are only available through the SOAP request.
By multimedia page, do you mean the MLB Media Center web page? I don't and I won't parse web pages. I'll do json (for previous years), xml, and soap because those have definite structures (even if raw xml is open to a fair amount of interpretation), but I won't parse raw html (beyond looking for keywords like "logged in" or "unsuccessful".)
Besides, the entire base64 string plus the mlbfpk parameter can be retrieved from the SOAP request for the SWARMCLOUD media item. There is a lot of information in the SOAP replies and now that I've stopped being so lazy about parsing them, we're actually doing pretty good--not getting the JiBX marshalling errors anymore. In fact, I rather prefer the SOAP requests/responses to the raw xml because the WSDL/XSD defines the structure of the requests and responses quite well and suds handles all the parsing details for me.
I do appreciate the effort you put into decoding all this, though. I will have to look at that first request more carefully and the innings index to see how to implement proper throttling and seeking of live and archived games.
If we can do without rtmpdump for video, I wouldn't mind ripping all that "dvr" code out and just fork off something just for the gameday audio users until mplayer or vlc supports rtmp natively.
I have to agree that that Multimedia page on the MLB website is pretty horrible, though there are some obvious rows with the feeds (and content IDs in). So, I fully understand why you don't fancy trying to parse it.
Anyway, I have had a further look at the http requests to the NexDef plugin. The encoding_group parameter I mentioned needs to be sent to a URL with "/control/" inserted between the adaptive-live and base64 (where the "describe" bit goes in the initial request), and, I think, it needs to be sent after the streaming has been started (which might require some multi-threading, gulp). You could also, at that point, add parameters for height and width (for the 3000K stream these would be 720 and 1280), and a parameter "strict=true" to make sure it only uses the one stream. It also seems that you need to keep sending that control command at regular intervals (that is what the flash player does, but it adds a "rand" parameter as well).
Finally, you can get hold of the xml specifying the streams (and widths, heights and bps) by fetching the following URL (no login required):
http://abrlivec2.mlb.com/sliceserver/MLB_GAME_VIDEO_<three letter away team in upper case><three letter home team in upper case>_<"HOME", "VISIT" or "NATIONAL">_<four digit year><two digit month><two digit date>
when this happens, rtmpdump/nexdef.py stops generating the stream.
i guess i'm wondering if it's something i'm doing wrong, or if it's with mlb's nextdef issues on the server-side.
the quality of the stream is great though, and when it's working it's waaay better than mlb's flash player. I have had stretches of a few innings where this wouldn't happen, but it seems to be reoccuring. I also don't like to request a new stream from mlb so often, or else I'll get the "you've logged in too many times in a short period" yadayada.
I believe that is a network error, probably due to bandwidth issues. Try using the -dumpstream option to create a local file then start another mplayer process to play the local file as it's writing. If you keep getting network errors, you may just not have a fast enough connection for the highest resolution streams.
I believe that is a network error, probably due to bandwidth issues. Try using the -dumpstream option to create a local file then start another mplayer process to play the local file as it's writing. If you keep getting network errors, you may just not have a fast enough connection for the highest resolution streams.
thanks for the reply. the thing is that the internet is plenty fast, i'm on 18mbit dsl and have run the high res stream in firefox without much problems (just not as clear as mlbviewer does it). i'm kinda new to this, so could you explain a little more about the -dumpstream option? do i add that to the end of the nexdef.py command or somewhere in the script itself?
The default player command in nexdef.py is "mplayer %f -dumpstream -dumpfile %s" (I think). That will save the stream locally instead of playing it.
BTW, I just tried watching a game on a network (at school) that is generally congested and I got the same errors and the stream died after about 10 seconds.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.