Files
ts6-manager/Dockerfile.sidecar
ClusterzxandClaude Opus 4.6 591e4ac950 feat: Video streaming via MusicBot with Go WebRTC sidecar
Extend MusicBot to stream video (YouTube, URLs, local files) to TS6
channels via WebRTC P2P. Uses a Go sidecar (Pion WebRTC + FFmpeg) for
media relay and a new stream signaling layer over the TS3 UDP protocol.

- Go sidecar: WebRTC peer management, RTP forwarding, FFmpeg control
- Stream signaling: setupstream, respondjoinstreamrequest, streamsignaling
- YouTube URL resolution via yt-dlp before passing to FFmpeg
- Quality presets (480p/720p/1080p) with configurable bitrate/framerate
- WebUI: Video tab in MusicBots page with live WebRTC preview player
- Viewer list with kick capability, chat commands (!stream, !stopstream, !viewers)
- TS3 UDP command fragmentation for large SDP payloads
- Docker: multi-stage sidecar build, separate container with SIDECAR_URL
- Graceful sidecar error handling (no backend crash on missing binary)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:14:58 +01:00

16 lines
504 B
Docker

# syntax=docker/dockerfile:1.4
FROM golang:1.22-bookworm AS build
WORKDIR /src
COPY packages/sidecar/go.mod packages/sidecar/go.sum ./
RUN go mod download
COPY packages/sidecar/main.go .
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /sidecar main.go
FROM debian:bookworm-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg ca-certificates && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=build /sidecar /usr/local/bin/sidecar
EXPOSE 9800
CMD ["sidecar"]