LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 04-17-2009, 08:22 PM   #1261
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35

Quote:
Originally Posted by rjwood View Post
then what?
Code:
cd mlbviewer
sudo python setup.py install
Then read the REQUIREMENTS-2009.txt file, where you will find that you have to install PyXML and suds. The links for the source are in the file.

Then you'll have to read the INSTALL file to learn how to create your local configuration file.

Then read the DVR-POLICY file.

After you've installed all the dependencies and created your local configuration file, make sure you are in the mlbviewer directory and run:

Code:
./mlbdvr.py
Find the game you want, highlight it, and press "z". On that page, find a string that looks something like this: 14-244338-2009-04-17

Copy that string and press "q" several times to get back to the console. Then:

Code:
cd test
./nexdef.py [STRING]
This will start mplayer recording the stream in the mlbviewer/test directory to a file called [STRING].mp4

Play it with mplayer!
 
Old 04-17-2009, 08:36 PM   #1262
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35
NexDef is hosed right now. Fortunately, it's MLB.com's fault.
 
Old 04-17-2009, 09:46 PM   #1263
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by Theophile View Post
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.
 
Old 04-18-2009, 03:13 PM   #1264
jeremybub
LQ Newbie
 
Registered: Apr 2009
Posts: 26

Rep: Reputation: 16
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)

Last edited by jeremybub; 04-18-2009 at 03:33 PM.
 
Old 04-18-2009, 03:21 PM   #1265
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35
Quote:
Originally Posted by jeremybub View Post
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?
 
Old 04-18-2009, 03:45 PM   #1266
jeremybub
LQ Newbie
 
Registered: Apr 2009
Posts: 26

Rep: Reputation: 16
yes, I did.

username is your email address, correct?
 
Old 04-18-2009, 03:57 PM   #1267
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35
Yes. Hmmmm, I guess no NexDef for non-premium? Can you copy the entire output of the nexdef.py script, paste it on pastebin, and give us the link?
 
Old 04-18-2009, 04:00 PM   #1268
jeremybub
LQ Newbie
 
Registered: Apr 2009
Posts: 26

Rep: Reputation: 16
http://pastebin.com/f718ec677
 
Old 04-18-2009, 05:15 PM   #1269
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,745

Rep: Reputation: 76
Quote:
Originally Posted by jeremybub View Post
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.
 
Old 04-19-2009, 11:12 AM   #1270
jeremybub
LQ Newbie
 
Registered: Apr 2009
Posts: 26

Rep: Reputation: 16
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.
 
Old 04-19-2009, 05:21 PM   #1271
CubsFanUK
LQ Newbie
 
Registered: Mar 2009
Posts: 18

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
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>

For example,

http://abrlivec2.mlb.com/sliceserver...IONAL_20090418

will get you the details of the Cubs game of Fox on Saturday (a walk off win against the Cardinals, of course).
 
Old 04-19-2009, 05:32 PM   #1272
edouble312
Member
 
Registered: Apr 2009
Posts: 107

Rep: Reputation: 16
hey what's up guys.

i've been experimenting with nexdef.py and have run into this error every once in a while:

nop_streaming_read error : Resource temporarily unavailable
Core dumped

Exiting... (End of file)

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.
 
Old 04-19-2009, 08:20 PM   #1273
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35
Quote:
Originally Posted by edouble312 View Post
nop_streaming_read error : Resource temporarily unavailable
Core dumped

Exiting... (End of file)
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.
 
Old 04-20-2009, 12:56 AM   #1274
edouble312
Member
 
Registered: Apr 2009
Posts: 107

Rep: Reputation: 16
Quote:
Originally Posted by Theophile View Post
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?
 
Old 04-20-2009, 10:51 AM   #1275
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35
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.
 
  


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