Skip to content

Watch live MLB TV games in your preferred player with m3u8 and epg files.

License

Notifications You must be signed in to change notification settings

nicholasodonnell/gameday

Repository files navigation

Gameday provides m3u8 and epg files from MLB.TV, allowing you to watch live MLB games in your preferred player, ensuring you never miss a moment of the action. You must have a valid MLB.TV subscription to use this package, blackout rules apply.

Publish

Features

  • MLB.TV Integration: Integrate with your existing MLB.TV subscription (blackout rules apply)
  • M3U8 Playlist: A M3U8 file for every MLB team's game (including pre and post game shows)
  • M3U Playlist: A M3U file that combines all teams into a single playlist
  • Electronic Program Guide: An EPG file with guide data 7 days into the future
  • Adjustable Bitrate: Customize the streaming quality to fit your data preference
  • Timezone Support: Ensure game times are always accurate for your location

Getting Started

Prerequisites

Installation

  1. Set your config options including your MLB.TV credentials using the environment variables below.
  2. Start the container using the Docker or Docker Compose examples.
  3. Use the provided URLs to access the M3U8 playlist, EPG file, and team-specific playlists.

Example

❗ Be sure to replace /path/to/config in the below examples with a valid host directory path.

Docker

docker run -d \
  -e MLB_USERNAME=your-mlb-username \
  -e MLB_PASSWORD=your-mlb-password \
  -e TZ=America/New_York \
  -p 3000:3000 \
  -v /path/to/config:/app/config \
  --restart unless-stopped \
  nicholasodonnell/gameday:latest

Docker Compose

services:
  gameday:
    image: nicholasodonnell/gameday:latest
    container_name: gameday
    environment:
      - MLB_USERNAME=your-mlb-username
      - MLB_PASSWORD=your-mlb-password
      - TZ=America/New_York
    ports:
      - 3000:3000
    volumes:
      - /path/to/config:/app/config
    restart: unless-stopped

Resources

URLs

URL Description
/playlist.m3u M3U playlist for all MLB teams
/playlist/:team.m3u8 M3U8 playlist for a specific MLB team
/epg.xml Electronic Program Guide

Environment Variables

Name Description Default
MLB_USERNAME MLB.TV username Required
MLB_PASSWORD MLB.TV password Required
APP_URL URL of the application (will be used as the base URL when generating playlist files) http://localhost:3000
BITRATE Bitrate of the stream (192, 450, 800, 1200, 1800, 2500, 3500, 5600) 5600
LOG_LEVEL Log level (fatal, error, warn, info, debug, trace) info
TZ Your timezone name UTC

Development

  1. Set up the project for local dev by running:
    ./setup-dev.sh
  2. Start the project by running:
    docker compose up

Commands

Command Description
npm run lint Lint the project
npm run db:migrate Run database migrations
npm run db:migrate:make <name> Create a new database migration with the given name
npm run db:rollback Rollback latest database migration