goatie999 / nginx-rtmps-docker

Docker container to enable local multi-streaming to different services via RTMP and RTMPS
MIT License
5 stars 3 forks source link

nginx-rtmps-docker

Docker container to enable local multi-streaming to different services via RTMP and RTMPS

As of release v0.2.7 / latest, this container is set to utilise these services, Restream.io, Facebook Live, YouTube, Twitch and Mixcloud.

This container makes use of stunnel4 in order to work with Facebook's specification that only supports RTMPS. Stunnel4 is built as an internal service within this container to make this function correctly.

I'm setting this up with the intention that people host the container on a Synology NAS but it also runs just fine from other Docker setups (i.e. I've tested using Docker on OSX).

You don't have to use all of the providers in this setup, any that you leave the stream key value blank for will be disabled when the container starts.

SYNOLOGY INSTRUCTIONS:

  1. If you're using the Synology GUI, once you have downloaded the required release from the 'Registry' (goatie999/nginx-rtmps:\<tag>), launch container from the 'Image' menu.

  2. From the 'Create Container' window, rename the container as required and click the 'Advanced Settings' button.

  3. From the 'Port Settings' tab, define the 'Local Port' number that you'd like to access the container via, or leave as Auto if you don't mind Synology changing this each time you restart the container.

  4. Open the 'Environment' tab. Here's the most critical part. Here you must enter your unique Stream Key(s) for the services that you want the container to multi-stream to. To this by locating your stream key from the settings of your streaming service provider(s) and copy/paste your stream key into the relevant 'Value' section for the \<Provider>_KEY variable.

  5. It is not required but if you do want to update the URL used for the streaming provider (i.e. to set a specific geoprahic ingest server for that provider), then you can do this from the 'Environment' tab also.

  6. Click 'Apply' / 'Next' / 'Apply' and you're nginx-rtmps container should start.

COMMAND LINE INSTRUCTIONS:

If you're headed down the command line route, I'm assuming that you have a good idea of what Docker is and how it works. However, just in case that's not the case, the simplest way to get Docker installed on your Windows PC or Mac it to head over to the Docker website and download / installed their packaged setups.

STREAMING SOFTWARE SETUP:

This should work for any streaming software that allows you to define a custom RTMP streaming server. I've tested with OBS and Streamlabs OBS (SLOBS). Within the settings of the streaming software, set the stream server to be:

rtmp://<Server IP Address / FQDN>:<Chosen Port Number>/live

The Stream Key field in OBS / SLOBS can be left blank

Save your setting and you're now ready to 'go-live!'

Thanks and Links:

Thanks to thiagoeolima/nginx-rtmps and JasonRivers/Docker-nginx-rtmp for inspiration and code snippets to get my container operational as I wanted / needed it.

Docker Hub: https://hub.docker.com/r/goatie999/nginx-rtmps

GitHub: https://github.com/goatie999/nginx-rtmps-docker

Restream.io affiliate link: https://restream.io/?ref=qQ6BR