Docker services to provide a frontend and backend for a simple HTTP streaming application, using HLS
Reverse proxy for the backend Django app. Links to Django using a unix socket, via the tv-stream volume, mounted on /tmp/stream
Serves static files like js and css ones, which are collected py Django collectstatic routine.
Also it serves the M3U8 playlists and .ts files generated by the tv/reflector system.
The reverse proxy configuration establishes a no-cache policy to always serve the latest playlist and ts files.
Django app serving as a frontend and backend. The frontend uses videojs as the player. The backend allows to CRUD both servers and channels, where servers are Docker instances exposed over the TCP API, and channels are running instances of tv/reflector
Stream reflector service based on Alpine Linux and ffmpeg. Also includes youtube-dl to support external streaming sites.
Uses the following ENV variables,
- NAME, which specifies the name of the output directory for the streams.
- INPUT, which specifies an input stream. It can be anything that ffmpeg can ingest.
- YOUTUBE_DL, to ingest streams from any site supported by youtube-dl. If this is used, it will override INPUT, if it was also defined.
- VCODEC, to allow trasnscoding. This is what usually goes after the -vcodec argument on ffmpeg. The Django app currently has some predefined VCODEC values:
CODEC_CHOICES = [ ('copy', 'Copy source'), ('libx264 -preset ultrafast -crf 23', 'x264 ultrafast CRF23 (Default)'), ('libx264 -preset ultrafast -crf 10', 'x264 ultrafast CRF10 (Highest Q)'), ('libx264 -preset ultrafast -crf 15', 'x264 ultrafast CRF15 (High Q)'), ('libx264 -preset ultrafast -crf 30', 'x264 ultrafast CRF30 (Low Q)'), ('libx264 -preset ultrafast -crf 35', 'x264 ultrafast CRF35 (Lowest Q)'), ] - tv/reflector-playlist-youtube, a Docker image to stream infinite-loop playlist from YouTube
tv$ sh build.sh, will execute docker-compose for the nginx/Django stack, and will build the tv/reflector image You should be able to find nginx running on port http://ip.address:30000 You'll need to create a superuser for Django in order to access the backend under http://ip.address:30000/login