This worked well for me, but the document can be updated in one respect: It is not necessary to compile Nginx, because libnginx-mod-rtmp can be installed from the repositories (at least with Ubuntu). So nginx and the mod can be installed with apt.
Also another problem might occur: One of our favorite live platforms ;) Facebook does only accept RTMPS connections which Nginx does not support. This problem can be solved using Stunnel, here is a good documentation: https://sites.google.com/view/facebook-rtmp-to-rtmps/home
I set this up on my Odroid HC2. Because I have OMV running and access it with port 80, I had to change the default listen port from port 80 to something else. I can still use my Odroid's internet IP address in the rtmp link in OBS to successfully stream. So, like, rtmp://192.168.1.54/live. I have a dynamic dns setup to access the Odroid HC2 server, but when I go use rtmp://dynamicdns.address.com/live in OBS, it does not work. What do I need to do (port forwarding, whatever) to stream remotely?
It took me a while to start using this feature in OBS.
For those who are having trouble transmitting to Facebook, I have adopted a very simple solution that yielded results: Just omit the Facebook server port in the nginx.conf file, like this: "push rtmp://live-api-s.facebook.com/rtmp/... "
Thus, the stream was received in the preview of Facebook.
Beside that, this solution allowed me to stop using recording settings to stream over UDP, since the RTMP stream are easily accessed through VLC.
Thank you very much for the excellent guide. I have used it for month withour any problems on a vps to simultanously stream to facebook and YouTube. Now facebook is changing to only accept SSL-connections via RTMPS on Port 443. If I edit nginx.conf by adding "push rtmps://live-api-s.facebook.com:443/rtmps..." I cannot start the server. Can anybody help me????
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.
Here's my problem: I need to stream sports events to youtube, the camera we're using outputs to hdmi, we use an elgato usb capture device to encode the video feed and outputs it via usb to a computer. Than we grab that encoded feed with OBS and stream it to youtube. Except that the camera needs to be close to the computer (due to hdmi cable length limitations) and we'd like to put the camera farther away from the computer...
Using a raspberry and a usb capture device, would it be possible to stream to the computer over wifi or ethernet?
Something like this:
camera > usb capture card > raspberry > network > computer > youtube
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:
Good stuff to deal with ISP oversea speed throttle and lower down resource use.
There is a way to add stream key for OBS (to rtmp server)?
I'm using a VPS and this VPS also running my small website.
I'm afraid of someone will know my VPS public IP (since it can be discover by reverse website IP).
Since OBS didn't support proxy/socks so I can't tunnel to VPS to make a local proxy/socks and using block all IP from using RTMP protocol except localhost.
You have done something wrong when it comes to installing the RTMP modules, if anyone is getting an error when configuring the RTMP config file do this >> ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-dev << As you can see, I changed the 'module' at the end to 'dev' as you are no longer downloading module.zip but dev.zip. Hope this helps some people!