i think we're ready to open this up for everyone. i won't say it's still BETA, but it's still extremely raw...so 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 a valid MLB TV subscription to use this package. this will not get you any games for free, and will absolutely not work without valid MLB TV 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).
current version: matty8199/channels-baseball:1.2.2
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' \ -e MLB_BITRATE='5600' \ -e MLB_TIMEZONE='America/Los_Angeles' \ matty8199/channels-baseball:1.2.2
version: "2" services: channels-baseball: image: matty8199/channels-baseball:1.2.2 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_TIMEZONE='America/Los_Angeles' 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:
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...
- 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.
- 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.
- 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
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:
- 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.
once you do that, follow the steps to add a custom m3u in channels:
- the stream format is HLS,
- source is URL,
- 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/epgand i have mine set to refresh every 3 hours (MLB updates their metadata almost immediately after games end or are postponed, so we want to refresh the guide as often as possible)