A simple proxy to stream YouTube livestream audio directly into Jellyfin (or any media player). Also includes a webpage to stream audio directly in your browser. Mostly AI assisted.
-
Start the service:
docker-compose up -d
Or if you prefer Python
python stream_manager.py
-
Add to Jellyfin:
- Go to Dashboard -> Live TV.
- Click the
+next to Tuner Devices. - Select M3U Tuner as the type.
- For the File or URL, create a local file (e.g.,
youtube.m3u) or use a Data URI.
Create a file called youtube.m3u and add your favorite streams. For Jellyfin, adding tvg-id and group-title helps categorization:
#EXTM3U
#EXTINF:-1 tvg-id="LofiGirl" tvg-logo="http://YOUR_SERVER_IP:5000/thumbnail.jpg?v=jfKfPfyJRdk" group-title="YouTube Radio", Lofi Girl - Radio
http://YOUR_SERVER_IP:5000/stream.mp3?v=jfKfPfyJRdk
#EXTINF:-1 tvg-id="Synthwave" tvg-logo="http://YOUR_SERVER_IP:5000/thumbnail.jpg?v=4xDzrJKXOOY" group-title="YouTube Radio", Synthwave Radio
http://YOUR_SERVER_IP:5000/stream.mp3?v=4xDzrJKXOOY
Replace YOUR_SERVER_IP with the IP of the machine running this docker container, and v= with any YouTube Video ID.
- Manifest Unknown / Probe Failed: Ensure the container is running and the IP is accessible. The server now handles
HEADrequests to help Jellyfin's initial probe. - Stream Stops: YouTube sometimes rotates stream URLs. Restarting the channel in Jellyfin will force a fresh fetch through
yt-dlp. - Latency: There is an inherent 2-5 second delay as
yt-dlpresolves the YouTube stream andffmpegstarts transcoding. - Permission Denied when adding stations:
- Linux/Docker: Ensure the user running Docker has write permissions to
youtube.m3u. Runchmod 666 youtube.m3uon the host. - Windows: Right-click
youtube.m3u-> Properties -> Ensure "Read-only" is unchecked. - Docker Compose: Ensure the file is correctly mounted in your
docker-compose.yml.
- Linux/Docker: Ensure the user running Docker has write permissions to
- Flask: Receives the request from Jellyfin.
- yt-dlp: Fetches the best audio stream from YouTube.
- ffmpeg: Transcodes the stream to MP3 in real-time.
- Direct Streaming: The audio data is piped directly to the HTTP response, meaning zero disk space is used.

