How to set up your own private RTMP server using nginx

How to set up your own private RTMP server using nginx

Reviews 4.56 star(s) 40 reviews

It's working but only kinda stream labs cant connect to the server but when I go in and type the server up into google it comes up just like it should and I have no clue how to fix it
Is there a way to configure RTMPS over port 443 with NGINX?
This is required for streaming to Facebook.

Thanks.
I am incredibly thankful for this guide!! There are a few things missing for newer users though. I had never used Ubuntu before so I had to learn a lot to get this to work.

1.) When I first installed NGINX, I didn't have a user created (didn't know I needed one) which caused problems because the installs default location is inside a user folder.

2.) When he says to "edit the config file" I had absolutely no clue how to even begin doing that from a command line. But I learned that I needed to use the "vi" editor, and was able to find some other tutorials online about it.

Again, incredibly thankful for this guide, but it seems aimed at users who are already familiar with Ubuntu. But there are many novice users who could use this functionality who would benefit from a more comprehensive tutorial.
Thanks for writing this, it got me fairly far. However it does assume a bit of prior knowledge. I've used Linux before, but not extensively.
I found out that I needed to install unzip. I had to Google that. For newbies, it would be good to include this line before unzipping:
sudo apt-get install zip unzip

Also for the initial line:
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
I got loads of 404 errors. That's apparently because some of the paths are old. I Googled and found that the following worked:

apt-get update && install build-essential libpcre3 libpcre3-dev libssl-dev

Not sure why!

However, when I got to the end and added to the config file and tried to stream to it from OBS I just got server not found.

I used something similar to this:
rtmp {
server{
listen 1935;
chunk_size 4096;

application live {
live on;
record off;
push rtmp://live.twitch.tv/app/[streamkeyfromtwitch];
push rtmp://a.rtmp.youtube.com/live2/[streamkeyfromyoutube];
}
}
}

and streamed to rtmp://(My-IP)/live

Any thoughts on how I can debug this. I really don't like it when things don't work!
I think this guide is outdated.
It mentions version 1.15.1 at the top, then asks us do download a dev.zip file, and then extracting a master.zip file, that we haven't been intructed to download. And after that it wants us to go to a folder named nginx-1.13.1, which doesn't exist, because we downloaded the 1.15.1.

If I extract the 1.15.1 file and the dev.zip, the installation in the next steps fails.
same if I download the 1.13.1 file and master.zip, although I get a different error.

I'm using ubuntu in windows.
dodgepong
dodgepong
Hi Popupkiller,

I missed a couple spots when I recently updated the guide for a newer version, thanks. The correct files are nginx-1.15.1.tar.gz for nginx and dev.zip for the rtmp module.
This was really simple to set up. Although, having issues with timing and keyframe intervals. Twitch and Youtube keep complaining odd timing.
Back
Top