please do let me know if there are any issues, but also keep in mind that i do have a day job and it may take some time for me to fix them.
STANDARD DISCLAIMER: you must have valid MLB login credentials to use this package. this will not get you any games for free (aside from the free game of the day, see below), and will absolutely not work without valid MLB login credentials. also, blackout rules apply to all games - for both any teams in your local geographical area, as well as any national exclusive games (i.e. ESPN and sunday night baseball in the US).
SUPPORT FOR ATTEMPTING TO BYPASS BLACKOUT RESTRICTIONS IS NOT AND WILL NOT BE PROVIDED.
as mentioned above, you can use this package with valid MLB login credentials to watch the free game of the day, if you do not have an active MLB TV subscription. the free game of the day will be indicated in the guide, and attempts to access any other game without a valid subscription will show an error message on screen that you are not entitled to view that game. BLACKOUT RULES STILL APPLY TO THE FREE GAME OF THE DAY.
docker run command:
docker run \
-p 8080:8080 --name channels-baseball \
-v storage_app:/var/www/html/storage/app \
-v storage_logs:/var/www/html/storage/logs \
-e APP_URL='http://server.ip:8080' \
-e MLB_USERNAME='xxx' -e MLB_PASSWORD='xxx' \
-e MLB_PLAYLIST_FIRST_CHANNEL='777' \
-e MLB_TEAM_ORDER='NYM,SDP,PIT,LAA,ATL,MIA,PHI,WAS,CHC,CIN,MIL,STL,ARI,COL,LAD,SFG,BAL,BOS,NYY,TBR,TOR,CWS,CLE,DET,KCR,MIN,HOU,OAK,SEA,TEX,MLB' \
-e MLB_BITRATE='5600' \
-e MLB_TIMEZONE='America/Los_Angeles' \
-e MLB_SHOW_TV_FEEDS=true \
-e MLB_SHOW_RADIO_FEEDS=false \
matty8199/channels-baseball:latest
docker-compose.yml
version: "2"
services:
channels-baseball:
image: matty8199/channels-baseball:latest
container_name: channels-baseball
environment:
- APP_URL='http://server.ip.goes.here:8080'
- LOG_LEVEL='warning'
- MLB_USERNAME=''
- MLB_PASSWORD=''
- MLB_BITRATE='5600'
- MLB_PLAYLIST_FIRST_CHANNEL='777'
- MLB_TEAM_ORDER='NYM,SDP,PIT,LAA,ATL,MIA,PHI,WAS,CHC,CIN,MIL,STL,ARI,COL,LAD,SFG,BAL,BOS,NYY,TBR,TOR,CWS,CLE,DET,KCR,MIN,HOU,OAK,SEA,TEX,MLB'
- MLB_TIMEZONE='America/Los_Angeles'
- MLB_SHOW_TV_FEEDS=true
- MLB_SHOW_RADIO_FEEDS=false
ports:
- 8080:8080
volumes:
- storage_app:/var/www/html/storage/app
- storage_logs:/var/www/html/storage/logs
volumes:
storage_app:
storage_logs:
the MLB_USERNAME and MLB_PASSWORD env vars above are both obviously required. put your valid MLB credentials into these two slots.
the other required environment var is APP_URL, which needs to be set to your server's IP and port 8080. so, for example, if you're running this on IP 192.168.1.100, then that env should be set as follows:
APP_URL='http://192.168.1.100:8080'
if you have another service on your machine at port 8080, you can change this port - just make sure you change it in all applicable locations (both in your docker run command / docker-compose config, as well as in the channels m3u config). if you do this, make sure you are only changing the host port (the container port must stay as 8080, as that's the port the container expects requests to come in on).
the other env vars you see there are pretty self-explanatory BUT all have default values if you don't specify them. i'll give a quick rundown here of what they do, though...
MLB_PLAYLIST_FIRST_CHANNEL
- the first channel in the playlist (i.e. the channel number where your MLB section will start in the guide). defaults to 20000, unless you specify otherwise. in my example, i used 777 because i wanted an easy triple tap number to get to the beginning of the list.
LOG_LEVEL
- exactly what you'd expect: defines how much information the logs will show. i would set this to warning initially to avoid a huge log file, but we may need to adjust if there are any issues that i need more detailed logs on.
MLB_TIMEZONE
- i almost wanted to say this is required, but technically it's not. if you don't set this, things should still work as far as watching games...but the guide data will be way off. if you don't specify a timezone here, the app will default to UTC.
example USA timezone values for this variable (just enter the America/xxx or Pacific/xxx part of the timezone below into the env spot in the docker-compose file, leave out the parenthetical timezone name):
America/New_York (eastern)
America/Chicago (central)
America/Denver (mountain w/ DST)
America/Phoenix (mountain standard, no DST)
America/Los_Angeles (pacific)
America/Anchorage (alaska)
Pacific/Honolulu (hawaii)
- in my example docker-compose file above, you can see i'm defaulting to pacific time
MLB_BITRATE
-
the default bitrate / video quality, defaults to 720p @ 60 fps (5600)
-
available options are (just enter the number only in the env section of the docker-compose file):
5600 (720p @ 60 fps) 3500 (720p) 2500 (540p) 1800 (504p) 1200 (360p) 800 (288p) 514 (216p) 192 (180p)
-
all options are in Kbps (ie. 5600 = 5600K) and are 30 fps unless otherwise specified
-
the following example would default to 720p, 30fps:
MLB_BITRATE='3500'
MLB_TEAM_ORDER
-
the order you want the teams to appear in the guide (will start from the first channel variable and increment one at a time in the order you specify here). if there are teams that are blacked out in your area and you want to exclude those teams, you can just remove them from the list here.
-
the MLB Big Inning feed can be added by including MLB as a team short code somewhere in this list (remove MLB from the list if you don't want the Big Inning feed included)
MLB_SHOW_TV_FEEDS
MLB_SHOW_RADIO_FEEDS
- these two environment variables can be set to true or false to turn the TV and/or radio feeds on or off
once you do that, follow the steps to add a custom m3u in channels:
- the stream format is HLS,
- source is URL,
http://server.ip:8080/m3u
- options you can set as you see fit, but this m3u won't change unless you recreate the container and change the team order (so you can probably just leave this set to never refresh). you can either set it to use your channel numbers or let channels pick them, shouldn't matter either way.
- xml guide URL is
http://server.ip:8080/epg
and i have mine set to refresh every hour (MLB updates their metadata almost immediately after games end or are postponed, so we want to refresh the guide as often as possible)
my venmo is @crackers8199 if anyone wants to buy me a beer or make a small donation. it's certainly not required, but a few kind users have messaged me privately recently asking if there's a way to donate, so i figured i'd add it here.