LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MLB.TV in Linux (https://www.linuxquestions.org/questions/linux-software-2/mlb-tv-in-linux-432479/)

daftcat 05-22-2012 11:06 AM

Quote:

Originally Posted by Kady (Post 4684633)
I have been having hesitations and pauses in the stream. I am a premium subscriber with nexdef enabled. This has been going going on for some time. I have thought that it is either mplayer2 or possibly a problem with my connection to my provider, but do not know how to narrow it down. I have tried several versions of mplayer2. I am using Gentoo on three different machines and it occurs on all of them. Sometimes the stream pauses so frequently or stops altogetther that mlbviewer must be stopped and restarted. This usually seems to improve its behavior for a while. I have tried the latest mplayer2 pulled from the git at mplayer2's website and currently I am using Gentoo's mplayer2 version 2.0_p20120309. I will provide whatever information would be helpful.

Tom C

What is your values in ~/.mlb/config for the following:

min_bps
max_bps
adaptive_stream

If you want to lock in a specific stream speed, choose min_bps and max_bps to be the same and adaptive_stream=0.

If you want the stream to adjust based on network conditions, you can choose a low value for min_bps such as 500000 (500kbps) and a higher max such as 2400000 (2400kbps) or higher. You'll need to set adaptive_stream=1.

With adaptive streaming, mlbhls will judge based on network conditions whether max_bps is achievable. If it is, it stays on that stream. If it is not or there are interruptions, it will adapt the stream to min_bps and try again later. The actual internals of how adaptive streaming works in mlbhls is beyond me since that's not my tool. I just generate the proper command-line options to use the feature.

Someone else here might be able to chime in on the mplayer2 strings you can use to tune the player.

Kady 05-22-2012 11:15 AM

Quote:

Originally Posted by daftcat (Post 4684856)
What is your values in ~/.mlb/config for the following:

min_bps
max_bps
adaptive_stream

adaptive_stream=1
min_bps=1200000
max_bps=2400000


I will try experimenting with these paramaters and see what happens.

Thanks

Kady 05-23-2012 06:36 AM

I set:
min_bps=250000

and watched the Red Sox/Orioles game yesterday. I am still getting lots of annoying pauses and one complete halt that required restarting the program.

I have:

video_player=mplayer2 -lavdopts threads=1 -cache 2048 -really-quiet

I have read somewhere that mplayer2 output of "vdpau" will cause problems. I think "vdpau" is the default when it is compiled in as it is on my machines. I will try some other values for "-vo".

daftcat 05-23-2012 11:33 PM

Quote:

Originally Posted by Kady (Post 4685519)
I set:
min_bps=250000

and watched the Red Sox/Orioles game yesterday. I am still getting lots of annoying pauses and one complete halt that required restarting the program.

I have:

video_player=mplayer2 -lavdopts threads=1 -cache 2048 -really-quiet

I have read somewhere that mplayer2 output of "vdpau" will cause problems. I think "vdpau" is the default when it is compiled in as it is on my machines. I will try some other values for "-vo".

Cache 2048 is really small for a 2400 kbps stream. Especially because mplayer defaults to min_cache of 20%, e.g. it will begin playing stream when buffer is only 20% full.

So 2048 * 0.2 * 8 b/B = 3840. That means mplayer is beginning playback after less than 2 seconds is buffered.

Try increasing buffer size to 4096 or higher.

You can also try -vo xv.

Try increasing buffer size first, then try -vo xv after that if increasing buffer size didn't help.

Kady 05-24-2012 01:13 AM

Hi yesterday I set:

video_player=mplayer2 -lavdopts threads=1 -vo vdpau -vc ffh264vdpau -cache 2048 -really-quiet

and watched my Orioles lose a close one to Boston. It played nearly perfectly. I saw the vc (video codec) setting in an earlier thread. I have no idea why that should have helped. I have now set the cache up to 4096. I am not sure "-lavdopts threads=1" is necessary now as I removed it at one point and it didn't seem to make any difference. I will report again after watching another game or two.

thanks again.

friggo 05-31-2012 05:14 PM

mlbplay doesn't work?
 
Hello.

I seem to have noticed some problems with the timestamps sent to mlbhls from mlbplay and mlbviewer.

When I try to use mlbplay it seems to start to play at the end of the stream, ie. after the game is over. I suspect this is beacause mlbplay set the timestamp to start to mlbhls to zero (0).
Example:
Code:

# mlbplay.py v=nyy j=05/03/12
Media URL received:
mlbhls -B <really long hash> -L -s 4500000 -F 0 -o -| mplayer2 -fs -cache 1048000 -cache-min 5 -

When I use mlbviewer and jump to an inning that has started after midnight, game time, mlbviewer send the timestamp 00:xx:xx to mlbhls, and that seems to give the same result as mlbplay, ie. the stream starts after the game is over. If I use debug mode and copy-paste the command and exchange 00 in the timestamp to 25 it seems to work as intended.

Example working:
Code:

mlbhls -B <really long hash> -L -s 4500000 -F 25:40:00 -o - | mplayer2 -fs -cache 1048000 -cache-min 5 -
Eaxmple not working:
Code:

mlbhls -B <really long hash> -L -s 4500000 -F 00:40:00 -o - | mplayer2 -fs -cache 1048000 -cache-min 5 -
I seem to remember that both mlbplayer and mlbviewer worked in both cases a month ago or so. But my memory can be faulty.

My config file:
Code:

# See README for explanation of these settings.
# user and pass are required except for Top Plays
user=<username>
pass=<password>

show_player_command=1

live_from_start=1

favorite_color=cyan

speed=1200

video_follow=nyy

video_player=mplayer2 -fs -cache 1048000 -cache-min 5

show_inning_frames=1

x_display=

audio_player=mplayer -cache 64 -really-quiet

flash_browser=firefox %s

max_bps=4500000
min_bps=2000000

bg_color=xterm

coverage=home

adaptive_stream=0

audio_follow=

top_plays_player=

favorite=nyy

use_color=1

use_nexdef=1

debug=0

time_offset=

blackout=


BostonPeng 07-06-2012 03:34 PM

Sorry to resurrect an old thread, but is there still an app that will let us watch MLB.tv on Linux outside of our web browser? I got a 2-week free trial and want to look at options while I am able. Great Mother, it's nice to see Dodger games, even the next day. 8)

daftcat 07-06-2012 11:27 PM

Quote:

Originally Posted by BostonPeng (Post 4721135)
Sorry to resurrect an old thread, but is there still an app that will let us watch MLB.tv on Linux outside of our web browser? I got a 2-week free trial and want to look at options while I am able. Great Mother, it's nice to see Dodger games, even the next day. 8)

Yep. Mlbviewer is alive and well. So well this season, I've hardly had to answer this thread in a month or two.

http://sourceforge.net/projects/mlbviewer/

Sourceforge release should work well enough as is. But it may not be a bad idea to read one of the README or INSTALL files about how to download the latest SVN version if there's any trouble with the Sourceforge release.

BostonPeng 07-07-2012 10:33 AM

Thanks daft. I got it installed but I have a question. I'd rather use VLC but I must not have the settings right because I see something about needing a -c argument. I tried to watch last night's Dodgers/D-backs game and I was finally able to snag part of what I got before it scrolled off the screen:

Quote:

tmpdump -f "LNX 10,0,22,87" -o - -r "rtmp://cp65670.live.edgefcs.net/ondemand/secure
/mlbam/2012/07/06/14-318980-2012-07-06/web-encodes/mlbtv_lanari_visit_1200k/mlbtv_lan
ari_visit_1200k.mp4" -s http://mlb.mlb.com/flash/mediaplayer...diaPlayer4.swf
?v=4 -A 0 | vlc -cache 2048 -really-quiet - VLC media player 2.0.1 Twoflower (revision 2.0.1-0-gf432547)
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
vlc: unknown option or missing mandatory argument `-c'
Try `vlc --help' for more information
Also I tried to use mlbplay to see the game and got an error as well.
Quote:

$ python mlbplay.py v=la j=07/06/2012
Traceback (most recent call last):
File "mlbplay.py", line 174, in <module>
available = mysched.getListings(cfg['speed'], cfg['blackout'])
File "/home/bpeng/Installers/mlbviewer2012/MLBviewer/mlbtv.py", line 665, in getListings
return self.getXmlListings(myspeed, blackout)
File "/home/bpeng/Installers/mlbviewer2012/MLBviewer/mlbtv.py", line 669, in getXmlListings
self.getData()
File "/home/bpeng/Installers/mlbviewer2012/MLBviewer/mlbtv.py", line 486, in getData
self.data = self.__xmlToPython()
File "/home/bpeng/Installers/mlbviewer2012/MLBviewer/mlbtv.py", line 480, in __xmlToPython
return self.__scheduleFromXml()
File "/home/bpeng/Installers/mlbviewer2012/MLBviewer/mlbtv.py", line 383, in __scheduleFromXml
fp = parse(self.__getSchedule())
File "/home/bpeng/Installers/mlbviewer2012/MLBviewer/mlbtv.py", line 324, in __getSchedule
raise MLBUrlError
MLBviewer.mlbtv.MLBUrlError
$
I got everything installed except the mlbhls package because it fussed about something (I don't recall what now) and I figured didn't need it to enjoy the games, plus I just went with my already installed mplayer rather then mplayer2. Was I wrong on those decisions?

daftcat 07-08-2012 01:38 AM

Quote:

Originally Posted by BostonPeng (Post 4721590)
Thanks daft. I got it installed but I have a question. I'd rather use VLC but I must not have the settings right because I see something about needing a -c argument. I tried to watch last night's Dodgers/D-backs game and I was finally able to snag part of what I got before it scrolled off the screen:



Also I tried to use mlbplay to see the game and got an error as well.

I got everything installed except the mlbhls package because it fussed about something (I don't recall what now) and I figured didn't need it to enjoy the games, plus I just went with my already installed mplayer rather then mplayer2. Was I wrong on those decisions?

Mplayer2 is definitely better for this season's video streams. You can download a binary version of mplayer2 and point your video_player command to the downloaded location if you don't feel comfortable replacing the mplayer your distribution installed. Mlbhls is necessary for nexdef games. If you aren't going to use mlbhls, then set use_nexdef=0 in your ~/.mlb/config file.

Oh, I see your error in vlc. I don't think it takes the same command-line arguments as mplayer so -cache is being interpreted as -c with the remaining "ache" as the value for -c. Since it doesn't have a -c option (or if it does, "ache" is probably not a valid value for it), it's throwing an error. Change your video_player= to simply "video_player=vlc" (without the quotes.) That plus use_nexdef=0 and it just works for me. I think there's extra command-line options necessary to get the mlbhls streams working with vlc but you said, you're okay not using mlbhls.

Give that a try and let me know if that works for you.

BostonPeng 07-08-2012 02:11 PM

That line does get VLC working. Thanks. I also wrote a post for my blog on installing mlbviewer to help folks find out it's available and how to use it. I passed on the section about mlbhls because I was unable to make sure it works, partly due to the busy wifi at Starbucks, but I did mention it in case others are able to use it.

BostonPeng 07-09-2012 12:44 PM

Quote:

Originally Posted by daftcat (Post 3942651)
If mlblistings.py works, then pyxml is working.

Please add "debug=True" to your config file and run mlbviewer.py again.

Post the stack trace that it generates here for me to see where the parser is failing.

Sorry to reach back so far but I got some dist-upgrades this am (don't think any python or mplayer packages got upgraded) and when I tried to fire up mlbviewer this am to look at highlights from yesterday's disappointing game I saw a quick note about a problem with the parser page. When mlbviewer crashed I got this trackback:

Quote:

$ python mlbviewer.py
Traceback (most recent call last):
File "mlbviewer.py", line 1630, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "mlbviewer.py", line 273, in mainloop
raise Exception, detail
MLBviewer.mlbtv.MLBXmlError: No games available today.
$
Is it a problem with being during the ASG break? If so, is there a way to go straight to yesterday's games? When I tried to run mlbplay with yesterday's date I didn't even get to the logging in screen before I got dumped with
Quote:

$ python mlbplay.py v=la j=07/08/2012
Traceback (most recent call last):
File "mlbplay.py", line 174, in <module>
available = mysched.getListings(cfg['speed'], cfg['blackout'])
File "/home/bpeng/mlbviewer2012/MLBviewer/mlbtv.py", line 665, in getListings
return self.getXmlListings(myspeed, blackout)
File "/home/bpeng/mlbviewer2012/MLBviewer/mlbtv.py", line 669, in getXmlListings
self.getData()
File "/home/bpeng/mlbviewer2012/MLBviewer/mlbtv.py", line 486, in getData
self.data = self.__xmlToPython()
File "/home/bpeng/mlbviewer2012/MLBviewer/mlbtv.py", line 480, in __xmlToPython
return self.__scheduleFromXml()
File "/home/bpeng/mlbviewer2012/MLBviewer/mlbtv.py", line 383, in __scheduleFromXml
fp = parse(self.__getSchedule())
File "/home/bpeng/mlbviewer2012/MLBviewer/mlbtv.py", line 324, in __getSchedule
raise MLBUrlError
MLBviewer.mlbtv.MLBUrlError
$
When I went to the website to watch yesterday's game I got a complaint about a blackout but once I gave them my payment info they let me enjoy the game. I'd really like to be able to see the top plays from yesterday's game without using my web browser for the task.

daftcat 07-09-2012 01:49 PM

Revision 372: Fixed crash when no games available
 
This one's for you, BostonPeng. If you're not already on the svn branch of mlbviewer, now is a good time to grab it. Search svn in the README or INSTALL files.

Short answer: there was a variable that was uninitialized when no games are available like today (All-Star break.)


BTW, I imagine North America will be blacked out from watching All-Star game live tomorrow, but hopefully archived game should work without problems.

daftcat 07-09-2012 01:57 PM

Quote:

Originally Posted by BostonPeng (Post 4723099)
Sorry to reach back so far but I got some dist-upgrades this am (don't think any python or mplayer packages got upgraded) and when I tried to fire up mlbviewer this am to look at highlights from yesterday's disappointing game I saw a quick note about a problem with the parser page. When mlbviewer crashed I got this trackback:



Is it a problem with being during the ASG break? If so, is there a way to go straight to yesterday's games? When I tried to run mlbplay with yesterday's date I didn't even get to the logging in screen before I got dumped with

When I went to the website to watch yesterday's game I got a complaint about a blackout but once I gave them my payment info they let me enjoy the game. I'd really like to be able to see the top plays from yesterday's game without using my web browser for the task.

jump (j=) parameter takes date as two digit year, e.g. mm/dd/yy or 07/08/12

Not sure why the original developer went with two digit year instead of four but I just kept it that way. I added an extra check and error message for this.

daftcat 07-09-2012 02:07 PM

Quote:

Originally Posted by BostonPeng (Post 4722363)
That line does get VLC working. Thanks. I also wrote a post for my blog on installing mlbviewer to help folks find out it's available and how to use it. I passed on the section about mlbhls because I was unable to make sure it works, partly due to the busy wifi at Starbucks, but I did mention it in case others are able to use it.

Good job with the blog. BTW, you can add video_follow=la and audio_follow=la to your config and you'll never need to worry about whether the Dodgers are the home or away team as mlbviewer and mlbplay will figure that out for you. The *_follow parameters essentially say, "always give me LA's broadcast regardless of home or away."

Also, if you need help with mlbhls, post what compile error(s) you were getting here and either myself or the mlbhls developer can help you through it. Even if you don't use the higher bandwidths, I like that mlbhls supports adaptive streaming. I tend to cap myself at home to 1200 (max_bps=1200000) and turn on adaptive streaming. This way, if Comcast ever gets congested, mlbhls will dynamically adjust the stream down to a lower speed until such time that it can bump back up to 1200. It might be just the thing to get video working at crowded Starbucks. :)

Grew up in LA so cheers to another Dodgers fan. :)


All times are GMT -5. The time now is 10:23 PM.