How to set up your own private RTMP server using nginx

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

nginx win32 is virtually unusable in my limited experience. The stream lags every few seconds. hls is more reliable, but still pauses every so often.

Laptop obs -> desktop nginx - > desktop obs video - > twitch

The lag occurs at Laptop obs - > desktop nginx - > vlc

vlc complains about audio and timestamps and such.

Laptop OBS reports 0 frames dropped.

edit: using amd vce...

edit: network card reset on the desktop and now hls is smooth. boggle.
 
Last edited:

york

New Member
In general you can use whatever key you want, you need to know it to watch the stream though. Unless you add some security to your nginx server, anyone can stream to it with any streamkey.

You would need to add an exec function that starts ffmpeg to your nginx config. That converts the incoming stream to the mentioned 2500kbit and can send it to Twitch.
thnx for your help jack0r i already do that, buy my laptop cant handle too much bitrate any advices?
 

Yubo

New Member
In general you can use whatever key you want, you need to know it to watch the stream though. Unless you add some security to your nginx server, anyone can stream to it with any streamkey.

You would need to add an exec function that starts ffmpeg to your nginx config. That converts the incoming stream to the mentioned 2500kbit and can send it to Twitch.

when, how i can change this? And how to generate auto like twitch ?
 

matax91

New Member
You say you use Linode. How much do you pay roughly for the Linode hosting? Do you use the hourly hosting, if so for how many hours do you run the server and how much do you get charged for? I'm looking at both Linode and Digital Ocean for their hourly pricing but I'm not really sure how that pricing works out, how do they break down the price and how would I be able to figure out how much it would be?
 

Lefty Guns

New Member
I followed the guide. I used the latest version of NGIX. It's streaming correctly however, my frames drop significantly on my gaming pc. Also, how do I save the stream and keep the recording automatically on my rtmp server? also how do i access those recordings and where are they saved? I would like them as flv files or mp4. either one.
 

GillyMoMo

Member
I followed the guide. I used the latest version of NGIX. It's streaming correctly however, my frames drop significantly on my gaming pc. Also, how do I save the stream and keep the recording automatically on my rtmp server? also how do i access those recordings and where are they saved? I would like them as flv files or mp4. either one.

Are you using the VM? And you are running OBS on your PC correct? You are more than likely dropping frames due to CPU usage or something to that fashion. OBS by default uses flv when sending the stream out also. If you are using the VM the best thing to do is create a Samba share to the folder where you want the recordings to go, so that you can access those files for editing ect.
 

AGSPhoenix

New Member
As a few others have noted, this article needs to have the Windows binary links updated. The most recent version does not offer RTMP streaming for free; the last version to do so is 1.7.12.1, at this link.
 

GillyMoMo

Member
As a few others have noted, this article needs to have the Windows binary links updated. The most recent version does not offer RTMP streaming for free; the last version to do so is 1.7.12.1, at this link.

This would be why I redid the linux VM with a windows share. You don't need much to run the VM at all.
 

dodgepong

Administrator
Community Helper
I changed the link a while ago to just link to the list of Windows binary versions.

That said, I don't recommend Windows for this. I included it because people wouldn't stop asking for them.
 

GillyMoMo

Member
I changed the link a while ago to just link to the list of Windows binary versions.

That said, I don't recommend Windows for this. I included it because people wouldn't stop asking for them.


Yes nginx lacks quite a few features and just seems wonky in Windows vs Linux. I can try my best to keep this updated on the Linux side if need be. The one I have uploaded has a Windows share built in to make it easier to edit the nginx.conf file. Most everyone is running Windows 8 and up and it has Hyper-V as an option to install and can run quietly with almost no resources being used (esp if one isn't transcoding). Or they can install virtualbox or something to that fashion.
 

nvmlulz

New Member
Hey guys, kinda new here. I've been searching everywhere for this.. maybe i'm not using the right terms\keywords..

I set up a small RTMP server for a school project. It's only Live Streaming (just like Twitch)

What I want to do is like Twitch front page, I would like to feature a random "streamer" on the front page, who's currently online and streaming (live). Is there a way to fetch who's online currently streaming (live) or something like that?

Thanks
 

grester

New Member
Hey guys, kinda new here. I've been searching everywhere for this.. maybe i'm not using the right terms\keywords..

I set up a small RTMP server for a school project. It's only Live Streaming (just like Twitch)

What I want to do is like Twitch front page, I would like to feature a random "streamer" on the front page, who's currently online and streaming (live). Is there a way to fetch who's online currently streaming (live) or something like that?

Thanks
This forum is dedicated to provide support for OBS not nginx/RTMP. I'd say you're better off googling a little bit more somewhere else. I don't think many people here are nginx/rtmp experts to help you on quite a specific question. Search on the nginx git for possible protocols or commands that could scan active sessions on a server. https://github.com/arut/nginx-rtmp-module/wiki/Directives
 

GillyMoMo

Member
Actually I have a solution for what he is looking for. It doesn't pretain to nginx directly, but it does involve it. Jwplay is the key tool here. When I am not mobile, I will explain that in further detail.
 

DexS

New Member
hi thanks for the tutorial.. how to secure this streams? my stream key are open to all anyone can grab my streaming. i need to fix this :(
 

Sapiens

Forum Moderator
@designgears Looks like it's still free for non-commercial use and they provide working download links on their front page.

Edit: Apparently the downloadable versions don't include the RTMP module any more. Bummer. :(
 
Last edited:

designgears

New Member
@designgears Looks like it's still free for non-commercial use and they provide working download links on their front page.

Edit: Apparently the downloadable versions don't include the RTMP module any more. Bummer. :(

Yup, the last version to include RTMP was 1.7.x.x, at 1.9.x.x it became part of their commercial product. 1.7.x.x does work, but playback via VLC/JW Player would freeze after a few minutes and when pushing to twitch would cause stutters and artifacting when playing on twitch. The github version solved all of those issues and is using the latest stable code from nginx and rtmp module.
 
Top