Trying to stream to YouTube and DLive at the same timesteemCreated with Sketch.

in dlive •  7 years ago  (edited)

I just started using dlive.io, and wanted a way to stream to both YouTube and DLive at the same time.

Restream.io gives you this ability, but appears to require their ~$15/mo package for the ability to stream to a 'custom' RTMP address (necessary for DLive streaming).

I went searching for an open-source alternative and found the nginx-rtmp module.

With the following nginx config file, I'm able to "push" the stream to 2 different endpoints.

rtmp {
     server {
       listen 1935;
       application mypush {
         live on;
         push rtmp://dlive-rtmp-address:1935/app/stream-key?user&pass;
         push rtmp://a.rtmp.youtube.com:1935/live2/yt-stream-key;
         }
       }
     }


So I run this nginx-rtmp module locally via Docker, and I set OBS to stream to docker-ip:port/mypush. nginx then takes the stream and publishes it to the two RTMP addresses above. Like so:

multistream_fixed.png

When I published to docker-ip:port/mypush, I could see my stream live on YouTube, but unfortunately not on dlive.

My suspicion is that the problem is the DLive requires username and password authentication to stream, while YouTube does not.

So I'm trying to figure out how to properly format the RTMP url string to enter into the nginx config.

I checked in the DLive Discord channel and was advised to check the RTMP protocol specification and the following link:

https://www.wowza.com/docs/how-to-format-adobe-flash-rtmp-urls

I will follow up with another post as soon as I get this working!

Further reading:

http://nginx-rtmp.blogspot.com/

https://github.com/arut/nginx-rtmp-module

https://github.com/brocaar/nginx-rtmp-dockerfile

http://nginx-rtmp.blogspot.com/2014/01/redirecting-streams-in-version-111.html

http://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/rtmp/pdf/rtmp_specification_1.0.pdf

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

That's funny! I JUST posted a how-to on uploading videos to DerpTube. We're like Siamese brains.

ha @allseeingewe did you get reprimanded by youtube too?

Did you get anywhere with this. I am able to stream with OBS just fine, but I dont know how to add the "streamkey" portion which is actually the username not the streamkey. The streamkey for dlive is given as a url argument like this: rtmp://stream.dlive.io/live?key=zr7MVllUEc9KQlw2_Y_2YADDAYADDAYADDwBJ4IomMSQ0=

I discovered that the "Streamkey" field in OBS comes across as "name" but changing the PUSH url to rtmp://stream.dlive.io/live?key=zr7MVllUEc9KQlw2_Y_2YADDAYADDAYADDwBJ4IomMSQ0=&name=USERNAMEHERE had no effect and dlive still rejects the connection.

Well, to answer my own question I figured it out. The "name" has to be passed on as playPath like this: push rtmp://stream.dlive.io/live?key=3MC4BLAHBLAHBLAYg= playPath=dLiveUsernameGoesHere;