How to set up your own private RTMP server using nginx

All Versions How to set up your own private RTMP server using nginx

jagr_200

Member
I've done that. Last command I have run is ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master and I am getting this error again

./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE lib ray into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.
 

dodgepong

Administrator
Community Helper
Just to be clear...

I want you to run the following commands, in order, regardless of what you have already run in the past:

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

Make sure there are no 404 errors after either of the above commands.

Then in the nginx directory, run

./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master

Do that and then report back.
 

jagr_200

Member
Yes, run that, then start the whole guide from the beginning.

Just to be clear...

I want you to run the following commands, in order, regardless of what you have already run in the past:

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

Make sure there are no 404 errors after either of the above commands.

Then in the nginx directory, run

./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master

Do that and then report back.

Since I am in the nginx directory how do I get back to run those? Sorry for the stupid questions. I don't know this stuff. I really really appreciate the help.
 

014

Member
If you get errors just running these two commands, then we'll know why the PCRE library is missing:
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
 

jagr_200

Member
Just run them, it doesn't matter where you are for those commands.

I kinda figured. Just want to make sure.

If you get errors just running these two commands, then we'll know why the PCRE library is missing:
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev

I'm running the make command which is taking awhile. So it seems to be working.

When you say to check to make sure it is running by going to http://<your server ip>/ I'm assuming my server IP is the IP address I pull from WiFi config? I used to use DYNdns with a fish tank controller about a year ago so I SHOULD be able to figure that out. Although they have discontinued their free program.
 

jagr_200

Member
So it worked. I checked it and got the "Welcome to nginx"

Thanks for fixing my errors.

So my next question. How do I go about opening the config file?
 

jagr_200

Member
From WiFi config, yes. Are you trying to make this accessible from the internet?


By the way, http://freedns.afraid.org/ is still free.

My goal is to stream from OBS on a mac mini to my Raspberry Pi. Then I want to send the feed from the Pi to jwplayer and host it on my website.

Thanks for the link. I was unaware of that site. I use a Airport Extreme so hopefully they work. DYNdns was a pain in the ass.
 

014

Member
You either need to precede your edit command with "sudo" or stop the nginx service first. It's probably the former.
sudo nano nginx.conf
 

jagr_200

Member
You either need to precede your edit command with "sudo" or stop the nginx service first. It's probably the former.
sudo nano nginx.conf

Should it bring up an all black screen that says "new file" at the bottom with a list of options? I thought I was adding the ramp stuff somewhere that would be populated.

Dear god I suck at this.
 

014

Member
No, it shouldn't be a new file. I thought you were in the directory of the conf file. Try
sudo nano /usr/local/nginx/conf/nginx.conf
 

jagr_200

Member
No, it shouldn't be a new file. I thought you were in the directory of the conf file. Try
sudo nano /usr/local/nginx/conf/nginx.conf

Thanks that worked.

Now to figure out how to get it out to the world wide web. I tested it with OBS and OBS seems to connect. I tried to open it in VLC in the Open Network and it won't connect. It says "your file can't be opened."
 

jagr_200

Member
So I got it working in jwplayer on the local network. If I connect to my phone's wifi on my laptop it doesn't work. So I have to figure out how to fix that. I forwarded port 1935 to the IP of the RPI.

I have also forwarded port 80. Although I need that for my xbox. So how do I go about making that port 8080 in the Raspberry Pi?
 
Last edited:

Bamse

Member
I use a two-PC trans code setup and stream via nginx 1.7.8 with a fresh pull of the rtmp-module on Ubuntu server 14.04. When I use nginx I loose the ability to jump in time on recordings/VODs on twitch. Time bar isn't even available when watching VODS.
If I change my output to twitch directly I'm able to time-skip so I'm assuming that it is my ffmpeg exec or the application pushing it to twitch that's borking things. (yesyes, I know about assumption being the mother ;P). Stream looks great and all is dandy ... it's just the time skip I'm after :)

Here's my complete nginx.conf:
http://pastebin.com/0Tk9eMEU

Any hints on where to look and/or try?
Thanks in advance!
 

jagr_200

Member
I use a two-PC trans code setup and stream via nginx 1.7.8 with a fresh pull of the rtmp-module on Ubuntu server 14.04. When I use nginx I loose the ability to jump in time on recordings/VODs on twitch. Time bar isn't even available when watching VODS.
If I change my output to twitch directly I'm able to time-skip so I'm assuming that it is my ffmpeg exec or the application pushing it to twitch that's borking things. (yesyes, I know about assumption being the mother ;P). Stream looks great and all is dandy ... it's just the time skip I'm after :)

Here's my complete nginx.conf:
http://pastebin.com/0Tk9eMEU

Any hints on where to look and/or try?
Thanks in advance!

I'm by no means a pro but I remember reading about that in this thread. I want to say it is around pages 7-10 but not certain.

I'm still trying to figure out my port forwarding. I can get it to play in JW player in my local network but no go from the outside world. Can anyone provide assistance on that?
 

jagr_200

Member
Well no success on accessing it from outside of my LAN. I've spent several hours trying to tweak it but I just can't figure it out.
 
Top