Question / Help OBS disconnecting to nginx server at higher bitrate than 30k

Pasimega

New Member
Question just as said above.

I have an nginx server set up on my streaming pc to which I stream with my gaming pc.
Since I do want to have a good quality to encode on my streaming pc I want to stream with a 50k bitrate and 60fps.
The high bitrate is also wanted because I want to reduce the load on my gaming pc which gets less with a higher bitrate.

The problem here is that as soon as I start streaming to the nginx server my obs disconnects the connection, reconnects and as soon as it's reconnected it disconnects again (infinite loop).
The whole setup is working since I tested everything with a 30k bitrate.

For connecting my 2 computer I have a network card in each computer and it connected with an ethernet cable.

EDIT:
The problem appeared to be the resolution on my gaming pc. I had a resolution of 2540x1440 and my streaming pc just has 1920x1080 and that seemed to cause problems.
I just downscale it to 1920x1080 on my gaming pc before sending it to the nginx server.
I tried streaming with this now and it worked fine.
 
Last edited:

ShadWolf

New Member
It would sound like there's too much network load for it to process 50k bitrate at 60FPS.

So help me understand here… as I read it, you have 2 different machines, 1 for streaming and the other for gaming, and you're capturing footage from one PC to the other into OBS on your streaming PC setup. Presuming you got plenty Ethernet ports on both PC's, you are connected to the nginx server with a direct connection through Ethernet connection. You would have to of set one of those Ethernet connections as Local Link on both machines so they may communicate with each other, and providing you have also specified certain ports as well in the firewall on both PC's to be the same so they can communicate.

You would also need to of setup and configured RTMP on your nginx server properly. See: [ How to setup your own private RTMP server using nginx ] in OBS you'll need to have your server IP entered correctly, and check the box for Use authentication and enter the login for your nginx server there.

In your Linux network preferences like I said before you'll need to set one of the connections you use to connect directly to your streaming server over RTMP to set one of your Ethernet connections to Local-Link Only, and then specify the IP addresses of that nginx server, or just use Automatic setup, either should work. If you use any other security protocols for connecting to your nginx server, ie; 802.1x enter those in the Security tab too.

In OBS check that your using [ CRF ] instead of CBR if using the x264 encoder, the lower the number the better the quality 0 = Lossless, 51 = Worst, and use Ultrafast with Profile on Main or High, depending on your preference or whatever your computer can handle. I think these settings will also affect the connection since the CPU will have a lot to deal with.
 

shplack

New Member
I found that using max_message 60M; in the server code block alleviated my streaming woes. I am also offloading the streaming workload to a secondary PC which also is connected to a FHD monitor. The resolution has nothing to do with the bitrate. So, I find it strange that has fixed your problem. My problem was that NGINX sets the maximum data input to 1Mbs as default. Using max_message fixed that.
 

Narcogen

Active Member
This should probably be done with NDI now rather than NGINX and RTMP. That still has its uses, of course, but NDI would be a lot easier to use for this particular purpose-- getting footage from one PC to another for streaming to another destination.
 
Top