This is a follow up to our piece How to Stream to DLive + 5 Other Services Simultaneously - Part 1, which I concluded with a promise to delve to further into the technical details.
This tutorial does assume some familiarity with stuff like web servers and text editors and should be considered somewhat of an advanced guide. I'm working on simplifying the process and hope to produce an application to make it easy enough for anyone to use, so check back frequently!
Prep
If necessary, install Docker. Then clone the nginx-rtmp git repository:
git clone https://github.com/tiangolo/nginx-rtmp-docker.git
Config
cd to the directory you just cloned and open nginx.conf
for editing and enter your DLive and Twitch RTMP endpoints in the config:
cd nginx-rtmp-docker
vi nginx.conf
rtmp {
server {
listen 1935;
application live {
live on;
push rtmp://stream.dlive.io/live?key=yourkey/yourchannel;
push rtmp://twitch.tv/app/key;
}
}
}
events {
worker_connections 1024;
}
Start the server
Run the following command to start your local RTMP server, which will be used to forward the stream to DLive and Twitch simultaneously.
docker build -t nginx-rtmp . && docker run -p 1935:1935 -p 8080:80 --rm nginx-rtmp
Start the stream
In OBS, select Settings -> Stream -> Custom Server. Then enter the address to your nginx-rtmp
server:
rtmp://0.0.0.0:1935/live
OBS will send the stream to the nginx-rtmp
server you just created at address rtmp://0.0.0.0:1935/live
, which will forward the stream both DLive and Twitch.
Hope this is helpful for anyone wishing to restream to DLive without paying for Restream's custom server option. Please leave any questions or feedback in the comments!