MLB.TV in Linux
I realize this post is more "Google bait" than anything, but if you're not a tech geek or a baseball fan, consider the following as an object lesson in the can-do spirit of the open source software community.
MLB.TV is a subscription-based service offered by Major League Baseball which allows subscribers to listen to live radio broadcasts or watch live TV broadcasts of every MLB baseball game. It is generally a great service but every season, MLB.com introduces more "features" which usually carry with them a fair amount of problems.
One recurring problem is the annual "lockout" of Linux users. I don't think this is intentional, but every year, Linux users have to band together to work out a solution for using MLB.TV on our beloved operating system because some new feature has broken the means we used to watch games last season.
This year, MLB.com buried the player page on the website behind not only a layer of flash content, but also a layer of Microsoft's new "Silverlight" plugin. While flash is mostly supported in Linux, Silverlight is not. At all.
So a week or so ago, Google searches for solutions brought me to this forum post. From there on, you can follow the discussion and watch the literal evolution of an open source project. (I post under the name "Theophile").
For those who came to this page in search of a way to use MLB.TV in Linux, here is the solution. Jesse Rosenthal and Matthew Levine have written a program called mlbviewer which can be obtained here. To install, you will first need to install subversion (to get the mlbviewer source code) and the python module simplejson. To do this in Ubuntu, type in a terminal:
sudo apt-get install subversion python-simplejson
If you are using Gentoo, do:
sudo emerge -va subversion simplejson
Next, you will need to make sure you have mplayer installed. Most distros include this. If you do not have it, use your distro's package management system to install mplayer. You can also use Xine and VLC for video playback as well as XMMS or other audio player for Gameday Audio feeds.
Finally, since MLB.tv uses Windows Media codecs, you will need to install them. Ubuntu users should follow this HOWTO.
Now it's time to get mlbviewer. To do so, type in a terminal:
svn co https://mlbviewer.svn.sourceforge.net/svnroot/mlbviewer/trunk mlbviewer
This will check out a copy of the latest source code. To install it, do the following:
cd mlbviewer
python setup.py install
There! Now it should work. In a terminal, type mlbviewer.py and after configuration, you should see a list of the day's games. The up/down arrows select the game from the menu and the left/right arrows select the day. The 'h' key also will show you other options, such as Top Plays and Gameday Audio. To watch a game, simply scroll to the game you want, and hit enter. This should spawn an mplayer window and you should be watching your game! You can toggle mplayer's full-screen mode with the 'f' key.
Here are some screenshots of an older (7 April 2008) version of the script in action. To see full resolution screenshots, click through:
The script once launched. It even shows you which games are over and archived. The rest are either "live" or haven't started yet.
Watching the Orioles/Mariners game. This is the 400k stream using Xine (rather than mplayer) as the media player. You can edit the configuration file to use the media player if your choice.
This is the same game, but the 800k stream. The script uses the 400k stream by default, but it can be changed by opening the configuration file in a text editor and changing "400" to "800", or by pressing the 'p' key while in mlbviewer.
MLB.TV is a subscription-based service offered by Major League Baseball which allows subscribers to listen to live radio broadcasts or watch live TV broadcasts of every MLB baseball game. It is generally a great service but every season, MLB.com introduces more "features" which usually carry with them a fair amount of problems.
One recurring problem is the annual "lockout" of Linux users. I don't think this is intentional, but every year, Linux users have to band together to work out a solution for using MLB.TV on our beloved operating system because some new feature has broken the means we used to watch games last season.
This year, MLB.com buried the player page on the website behind not only a layer of flash content, but also a layer of Microsoft's new "Silverlight" plugin. While flash is mostly supported in Linux, Silverlight is not. At all.
So a week or so ago, Google searches for solutions brought me to this forum post. From there on, you can follow the discussion and watch the literal evolution of an open source project. (I post under the name "Theophile").
For those who came to this page in search of a way to use MLB.TV in Linux, here is the solution. Jesse Rosenthal and Matthew Levine have written a program called mlbviewer which can be obtained here. To install, you will first need to install subversion (to get the mlbviewer source code) and the python module simplejson. To do this in Ubuntu, type in a terminal:
sudo apt-get install subversion python-simplejson
If you are using Gentoo, do:
sudo emerge -va subversion simplejson
Next, you will need to make sure you have mplayer installed. Most distros include this. If you do not have it, use your distro's package management system to install mplayer. You can also use Xine and VLC for video playback as well as XMMS or other audio player for Gameday Audio feeds.
Finally, since MLB.tv uses Windows Media codecs, you will need to install them. Ubuntu users should follow this HOWTO.
Now it's time to get mlbviewer. To do so, type in a terminal:
svn co https://mlbviewer.svn.sourceforge.net/svnroot/mlbviewer/trunk mlbviewer
This will check out a copy of the latest source code. To install it, do the following:
cd mlbviewer
python setup.py install
There! Now it should work. In a terminal, type mlbviewer.py and after configuration, you should see a list of the day's games. The up/down arrows select the game from the menu and the left/right arrows select the day. The 'h' key also will show you other options, such as Top Plays and Gameday Audio. To watch a game, simply scroll to the game you want, and hit enter. This should spawn an mplayer window and you should be watching your game! You can toggle mplayer's full-screen mode with the 'f' key.
Here are some screenshots of an older (7 April 2008) version of the script in action. To see full resolution screenshots, click through:
The script once launched. It even shows you which games are over and archived. The rest are either "live" or haven't started yet.
Watching the Orioles/Mariners game. This is the 400k stream using Xine (rather than mplayer) as the media player. You can edit the configuration file to use the media player if your choice.
This is the same game, but the 800k stream. The script uses the 400k stream by default, but it can be changed by opening the configuration file in a text editor and changing "400" to "800", or by pressing the 'p' key while in mlbviewer.

