No description
  • Python 97.2%
  • Shell 1.6%
  • Dockerfile 1.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-30 11:47:05 +01:00
config base code 2026-10-30 11:47:05 +01:00
relay base code 2026-10-30 11:47:05 +01:00
docker-compose.yml base code 2026-10-30 11:47:05 +01:00
Dockerfile base code 2026-10-30 11:47:05 +01:00
README.md base code 2026-10-30 11:47:05 +01:00
requirements.txt base code 2026-10-30 11:47:05 +01:00
SETUP.md base code 2026-10-30 11:47:05 +01:00
setup.sh base code 2026-10-30 11:47:05 +01:00
TODO.md base code 2026-10-30 11:47:05 +01:00

twitch-relay

Relays a Twitch channel to YouTube Live, unattended. It waits for the channel to go live, then runs streamlink → ffmpeg → YouTube RTMP. It stops when the channel ends and restarts with backoff after a crash. Optionally it syncs the title and privacy to YouTube and sends ntfy notifications. A small dashboard shows the state.

All settings live in one file, config/relay.env. With AUTO_UPDATE=1, changes apply as soon as you save.

Setup and credentials: SETUP.md

Expect roughly 15–40 s of extra delay compared with Twitch. This is inherent to pulling HLS and pushing RTMP.

relay/
  __main__.py     entry point
  config.py       relay.env parsing, validation, feature status
  controller.py   supervision loop + config hot-reload
  pipeline.py     streamlink/ffmpeg processes, log redaction
  twitch.py       Helix live detection
  youtube.py      YouTube Data API (title, privacy, watch URL)
  youtube_auth.py device-code OAuth helper (docker compose run --rm youtube-auth)
  notify.py       ntfy
  web.py          dashboard, /status, /metrics, /healthz
  state.py        shared runtime state
  healthcheck.py  Docker HEALTHCHECK