This docker container does the following
- Start nginx with RTMP module that restream to many RTMP servers including Facebook with stunnel
- Runs stunnel with facebook live server tunneling configuration
- Reads SRTMP push servers from the environment variables so no need to change nginx configuration
- Uses RTMP application name from environment variables so you can change it easily to some long random token
- Prepare a
.env
file, use.env.sample
file as a reference - run the container
docker run -it --rm -p 1935:1935 --env-file .env --name restreamer emadelsaid/restreamer
- Copy
.env.sample
content to.env
on your machine - Change values in
.env
to set your secret token - PLATFORMS environment variable is a comma separated names of other environment variables that hold the RTMP values
- to stream to FACEBOOK use
rtmp://127.0.0.1:1936/rtmp/
instead ofrtmps://live-api-s.facebook.com:443/rtmp/
- Facebook:
https://www.facebook.com/live/producer/
- Youtube:
https://www.youtube.com/live_dashboard
- Twitch
https://dashboard.twitch.tv/u/internalerr/settings/channel
servers listhttps://stream.twitch.tv/ingests/
- Mixer
https://mixer.com/dashboard/channel/broadcast
servers listhttps://watchbeam.zendesk.com/hc/en-us/articles/209659883-How-to-Change-Your-Ingest-Server
docker build . -t restreamer
docker run -it --rm -p 1935:1935 --env-file .env --name restreamer restreamer
- stream server url
rtmp://127.0.0.1/<TOKEN VALUE>
Most of the dockerfile code is from https://github.com/tiangolo/nginx-rtmp-docker so many thanks for him