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.
So I wrote a greasemonkey script to fix the gameday audio to work. It finds the url for the audio stream from the appropriate webpage and opens it in a new window. Hopefully, you have a plugin that can handle the format of the stream (at least totem on ubuntu for me does). You can download the script from userscripts.org if you search for "mlb on linux". It probably does nothing for the video, though.
It seems like this or something else in the firebug info should be indicative of a way to write a greesemonkey script for video. I've very clumsily edited cwatson's script (which does work great for audio) to this to try to make it handle video:
With that I get "Firefox doesn't know how to open this address, because the protocol (mms) isn't associated with any program." Is that progress? So, how do I associate mplayer with the mms protocol? Sorry for being stupid, it's probably obvious, but I'm an Opera user normally.
As an aside, firebug shows that /scripts/mediaplayer/mlb_player.js contains this:
Funny they have something for live RealVideo streams in there when they haven't offered them for several years. If only they would again -- realplayer is at least genuinely cross-platform.
Thanks. Setting /usr/bin/mplayer as the associated app, however, it gives me this prompt but then does nothing (except remove the prompt) when I click "launch application". Maybe I need to get it to add proper quoting of the URL somehow? Or maybe that endless URL is the wrong endless URL?
You might want to single quote the url but it looks like it still handled it alright. So that's probably not your problem. The next thing I'd try is installing the w32codecs package. If it installs in /usr/lib/win32, mplayer should pick it up automatically. If that works for you, let me know and I'll update the mini-howto. If you fix the problem through whatever means, let me know and I'll update it.
Thanks,
Matthew
Quote:
Originally Posted by mr_e_uss
Now that I've found this thread, I feel like I am so close to getting this to work. However, mplayer crashes. Any ideas?
$ mlbplay "mUrl:mms://a92.l1086917572.c10869.g.lm.akamaistream.net/D/92/10869/v0001/reflector:17572?auth=ca.cUa2agaDbLbba3ccdacBa2cydgcdc4ad-bh9xkg-bA-1ehulKex-k7j7lbm7lkjalgmblal8jflhj7jcjfklk4jblbmclajalhmh&aifp=v0004&ct5=03-Apr-08&ct1=mlb&ct3=4281702&ct7=638721&ct4=mlb&ct6=76.119.147.186&ct8=1"
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.
Playing mms://a92.l1086917572.c10869.g.lm.akamaistream.net/D/92/10869/v0001/reflector:17572?auth=ca.cUa2agaDbLbba3ccdacBa2cydgcdc4ad-bh9xkg-bA-1ehulKex-k7j7lbm7lkjalgmblal8jflhj7jcjfklk4jblbmclajalhmh&aifp=v0004&ct5=03-Apr-08&ct1=mlb&ct3=4281702&ct7=638721&ct4=mlb&ct6=76.119.147.186&ct8=1.
STREAM_ASF, URL: mms://a92.l1086917572.c10869.g.lm.akamaistream.net/D/92/10869/v0001/reflector:17572?auth=ca.cUa2agaDbLbba3ccdacBa2cydgcdc4ad-bh9xkg-bA-1ehulKex-k7j7lbm7lkjalgmblal8jflhj7jcjfklk4jblbmclajalhmh&aifp=v0004&ct5=03-Apr-08&ct1=mlb&ct3=4281702&ct7=638721&ct4=mlb&ct6=76.119.147.186&ct8=1
Resolving a92.l1086917572.c10869.g.lm.akamaistream.net for AF_INET6...
Couldn't resolve name for AF_INET6: a92.l1086917572.c10869.g.lm.akamaistream.net
Resolving a92.l1086917572.c10869.g.lm.akamaistream.net for AF_INET...
Connecting to server a92.l1086917572.c10869.g.lm.akamaistream.net[64.86.71.157]: 1755...
Connected
MPlayer interrupted by signal 13 in module: open_stream
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
won't help unless you provide this information when reporting a possible bug.
You might want to single quote the url but it looks like it still handled it alright. So that's probably not your problem. The next thing I'd try is installing the w32codecs package. If it installs in /usr/lib/win32, mplayer should pick it up automatically. If that works for you, let me know and I'll update the mini-howto. If you fix the problem through whatever means, let me know and I'll update it.
Thanks,
Matthew
Thanks Matt. I already had the w32codecs installed, so (unfortunately) it must be something else. Also, I tried using single quotes instead of double quotes -- but that didn't help either. I'll keep poking away at it.
Okay, folks, as I promised, I've whipped up a little program to let you access games. It parses the day's schedule (just the current day for now), pulls down the active and archived games, and gives you a curses interface in the terminal. Just select a game and it will play in your preferred player. Controls are up and down arrows, return to play, and r to refresh the list.
EDIT: The below no longer applies to the new version. That is available at post #171 in this thread.
A few notes (please read!):
1. This requires a few python libraries you might not have. Notably: ClientForm, ClientCookie, and simplejson. They're all in debian/ubuntu -- I imagine they shouldn't be hard to find in fedora-land either.
2. You need to make an authorization file in your $HOME, called .mlbtv. It should just have two lines:
user: me@myself.i
pass: mypassword
3. Players and speed (set for mplayer and 400) are configurable in the script. There are options there for vlc and higher speeds as well.
4. This is still *very* preliminary, but it works, so I wanted to share it. I haven't put a lot of thought into security yet, so if you're worried about how your password is travelling, you should take a closer look at it. I will be rewriting the networking parts soon with urllib2, I think, to get rid of external library dependencies, and then I'll pay a bit more attention. You are, of course, welcome to rewrite it yourself.
5. Did I mention it's preliminary? Nothing fails gracefully. I'll make the errors more meaningful in the future. In the meantime, if something fails and you want to pass it along, just make sure to note the line number.
6. Because it's very preliminary, I wanted to give it to the baseball fans here to play around with and offer suggestions on, but I'd prefer if you didn't send it around all that much right now. If you make improvements, feel free to send those out, or back to me, but I don't want to be responsible for a wide circle of folks having to deal with any problems that might come out of this.
Anyway, enjoy, and feel free to send any suggestions or improvements along. I'll try to get some improvements in during the next couple of weeks, as time permits.
It works. I say again, it works. Now MLB.com can do whatever they want with the website and it doesn't matter, so long as the backend stuff stays the same. This is really, really great. Thanks jkr, you're a life saver. I can't wait to see if this can get integrated into MythTV.
Between the first and second entries. Now I have a "Watch Baseball" menu entry which will launch the script in a terminal, which in turn will launch mplayer fullscreen.
I use an RF keyboard with MythTV so those using a remote and lirc will have to see if you can navigate a terminal emulator with your remote. Also, you'll have to make sure you change it to use your installed terminal. If using GNOME, it would be 'gnome-terminal -x' instead of 'konsole -e'.
Myth button looks cool. I'll try it out. Also, not to get anybody's hopes up, but I've been in touch with the developer of MythStream and sometime soon he's going to extend it to run python parsers. So when he does, I should be able to adapt this for mythstream without too much trouble. I'll let you all know when that happens.
I'm getting this curious mplayer output when running mlbviewer.py. It just continues scrolling through endless iterations of saying that it's playing until closed.
Tried VLC and got "Unable to open 'mms://a871.v108695.c10869.g.vm.akamaistream.net/7/871/10869/v0004/mlb.download.akamai.com/10869/2008/mlb_!/mlbam/2008/04/04/mlbtv_bostor_400k.wmv?auth=ca.atbVaPcdcybwd0dCcUcMbmd0aobzd5b7-bh9ZBc-bA-4fkugM8y-k8m4mflklekem8jck7mjkkjckejalel7kbmdmbljle'"
And when I do the python launch from an external xterm, the xterm shows this:
Code:
VLC media player 0.8.6c Janus
X Error: BadDevice, invalid or uninitialized input device 158
Major opcode: 150
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
Major opcode: 150
Minor opcode: 3
Resource id: 0x0
Failed to open device
[00000286] access_mms access error: error while asking for file -1
[00000286] access_mms access error: error while asking for file -1
[00000286] access_mms access error: cannot connect to server
[00000286] access_mms access error: error: HTTP/1.0 401 Unauthorized
[00000283] main input error: no suitable access module for `mms://a871.v108695.c10869.g.vm.akamaistream.net/7/871/10869/v0004/mlb.download.akamai.com/10869/2008/mlb_!/mlbam/2008/04/04/mlbtv_bostor_400k.wmv?auth=ca.atbVaPcdcybwd0dCcUcMbmd0aobzd5b7-bh9ZBc-bA-4fkugM8y-k8m4mflklekem8jck7mjkkjckejalel7kbmdmbljle'
[00000278] main playlist: nothing to play
signal 2 received, terminating vlc - do it again in case it gets stuck
Some sort of authorization error it seems, but nothing like the authorization error I get when I use an incorrect password.
How strange. The url looks valid -- it has the authentication part in it. I just tried out that same game (Boston-at Toronto) and it worked fine. And you could clearly log in, or else you wouldn't have gotten the authorization code. Hmm... Do the urls you get through the firebug or workflow methods work for you?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.