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 don't know much about Python -- but when g=GameStream(...) raises an exception, is g valid? If not, then will the g.logout() succeed in the except logic?
I don't think GameStream initialization does anything except set a few variables. Whenever the error message occurs, it's actually g.url() that is bonking out. So g is a valid object. If GameStream initialization was failing, that's not wrapped in try: /except: code so that would drop right through like a lead ball and leave you at the shell again with an ugly trace. I've never seen that happen. Back with the old version, when g.url() failed, it was actually the re module of python that was raising the exception.
One thing I'm wondering about though is that if __getInfo() is handling both the cookies and getting the url, which is failing? If logout relies on the cookie from __getInfo() is that even a valid cookie being passed to logout(). Maybe you can wrap the different pieces of __getInfo() in try:/except: with revealing error messages so you know exactly which step is failing.
Right now, things are working for me but for those having problems, you can try this. Wherever you think your problem may be in the code, wrap that procedure call within try: and raise an exception with a custom error message to give you insight on who knows what and when.
For instance, if you suspect g.url() call, you could first,
Indenting is important to python. I don't know why they didn't just use braces. Then if g.url() fails, you'll get an exception and traceback pointing back to your custom error message.
I'm like a five day newbie to python, but I'm learning fast.
Actually, I'd be happy to use *any* player that will work on Ubuntu 7.10. Unfortunately, neither vlc nor mplayer seem to work (they work for other media, just not with MLB TV).
Here's the version of mplayer I have:
MPlayer 2:1.0~rc1-0ubuntu13.2+medibuntu1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz (Family: 6, Model: 15, Stepping: 6)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Usage: mplayer [options] [url|path/]filename
What players are being used successfully to watch MLB TV by other Ubuntu users?
This is what mplayer reports when I try to use mplayer. After the "Connected" line, nothing happens.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing mms://a668.v10869f.c10869.g.vm.akamaistream.net/7/668/10869/v0004/mlb.download.akamai.com/10869/2008/mlb_!/mlbam/2008/04/10/mlbtv_seatba_400k.wmv?auth=ca.aCaHdHaAaxcWaAbZd3bQcLbndVbycJbT-bh_T3H-bA-3egxiKbw-lej8kamckfldkfmckbl7khjjj6m9jcjhlbjckamhk5ldkgmi&aifp=v0004&ct5=10-Apr-08&ct1=&ct3=4281702&ct7=642086&ct4=mlb&ct6=76.119.147.186&ct8=1.
STREAM_ASF, URL: mms://a668.v10869f.c10869.g.vm.akamaistream.net/7/668/10869/v0004/mlb.download.akamai.com/10869/2008/mlb_!/mlbam/2008/04/10/mlbtv_seatba_400k.wmv?auth=ca.aCaHdHaAaxcWaAbZd3bQcLbndVbycJbT-bh_T3H-bA-3egxiKbw-lej8kamckfldkfmckbl7khjjj6m9jcjhlbjckamhk5ldkgmi&aifp=v0004&ct5=10-Apr-08&ct1=&ct3=4281702&ct7=642086&ct4=mlb&ct6=76.119.147.186&ct8=1
Resolving a668.v10869f.c10869.g.vm.akamaistream.net for AF_INET6...
Couldn't resolve name for AF_INET6: a668.v10869f.c10869.g.vm.akamaistream.net
Resolving a668.v10869f.c10869.g.vm.akamaistream.net for AF_INET...
Connecting to server a668.v10869f.c10869.g.vm.akamaistream.net[216.246.75.71]: 1755...
Connected
daftcat: Eureka! I uninstalled mplayer, downloaded, built and installed the latest version --
and I can successfully see and hear archived games. I'll have to wait until tonight to see if
I can watch live games.
As of now, the video is in a small window, with no option to make it full screen. Do I need to
build mplayer with the gui option to be able to select fullscreen?
Thanks for your help -- I truly appreciate it. And thanks to JKR et al for the amazing mlbviewer.py
script!
[QUOTE
As of now, the video is in a small window, with no option to make it full screen. Do I need to
build mplayer with the gui option to be able to select fullscreen?
[/QUOTE]
I'm able to toggle between full screen and the little one by hitting the f key. I learned that here too.
Great program! Less than two weeks ago, it looked gloomy. Now I'm glad it happened.I love avoiding using Firefox to watch a game. Get some kind of a 'Walter Mitty' kick from it.
Just hit 'f' in that window and that toggles full-screen mode. In full-screen, you'll notice that it's blocked by black bars. Someone said mlb is trying to force the aspect for HD and widescreen users but from reading the forums on mlb.com, a lot of regular users are pissed off about this. There is a way around it, though. Add -vf cropdetect to your mplayer options and look for the "crop" lines that appear in the text output from mplayer. Add this line to your mplayer options and restart the game using mlbviewer. You should only need to do this once.
For a 400k stream, the line looks like this:
-vf crop=288:208:56:10
I haven't gotten an 800k stream to crop reliably. I'm not sure if it's because I ran the 800k stream under cygwin on windows. I don't think my Linux machine is powerful enough for an 800k stream. Nor do I think it's necessary given my setup (a 17" LCD viewed from across the room.) 400k is good enough for me.
You can also add -fs to your mplayer line to default to full-screen mode when it starts a game. Of course, you can always press 'f' to toggle back to window mode.
Okay, I have to say my mlbrecord just paid for its effort with the rain delay in the Yankees/Royals game (go Royals!)
I started recording when I got home and gave it about a 30 minute headstart while I fixed myself dinner.
That meant when there was a 22 minute rain delay in the 4th, I was able to fast forward through it all, and I was back to
game action in seconds.
Now that's something you can't do with the archived stream! (*looks at Theophile* :-)
One thing I'm wondering about though is that if __getInfo() is handling both the cookies and getting the url, which is failing?
Not sure, somthing sure isn't working quite right here... this is what I'd love to get worked out. What I do is to put the cookies in an attribute of g (g.session_cookies), so that should remain as long as g remains. And then when I log out, I build my url opener using those same cookies. That's the idea, anyway. But clearly there's something that's a bit off. Might have to open this specific question out to a larger crowd on comp.lang.python or somewhere similar to get to the bottom of this.
I hacked jkr's script to display all games (not just in status I, W, F) and show their status prettily. If I disable the ability to hit enter to play on those non-available games, it would be a decent way to see upcoming games. I could see lifting the restriction on looking at future dates as well, though it would be nice to have a "Hit T for today" feature.
I'll post a patch if you like, but I guessed jkr's already 3 steps ahead of me on his working copy of the script.
I hacked jkr's script to display all games (not just in status I, W, F) and show their status prettily. If I disable the ability to hit enter to play on those non-available games, it would be a decent way to see upcoming games. I could see lifting the restriction on looking at future dates as well, though it would be nice to have a "Hit T for today" feature.
I'll post a patch if you like, but I guessed jkr's already 3 steps ahead of me on his working copy of the script.
Patch would be great. Not sure how much time I'll be able to give it over the next few days.
Selecting days forward would be cool too. The clearer the visual difference between available for watching and not, though, the better.
My sense is that not being able to press enter might be a bit confusing. Better would be to not be able to highlight it at all. In that way, it might be more effective to have the restriction placed on the up and down keys, more than on enter.
That's just a guess, though. If you still feel like playing around with it, I look forward to seeing whatever you come up with.
What do people feel about color support in mlbviewer/mlbrecord?
I am envisioning color coding games by status.
I'm also keen on using the last line of the screen for status messages.
So when someone selects a game that's not yet available and hits Enter, the status line would say,
"This game is not yet available."
An alternate would be using the status line to give a kind of "mouseOver" status line when a game is selected.
For mlbrecord, this is a must to have access to games in the future. Selecting a game in the future would prompt the user
to confirm that they would like to schedule the game for recording.
I haven't decided whether I want to limit recording to one game at a time. I'm thinking I will for the initial release
but I may allow up to four recordings since Mosaic allows a user to watch multiple games at a time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.