mlbviewer uses a configuration file for many features and tweaks. The configuration file is $HOME/.mlb/config.
Many options require boolean values (either 1 or 0 or True or False):
use_nexdef=1
adaptive_stream=True
Some options can be changed through hotkey toggles within mlbviewer.
'n' key toggles use_nexdef
'p' key cycles through the valid non-nexdef speeds:
STREAM_SPEEDS = ( '300', '500', '1200', '1800', '2400' )
Some options can be specified more than one in the config file because they can take more than one value:
favorite=kc
favorite=cle
This would get converted into [ 'kc', 'cle' ], a list of favorite teams.
Some options are highly specific customer requests:
use_wired_web=True
VALID CONFIGURATION FILE OPTIONS
| Essential Options | Description |
|---|---|
| user= | MLB.tv email address |
| pass= | MLB.tv password |
| milb_user= | MiLB.tv email address |
| milb_pass= | MiLB.tv password |
These options can be left blank for users without MLB.tv/MiLB.tv subscriptions. Login not required for free features (scoreboard, line scores, box scores, standings, RSS, highlights, condensed games)
If the same user and pass is used for both MLB.tv and MiLB.tv, only user= and pass= need to be specified. If MiLB.tv uses a different email address and password, then specify those in the milb_user= and milb_pass= options.
| Media Options | Description |
|---|---|
| speed= | non-nexdef default video stream speed |
| use_nexdef= | True/False, use mlbhls (True) or rtmpdump (False) to play stream |
| min_bps= | lowest quality stream acceptable stream for adaptive streaming |
| max_bps= | highest quality stream to use for adaptive streaming, also speed |
| to use for non-adaptive streaming | |
| adaptive_stream= | True/False, enables the use of adaptive streaming for nexdef |
| live_from_start= | True/False, watch live games from start rather than live action |
With use_nexdef=True and adaptive_stream=True, adaptive streaming will start at min_bps=. mlbhls will sample download speed. If download speed is adequate, it will continue to shift speed up until max_bps= is reached. If download speed is inadequate (e.g. network congestion), adaptive streaming will down shift until download speed is adequate again. It will continue to attempt to shift to the highest speed adequate for network conditions. With adaptive_stream=False, mlbhls will lock onto the max_bps= stream. Valid stream speeds for min_bps= and max_bps= are:
NEXDEF_SPEEDS = ( '128', '500', '800', '1200', '1800', '2400', '3000', '4500' )
min_bps= and max_bps= can be specified in bps or kbps. max_bps=4500 is equivalent to max_bps=4500000.
Valid speeds for speed= (non-nexdef) are:
STREAM_SPEEDS = ( '300', '500', '1200', '1800', '2400' )
There are two stream speeds for condensed games: 1200 and 1800. If speed= setting is 1800 or above, the 1800K stream for condensed games will be selected. Otherwise, the 1200K stream is selected.
| Player Options | Description |
|---|---|
| video_player= | Player command for playing streaming video |
| top_plays_player= | Player command to use for highlights and condensed games |
| audio_player= | Player command for playing Gameday Audio |
| use_librtmp= | True/False, use mplayer built-in RTMP (librtmp) to bypass rtmpdump |
| rss_browser= | Command for opening RSS news items in web browser |
A limited number of text substitutions are supported for commands above. If any of the player commands above contain %s, the stream URL will be substituted for the %s substring. If %f is present in the command, an auto-generated filename will be substituted. The filename will contain the event-id and the call letters associated with the broadcast plus an appropriate file extension (.mp4 for video or .mp3 for audio.) %s in rss_browser= will be substituted to the news feed item URL.
| Stream Options | Description |
|---|---|
| coverage= | 'home' or 'away', default stream to prefer |
| blackout= | team code for teams that are considered local blackout teams |
| video_follow= | team code, whether home or away, prefer this team's video broadcast |
| audio_follow= | team code, whether home or away, prefer this team's audio broadcast |
| alt_audio_follow= | team code, whether home or away, prefer this team's alternate audio broadcast |
Valid team codes used for blackout= and audio_follow=/video_follow= are:
'ana', 'ari', 'atl', 'bal', 'bos', 'chc', 'cin', 'cle', 'col',
'cws', 'det', 'mia', 'hou', 'kc', 'la', 'mil', 'min', 'nym',
'nyy', 'oak', 'phi', 'pit', 'sd', 'sea', 'sf', 'stl', 'tb',
'tex', 'tor', 'was'
| Interface Options | Description |
|---|---|
| favorite= | team code, favorite teams are highlighted in listings, either underline |
| or in color if use_color=True | |
| use_color= | use curses-defined colors to highlight favorite= teams in listings |
| favorite_color= | use this color to highlight favorite teams, can be black, red, |
| green, yellow, blue, magenta, cyan, and white | |
| free_color= | use this color to highlight free MLB.tv game of the day |
| division_color= | use this color to highlight scores of division rivals for favorite= team |
| bg_color= | use this color for background of curses window, can be above plus "xterm" |
| bg_color=xterm will default background to terminal background color | |
| highlight_division | True/False, if True, highlight division rivals of favorite team by default, else, this behavior can be activated with D (uppercase D) hotkey |
| show_player_command= | True/False, display the player command before launching the media |
| player | |
| curses_debug= | True/False, enable debug for curses window including line numbers and |
| cursor values | |
| show_inning_frames= | True/False, show inning frames in jump to inning, inning frames do |
| not contain scores or display bottom of ninth to avoid spoilers | |
| also only in progress games will display inning availability for | |
| extra innings | |
| time_offset= | can be used to specify local time offset from US/Eastern (UTC-4) if default |
| time conversion fails; specified as -03:00 to indicate US/Eastern-3 or US/Pacific | |
| debug= | True/False, display the media URL only; does not launch player; also |
| produces crashes with stack traces for failures instead of | |
| handling errors gracefully |
| Custom Options | Description |
|---|---|
| postseason= | True/False, for international users, this setting ignores US blackout statuses that appear during postseason |
| international= | True/False, prune TBS-NAT and MLBN-NAT from listings to allow international users to see the correct -INT streams instead |
| use_wired_web= | True/False, for basic subscribers to use nexdef streams; the |
| nexdef stream scenario is generally HTTP_CLOUD_WIRED but may not | |
| work with basic subscribers but HTTP_CLOUD_WIRED_WEB will work | |
| wiggle_timer= | if resizing the mlbviewer window crashes mlbviewer, increasing wiggle |
| timer (in seconds) may help by preventing new resize signals being | |
| processed by mlbviewer (default is 0.5 second) | |
| disable_favorite_follow= | True/False, default behavior is that if a favorite= is specified, that team will be automatically added to all *_follow options. If this option is True, this behavior is disabled. |