Installation | Start NGINX | How to stream with OBS | Watch HLS Stream | License
Setting up HLS live streaming server using NGINX + nginx-rtmp-module on Docker
Guide used as a reference: https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/
Install Docker by following Dockerβs instructions
Clone repo in your terminal with the following command:
git clone https://github.com/MohamedBakoush/docker-HLS-streaming-server.git
Once that command completes successfully, you should see a new docker-HLS-streaming-server folder in your current directory.
Navigate to the folder you created in step 2:
cd docker-HLS-streaming-server
Then, run the following command:
docker-compose up
You should see a wall of logging output from the containers being launched on your machine. Once this output slows, you should have a running instance of docker-HLS-streaming-server on your local machine!
CLI into docker-HLS-streaming-server's docker container and run
Start nginx in the background
/usr/local/nginx/sbin/nginx
Start nginx in the foreground
usr/local/nginx/sbin/nginx -g 'daemon off;'
Kill nginx
/usr/local/nginx/sbin/nginx -s stop
How to stream with OBS
- Settings
- Stream
- Service: Custom
- Server:
rtmp://localhost:1935/stream
- Stream Key: $STREAM_KEY (Can Be Anything)
- Stream
- Start Streaming
ffmpeg -re -i ./videos/sample_960x400_ocean_with_audio.mp4 -c:v libx264 -c:a libmp3lame -ar 44100 -ac 1 -f flv rtmp://localhost:1935/stream/test
Safari, WatchVideobyLink, VLC, HLS player:
http://localhost:5432/hls/$STREAM_KEY.m3u8