Three simultaneous OBS streams / recordings on single box – headroom room for 2x more

(Note to Moderator – how can I get this moved to the Guides section?)

I have a fairly bespoke OBS use case I would like to share the recipe for. I am the tech guy for our local youth baseball league. I installed three field cameras (PTZoptics ZCAMs) housed in Dotworkz enclosures. I even have audio from these microphones / enclosures piped in. Goal is to add three or four more in the coming months. The cameras are intended to stream 24x7x365.

The PTZoptics cameras will internally stream live to an RTMP endpoint (YouTube in our case) but I wanted the ability to add overlays in order to place our league logo and sell advertising space (like hanging a sponsor sign on the fence – just digital here). I also wanted to add cool widgets like current time, weather, etc. Lastly I needed an easy way to save the streams when we are playing games so they can be archived on the YouTube channel we have for each field / camera. Everything needed to run on a single headless box housed above our snack bar needing zero human intervention (at least during the season).

The solution was obviously OBS but what how in the world would I be able to muster enough horsepower (on the cheap) in a single box and schedule discreet events like recording, placing “rain delay overlays” when needed, and easily cycling sponsor logos on a pre-set schedule? Each of the streams is 6,500mbps 30fps.

As soon as I found these command line settings (--portable --startstreaming --minimize-to-tray) I knew I had a chance to pull this off. I simply created three folders with the OBS files with shortcuts in the startup folder (w/auto login enabled) to each. First problem solved.

Next hurdle was CPU & GPU. NVENC encoding is required here but the consumer gaming cards are locked at 2x max so if I am streaming and recording using the GPU that would only suffice for a single field / camera. The key was to go with an Nvidia P4000 I picked up on Ebay brand new for $350. Its completely unlocked and has the same encoder chip as any Pascal vintage card. With three separate streams going + recording each at the same time I am only maxing at about 42% GPU. From a CPU standpoint I just recycled a five year old Dell PC with a four core i7-4770 w/16GB RAM (4.7gb used w/three streams so far). CPU is about 40%. I have NVENC encoding settings tweaked / set to the absolute highest quality just because I can. I feel like I have plenty of headroom for four more cameras for a total of 7.

Lastly I needed a way to schedule things remotely so I never needed to touch the box once configured. For this I used the awesome OBS websockets plugin and accompanying Windows command line exe. Super simple now to schedule batch files that stop / start recordings, change overlays, anything I want to do within OBS. Since I have multiple instances on the same box I just assign a different port for each concurrent OBS instance. The Windows scheduler is too complicated so I a am using this much better / free alternative.

So that’s about it. Everything is running great. All of the cameras stream 24x7 to YouTube and I schedule the streams to be recorded when I have games so I can then upload to playlists. I have my OBS headless server running above the snack bar which I have setup for remote RDP access when I need to jump in for anything (almost never). Lots of headroom for more cameras up to probably 7 but can probably get 8 or 9 if I lower the encoder quality a bit.

If anyone wants to take a look at the cameras / fields here are the three YouTube channels (one for each).

http://swift1.piedmontbaseball.com/ (Zcam)

http://swift2.piedmontbaseball.com/ (Zcam G2)

http://doylefield.piedmontbaseball.com/ (Zcam G2)

Domenic
 

koala

Active Member
(Note to Moderator – how can I get this moved to the Guides section?)
I'm not a moderator, but this part is easy: To create a guide in the Resources section of the forum, go to the Resources section of the forum and click the "Add resource..." link in the topper right corner. You choose the category and then you enter the text.

But before you do this, please consider rewriting your text. A guide isn't talking about how your local system looks like and how you find your way to the solution of your issue and from where you bought and scraped hardware. A guide simply explains how to do something, and the best guide is independent from any hardware and any individual situation except the hardware you are explicitly making the guide for (in your case: streaming multiple surveillance cameras 24x7).
Imagine someone reads your guide 5 years in the future. Write the guide in a way it is still applicable. Cards with nvenc will be available at that time for sure, but the exact model is completely irrelevant, as well as from where to buy.

Also consider making lists instead of injecting links to resources into your lengthy text. You created a wall of text nobody will read. Make bullet point or numbered lists:

You need:
  • this
  • that
  • optionally this
Then you do:
  1. get stuff
  2. connect stuff
  3. install software
  4. configure something
  5. the result will be: this

This way you structure your guide and it's immediately clear what you are talking about.
Finally, don't link to individual shop pages to illustrate what you're talking about. These links will be obsolete after a few weeks or months - as soon as a new hardware generation is rolling out. Describe stuff, but don't link stuff that's going to disappear soon.
 
Top