Files
retroLabs/README.md

3.2 KiB

retroLabs

retroLabs runs a private cable-style TV lineup from your media library. Tunarr handles programming and linear HLS. The RetroTV Bridge serves the Roku app and forwards Tunarr's web UI over the same LAN port.

Set up programming

The stack on this machine uses Tunarr at 192.168.0.203:4242.

  1. Put a few compatible test videos in data/media/, or set RETROTV_MEDIA_DIR in .env to an existing library and run docker compose up -d. The directory is mounted read-only at /media inside Tunarr.
  2. In Tunarr's media sources, add a Local source and a library under /media. Start a scan. You can also connect an existing Plex, Jellyfin, or Emby source.
  3. Create two channels with different numbers. Use HLS as the channel's stream mode for the initial Roku test. Add programming to each channel, save, and use Tunarr's Guide and Watch actions to verify the schedule and playback.
  4. Open the Roku channel lineup to check that both channels and the native weather placeholder are present.

See the Tunarr setup walkthrough and scheduling documentation for time slots, sequential programming, and filler.

Start the stack on another checkout

Requires Linux, Docker with Compose, and an available LAN IPv4 address.

mkdir -p data/media
cp .env.example .env
# Set RETROTV_LAN_IP in .env to this machine's LAN IPv4.
docker compose up -d --build
docker compose ps
docker compose logs -f bridge tunarr

Use http://<LAN-IP>:4242/web/ for the programming UI and /api/v1/health for the bridge health check. Tunarr's internal port 8000 is published only on host loopback port 14242. The bridge uses host networking for SSDP on UDP 1900 and binds HTTP to the configured LAN IP. Admin and device access currently share the trusted LAN with no bridge-level authentication. Compose persists Tunarr's configuration and the bridge's UUID in named volumes. Tunarr defaults to two CPU cores of capacity to limit the impact of scans and transcoding on the host. Set TUNARR_CPUS in .env to change the limit.

NVIDIA transcoding on this host

The current host uses the NVIDIA Compose override for Tunarr's CUDA transcode profile. The local .env selects it with COMPOSE_FILE=compose.yaml:deploy/compose.nvidia.yaml. The override maps NVIDIA device nodes and the host's x86-64 driver libraries into Tunarr. If the host driver version changes, set TUNARR_NVIDIA_DRIVER_VERSION in .env to the version shown by nvidia-smi and recreate Tunarr with docker compose up -d --no-deps tunarr.

Roku

Run ./roku/build.sh to produce roku/dist/retroLabs.zip. See Roku setup and controls for sideloading and manual server entry.

Backend contract tests

python3 -m venv .venv
.venv/bin/pip install -r bridge/requirements.txt
.venv/bin/python -m unittest discover -s tests -v

The tests exercise lineup and guide normalization, server ID persistence, Tunarr admin writes, and HLS manifest/segment forwarding. Physical Roku discovery, playback, live tuning, and reboot recovery are the remaining device acceptance checks. Pairing and live weather are deferred.