LinuxQuestions.org
Register a domain and help support LQ
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
 
LinkBack Search this Thread
Old 04-10-2008, 11:42 PM   #211
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,682

Rep: Reputation: 73

Quote:
Originally Posted by mr_e_uss View Post
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,

try:
g.url()
except:
raise Exception,"g.url() failed"

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.
 
Old 04-10-2008, 11:44 PM   #212
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,682

Rep: Reputation: 73
I'm using the mplayer that packages with Debian Etch:

matthew@tango:~/mlbrecord$ mplayer
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 3)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
Usage: mplayer [options] [url|path/]filename

That looks a lot newer than what you have.

Quote:
Originally Posted by mr_e_uss View Post
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?

Thanks...
 
Old 04-10-2008, 11:45 PM   #213
mr_e_uss
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Rep: Reputation: 0
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
 
Old 04-10-2008, 11:47 PM   #214
mr_e_uss
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Rep: Reputation: 0
daftcat: Thanks for the version info. Now to hunt down a more recent version... Hopefully it'll work!
 
Old 04-11-2008, 12:11 AM   #215
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,682

Rep: Reputation: 73
Are you running mplayer with -quiet? Can you remove that? It might be hiding something more useful....
 
Old 04-11-2008, 12:15 AM   #216
mr_e_uss
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Rep: Reputation: 0
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!
 
Old 04-11-2008, 01:16 AM   #217
Wolfvorkian
Member
 
Registered: Sep 2007
Distribution: Arch
Posts: 108

Rep: Reputation: 15
[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.
 
Old 04-11-2008, 01:20 AM   #218
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,682

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

Glad you got it working!
 
Old 04-11-2008, 01:23 AM   #219
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,682

Rep: Reputation: 73
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* :-)
 
Old 04-11-2008, 01:39 AM   #220
jkr
Member
 
Registered: Apr 2008
Posts: 115

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

Awesome to hear about mlbrecord saving the day.
 
Old 04-11-2008, 08:40 AM   #221
ilikerobots
LQ Newbie
 
Registered: Apr 2008
Posts: 17

Rep: Reputation: 0
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.
 
Old 04-11-2008, 09:54 AM   #222
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
Quote:
Originally Posted by ilikerobots View Post
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.
 
Old 04-11-2008, 10:37 AM   #223
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,682

Rep: Reputation: 73
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.
 
Old 04-11-2008, 11:16 AM   #224
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,682

Rep: Reputation: 73
I just implemented the status line solution and took out the restriction for games not in I, W, F.

You can see the status line implementation here:

http://eds.org/~straycat/status.html

I like it. Whenever the screen is redrawn, the status line is written for the current cursor position giving mouseOver
functionality.
 
Old 04-11-2008, 11:25 AM   #225
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,682

Rep: Reputation: 73
I updated the screenshots and the code to include cases where new flags are thrown at us like 'PO' for postponed that appeared yesterday.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 05: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