A lightweight docker-based nginx based RTMP relay/encoder for streaming simultaneously to multiple services. YouTube and Twitch are configured by default.
Although this package can be likely deployed and developed on OSX, the only officially supported operating system is Linux.
- The process of building the docker image makes outbound HTTP, HTTPS requests.
- Video is relayed via RTMP requests.
Both types of requests must not be blocked by your OS, network, or ISP. If you use a proxy server to connect to the web, ensure it accommodates the above requirements.
You must have the following packages installed and working for the current user:
- docker: Installation steps are located here.
- docker-compose: Installation steps are located here.
Add your Twitch and YouTube keys in the env/nginx.env
file. A few stream quality values are also configurable there.
./start.sh
That is it! Shut down the service with CTRL-C.
Service
: CustomServer
: rtmp://192.168.2.22:1935/live- Where 192.168.2.22 corresponds to the relay PC's actual IP address.
Output Mode
: AdvancedEncoder
: If you have a modern NVidia card, use NVIDIA NVENC H.264. Otherwise, use CPU encoding with x264.Rate Control
: CBRBitrate
: 20000. Set the bitrate to as large as a value as possible allowed by your network/bandwidth. YouTube re-encodes all video that it receives, even for live streams. Video that may look acceptable at lower bitrates will not look good when re-encoded by YouTube.Keyframe Interval
: 2
- As with any encoder, CPU requirements are very high. If this package is intended to re-stream gaming from a PC, it should be deployed on a separate 'encoder' PC.
- If you get lost setting bitrates, resolutions, and framerates: NVidia produced an excellent Broadcasting Guide that prescribes optimal settings.
This application was created by the following humans:
MIT