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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

The default condensed game request is for a game that requires authorization. However, there is a lower quality stream that does not require authentication.

Add "free_condensed=1" to your ~/.mlb/config and restart mlbviewer (or reload the configuration using 'R' key. Now when you select a condensed game, it will choose the lower quality stream that you don't need authorization for.

Let me know if that works out for you.

Also fixed a logic bug where, under certain circumstances, the preferred audio would in fact be a video stream. :/

The default condensed game request is for a game that requires authorization. However, there is a lower quality stream that does not require authentication.

Add "free_condensed=1" to your ~/.mlb/config and restart mlbviewer (or reload the configuration using 'R' key. Now when you select a condensed game, it will choose the lower quality stream that you don't need authorization for.

Let me know if that works out for you.

You rock! Unfortunately I get the first second of the condensed game playing in mplayer and the it seems to lock up. I can play it in VLC so it's usable. Plus, if push comes to shove, I see that I can show the player command and then simply copy the URL and open it in my web browser for viewing, saving, etc.

I would like to use VLC for viewing top plays and the condensed games since the GUI it provides is a lot more helpful than what I can see to use in mplayer, but it's no biggie. I can tweak my config file as needed and reload it if I want to switch my top_plays_player on the fly.

ETA: It turns out mplayer itself is going funky on me. I can't even play the top plays individually in mplayer without it hanging after the video starts playing. I can play them without much problem other than possible buffering in VLC. I enabled debug in config file but neither that nor enabling debug with the hotkey seems to output any info on why the video hangs in mplayer.

You rock! Unfortunately I get the first second of the condensed game playing in mplayer and the it seems to lock up. I can play it in VLC so it's usable. Plus, if push comes to shove, I see that I can show the player command and then simply copy the URL and open it in my web browser for viewing, saving, etc.

I would like to use VLC for viewing top plays and the condensed games since the GUI it provides is a lot more helpful than what I can see to use in mplayer, but it's no biggie. I can tweak my config file as needed and reload it if I want to switch my top_plays_player on the fly.

ETA: It turns out mplayer itself is going funky on me. I can't even play the top plays individually in mplayer without it hanging after the video starts playing. I can play them without much problem other than possible buffering in VLC. I enabled debug in config file but neither that nor enabling debug with the hotkey seems to output any info on why the video hangs in mplayer.

I would recommend installing mplayer2 if you haven't already. Then even with mplayer2, I notice that I usually have to nudge it past the first second or two with the right arrow key.

Debug in mlbviewer unfortunately wouldn't tell you anything about the player. Mlbviewer is basically just a browser: a whole lot of code just to find the media url and maybe two or three lines of code to connect your media player to it.

Let me see what I can do about accommodating the highlight playlist feature with vlc. I may just have to include yet another player option in the config just to separate out playlist vs non-playlist syntax.

I would recommend installing mplayer2 if you haven't already. Then even with mplayer2, I notice that I usually have to nudge it past the first second or two with the right arrow key.

Debug in mlbviewer unfortunately wouldn't tell you anything about the player. Mlbviewer is basically just a browser: a whole lot of code just to find the media url and maybe two or three lines of code to connect your media player to it.

Let me see what I can do about accommodating the highlight playlist feature with vlc. I may just have to include yet another player option in the config just to separate out playlist vs non-playlist syntax.

I keep forgetting to try mplayer2. But when I tried it on yesterday's condensed game (Tigers at Marlins) I got this in my terminal:

It's weird because it worked fine earlier this am when I was using it.

I have fixed the crash but it seems they have pulled the 600K stream from the XML reply. (You can see the xml reply in ~/.mlb/unsuccessful-1.xml and parse it with test/mediaxml.py.) I have picked the next best stream, a 550K mobile stream. It's not great quality but it looks like the highest res for non-subscribers. It's a temp solution. The better solution is to build a list of acceptable streams and allow a config file override of the default. There is actually a better quality condensed game stream for subscribers so this would benefit everyone.

Hmm...there's a weird little logic error that if free_condensed is set, audio and video player commands do not get formatted correctly (line 500: prepareMediaPlayerCmd needs to be called for all cases except highlights and free condensed games.) But since the only reason you should set free_condensed is if you are a non-subscriber, normal subscribers shouldn't run into this error and non-subscribers will get a media not found response before they run into this. Interesting but harmless bug.

BTW: I did some cleanup on Sourceforge so if any of you received an answer for a three or four year old request today, I wanted to make sure Sourceforge info was current now.

MLB's making .3gp files available for condensed games? That could come in handy since my dumbphone requires .3g2 files for watching vids on it.

It's looking pretty well so far. Thanks for getting the 2013 season off to such a great start for Linux-using baseball fans, especially us poor schmucks who can't afford to pay for a video subscription that we'd surely buy if we could. With Opening Day upon us I'll write an article for my site with the updated info for running your program. Do you have an idea when the latest changes will make it into the official release? I'd like to let my readers know if there's an ETA but if there isn't I'll provide info on getting the code from svn.

MLB's making .3gp files available for condensed games? That could come in handy since my dumbphone requires .3g2 files for watching vids on it.

It's looking pretty well so far. Thanks for getting the 2013 season off to such a great start for Linux-using baseball fans, especially us poor schmucks who can't afford to pay for a video subscription that we'd surely buy if we could. With Opening Day upon us I'll write an article for my site with the updated info for running your program. Do you have an idea when the latest changes will make it into the official release? I'd like to let my readers know if there's an ETA but if there isn't I'll provide info on getting the code from svn.

I have no idea if we are looking at the official offering for 2013 or just a rehash of the 2012 offering for Spring Training while they continue to work out new features for 2013. They have frequently rolled out changes as late as Opening Week. I usually don't like to say this is good to go for Sourceforge until after at least the first week of the season.

That said, I am out of town this weekend and may not be able to follow Opening Day. I can upload a pre-release version and wait to see what happens in the next week or two.

I have no idea if we are looking at the official offering for 2013 or just a rehash of the 2012 offering for Spring Training while they continue to work out new features for 2013. They have frequently rolled out changes as late as Opening Week. I usually don't like to say this is good to go for Sourceforge until after at least the first week of the season.

That said, I am out of town this weekend and may not be able to follow Opening Day. I can upload a pre-release version and wait to see what happens in the next week or two.

Thanks. I'll see about posting a preliminary article based on what's working as of when I write it and make a note to write a followup once the league decides what they're doing this season.

Thanks. I'll see about posting a preliminary article based on what's working as of when I write it and make a note to write a followup once the league decides what they're doing this season.

I updated the documentation for 2013 and removed the pyxml requirement. That XML code has been part of standard python since 2.7. I added a couple of sentences for how to get it running on a default python3 system (like Arch Linux) using python2 mlbviewer.py. I've also updated mlbplay and mlblistings to the rewritten libraries. And my personal favorite, test/mediaxml.py has been updated to include node attribute names and values. Combined with the successful and unsuccessful xml's I write for every media request, this should be a huge help for debugging media not available or not authorized errors.

So install should be easiest it has been in a long time.

1. Python2.7 (or newer, but not Python3.x) - no other python libraries to install
2. Mplayer2 or VLC
3. rtmpdump for basic and subscriber condensed games
4. mlbhls for nexdef

I am not a paying subscriber, just use mlbviewer to watch the free condensed games. I just tried watching one of the condensed games using the settings I used last year, and got some error; so I tried the "free_condensed" configuration and it worked. However, the quality is significantly lower than the quality that you get in the browser (also for unauthenticated, free games). So looking a bit more into the error I was getting, it turns out to be what looks like a bug: a full rtmpdump invocation command is being passed as the url to the video player. The following patch fixes the issue I'm seeing (not sure of it breaks more-common use-cases, though, since the free condensed games is the only thing I use):

I am not a paying subscriber, just use mlbviewer to watch the free condensed games. I just tried watching one of the condensed games using the settings I used last year, and got some error; so I tried the "free_condensed" configuration and it worked. However, the quality is significantly lower than the quality that you get in the browser (also for unauthenticated, free games). So looking a bit more into the error I was getting, it turns out to be what looks like a bug: a full rtmpdump invocation command is being passed as the url to the video player. The following patch fixes the issue I'm seeing (not sure of it breaks more-common use-cases, though, since the free condensed games is the only thing I use):

Of the two FLASH streams, mlbviewer defaults to the FLASH_1200K stream. I plan to enhance it to allow subscribers to select between 1200 and 1800 stream. Both of the FLASH streams have attributes of login:Y and auth:Y which seems to imply that they are only available for subscribers.

I hesitate to use any of the CLOUD streams (even though they are login:N and auth:N) as it looks like we could be circumventing app revenue since they are clearly intended for the mobile apps.

That leaves the 3GP streams which top out at 550K but have login:N and auth:N.

Are you sure your subscription didn't auto-renew?

In any case, if free_condensed is set to 1, mlbviewer retrieves the 3GP 550K stream which is just an http url that cannot go through the rtmp code.

In mlbviewer.py, line 496:

Code:

if not mycfg.get('free_condensed'):
mediaUrl = mediaStream.prepareMediaPlayer(mediaUrl)

does exactly what your patch does. If free_condensed is used, don't invoke rtmpdump.

However, for the subscribers, condensed games using the FLASH streams are rtmp urls and your proposed patch would break condensed games for subscribers not using free_condensed.

BTW, I agree that the web stream is higher quality but I don't know which stream it is using. I tried some initial inspection using wireshark and debug console on the browser and couldn't figure it out. It looks like the web stream is an rtmp stream.

Checked in revision393 which re-enables the old [DEBUG] behavior. If debug is set, the command string is displayed only and does not execute the command string. This should help us both track down any malformed commands.

Can you paste the contents of ~/.mlb/successful-1.xml to http://pastebin.com and paste that url here?

From the responses I am seeing from MLB servers, there are several condensed games available but only a couple that look available for non-subscribers:

Of the two FLASH streams, mlbviewer defaults to the FLASH_1200K stream. I plan to enhance it to allow subscribers to select between 1200 and 1800 stream. Both of the FLASH streams have attributes of login:Y and auth:Y which seems to imply that they are only available for subscribers.

I hesitate to use any of the CLOUD streams (even though they are login:N and auth:N) as it looks like we could be circumventing app revenue since they are clearly intended for the mobile apps.

That leaves the 3GP streams which top out at 550K but have login:N and auth:N.

Are you sure your subscription didn't auto-renew?

In any case, if free_condensed is set to 1, mlbviewer retrieves the 3GP 550K stream which is just an http url that cannot go through the rtmp code.

In mlbviewer.py, line 496:

Code:

if not mycfg.get('free_condensed'):
mediaUrl = mediaStream.prepareMediaPlayer(mediaUrl)

does exactly what your patch does. If free_condensed is used, don't invoke rtmpdump.

However, for the subscribers, condensed games using the FLASH streams are rtmp urls and your proposed patch would break condensed games for subscribers not using free_condensed.

BTW, I agree that the web stream is higher quality but I don't know which stream it is using. I tried some initial inspection using wireshark and debug console on the browser and couldn't figure it out. It looks like the web stream is an rtmp stream.

Hmmm... what's confusing me is that I am *not* using free_condensed...

OK, after some experimentation, I see what's going on. There are a couple of different settings which are interacting here:

First of all, the immediate problem I was seeing was due to my old config having use_librtmp=1. With use_librtmp=0, indeed my patch is not needed. However, it *is* still needed for when use_librtmp=1. So, I think the code you pointed to above (in mlbviewer.py, line 496) should actually be changed to reflect that:

I believe this should fix the problem I was seeing even with my old config, without breaking the regular subscriber's use case. (The reason I am completely getting rid of 'free_condensed' will be explained next.)

Secondly, for watching the condensed games, apparently not even an mlb.com account is needed (which makes sense, given that in the browser they are freely available without logging in): I moved aside my .mlb/config, in which case mlbviewer creates a new, clean, config, and asks you to fill in the user and password. If you just leave them empty and start mlbviewer again, it will complain about an authentication error, but will nonetheless start. At this point, you are still able to watch the condensed games, and you get the 1200K stream, just like you would in the browser. So, I think that free_condensed is not actually needed at all. I will try to create a patch which cleans this up; and if you have no objections, I will put up a patched version on bitbucket.org (as a mercurial repository, from which you will be able to get a raw patch)?

BostonPeng, see post above. Leaving user= and pass= blank will get you access to the 1200K condensed game stream and the highlights.

Dov, changing free_condensed to use_librtmp will only work for that one case but it will break all the subscriber use cases including nexdef which has nothing to do with librtmp. I will have to look deeper into how to re-work the logic for librtmp. It will probably go into prepareMediaPlayerCmd effectively removing the need for that "if" statement. But I probably can't do that today as it needs a bit of testing.

In the meantime, I can disable it in the code and release note it until I have it re-worked.

I'm heading out of town soon for the weekend so I'm likely not going to take new patches until next week. Non-subscribers have a workaround by leaving user= and pass= blank and librtmp users can revert back to rtmpdump until I have this sorted.