Multiple istances and one graphic card (nvenc)

Barabba

Member
Hi mates, I need to produce 3 mosaics (1920x1080) from 27 videocameras substreams (640x360), 3x3 cameras for each mosaic, as I now there are Nvidia Cards that supports up to 9 encoding process for fullHD (25fps) with nvenc, do you think is possible to run different istances and use the same card for encoding? I suppose it's a quistion involving ffmpeg features.
Thank you for your kind advices
 

Barabba

Member
Hi, thanks for your kind answer.
There is a particular reson, I need to follow people on different rooms where they move, I need to record it, I will converting OBS output to RTSP and capture it to the videosurveillance program, as it is a camera.
WIth classical solutions of any surveillance software I can't fulfill this request, please believe me.
I don't understand completely your post, can you help me describe what is " make one big canvas"? Consider I have 9 mp4 rtsp streams of 640x360, maybe some containing audio too. I don't believe there is a way to get their encoded video and simply chain one ofhter the other. We need to decompress them, build up the mosaic and encode it again.

Can you please tell me more about nvenc with separate processes? " you can find cards 10k up" doesn't tell me mouch, I don't understand what it means. Thank you a lot
 

DayGeckoArt

Member
I wouldn't do this as your main capture method... OBS isn't as reliable as real security camera software. Plus with security software you can record the direct streams without re-encoding. I use Blue Iris
 

Barabba

Member
Mates, please don't get me wrong!
I need OBS to produce only rtsp stream! No need to record it, I'll use a professional software to record the rtsp stream from OBS as it is a camera. No need to be professional! It's not a crucial thing. I'm always recording each main stream of each camera!
This thing is only useful to me to easly follow people, instead of open each camera to see were the person is moving to next camera, and the next camera to see where he moves to the next camera too, etc.etc. Takes hours.

Let's please be technical, thank you.

I need to know if I can use multiple istances of OBS and use nvenc of the same video card, precisely the questions are:
1) When one istance of OBS is running and use nvenc to compress th output video, does it takes all nvec "busy"? Can another OBS use the same videocard?
2) If the above is possible it's getting interesting for me, because I'm not going to buy a 10 core server etc.etc. You maybe kindly suggest a reasonable way, for example a card that supports 4 nvenc at FullHD 25fps, I have 2 servers and I can balance the load.

Thank you a lot for your kind help
 

Barabba

Member
I say it again no consumer card can output 3 1080p streams At the same time what you can Do buy 3 and use the use gpu function
Ok, maybe there are particular cards that just encode to mp4? I don't have forcely to buy a video card..
But the first question, the most important is this:
1) When one istance of OBS is running and use nvenc to compress th output video, does it takes all nvec "busy"? Can another OBS use the same videocard?
 

koala

Active Member
Nvidia consumer GPUs allow 3 concurrent nvenc sessions system global. Doesn't matter if these sessions are all used up by one process or by different processes. And to answer your next question, what if you use multiple cards, will you get 3 sessions for each: I don't know.
 

Barabba

Member
Ok, let's suppose I will be enough for me to use 3 streams only, practically, it's enough to start 3 OBS istances and tell each OBS to encode nvenc? Will everything be automatic? Or should I tell OBS which nvenc should be used? (or other options).
Also, does it mean if I start the 4th OBS will I get an encoding error?
Another important question, to start OBS with separate processes, and different scenes, should I install OBS in 3 different paths or is enough to start obs with arguments to load a particular scenes file?
Thank you for kind solutions
 

Barabba

Member
I've checked around, seems only Matrox is building cards with encoder, that can be addressed by the CPU, a sort of nvenc but I have no idea how it works and if OBS can support it. What I know is that it's expensive.
I got an idea, Dahua NVR does support channel zero and they can stream it by rtsp, it's low quality but can be something to think about.
Please let's keep on topic about use nvenc, but if someone has another idea.. it's welcome to evaluate ) thanks
 

DayGeckoArt

Member
In my recording computer I have a Quadro T400 which was $120 and now sells for $140. It also has 3 Displayport outputs. I would just buy that, plug in 3 monitors, and try recording all of them. If you need another card, you can buy another T400 and it should let you encode separately in addition to the main card
 

Tomasz Góral

Active Member
Hmm i have question Barabba, you asking about - play 27 stream in 3 group 3x3 ?
- source stream in 640x360, 27 - is not problem to decode for many CPU.
- If you need save 3 stream from 3 running OBS is not problem, few years ago nVidia put some regulation for consumers card only 2 stream parralel, now change to 3 stream parralel. Profesional card from nVidia can to 32 stream encode, but some one found information in driver 3 or 32 encoding is blocking by only driver software. You can found patch to enabling 32 encoder.

My self run 3 OBS and stream 3 diffrent stream in 1080p25 CBR 6500kbits, on GTX 1050Ti <65% usage.
But i don't have security cam, i use only 3 cam with grabbers 1080p50.
 

Barabba

Member
Thank you dear mates, this is really precious infos.
Yes 3x3 mosaic with poor 640x360 0,2mpx stream input, no problem for decode.
GTX 1050Ti has really good price, if you tell me it can be ulocked to more streams than I can get some hopes about testing it. I can eventually reduce encoding resolution.
Please tell me your opionion, considering I'll use this card only on a server (I'll never use it for gaming) just for nvenc, does it works the same as superior models? 1650, 1060, 1070? Which one you recomend me? Is it important the amount of RAM on the graphic card for my usage? Thanks

Now another question, at this time I'm using obs-rtspserver: RTSP server plugin for obs-studio, once enabled and once client connected it starts encode with nvenc. You mention about 3 mnitors and capture screen, can I do without that? I don't have 3 monitors.. and maybe I would like to take advance of unlock nvenc to add streams.
And I still don't know how can I start automatically different istances of OBS running different scenes. Shuld I install OBS in 3 different paths? This can solve eventually problem with the rtsp server plugin settings (need to open 3 different TCP ports). But OBS user folder is always located on the user path... How can I diversify it?
 

Tomasz Góral

Active Member
Run OBS in portable mode, 3 diffrent folder. Download OBS as ZIP file and 3 times unzip to diffrent folder. Add file 'portable_mode.txt' in main folder, empty file.

10X0 and 1650 (first version) have the same chipset NVENC
1650Ti and 20X0 has better NVENC

RAM on the graphic card in this case does matter.

I use only one monitor.

Maximum effinency in 1080p for 1050 is 170-200 fps. I check in Handbrake.
I got GTX 1050, 1060, 1660 in PC and two RTX 2060 in laptops.

Look on https://github.com/jantenhove/NvencSessionLimitBump
 

DayGeckoArt

Member
Thank you dear mates, this is really precious infos.
Yes 3x3 mosaic with poor 640x360 0,2mpx stream input, no problem for decode.
GTX 1050Ti has really good price, if you tell me it can be ulocked to more streams than I can get some hopes about testing it. I can eventually reduce encoding resolution.
Please tell me your opionion, considering I'll use this card only on a server (I'll never use it for gaming) just for nvenc, does it works the same as superior models? 1650, 1060, 1070? Which one you recomend me? Is it important the amount of RAM on the graphic card for my usage? Thanks

Now another question, at this time I'm using obs-rtspserver: RTSP server plugin for obs-studio, once enabled and once client connected it starts encode with nvenc. You mention about 3 mnitors and capture screen, can I do without that? I don't have 3 monitors.. and maybe I would like to take advance of unlock nvenc to add streams.
And I still don't know how can I start automatically different istances of OBS running different scenes. Shuld I install OBS in 3 different paths? This can solve eventually problem with the rtsp server plugin settings (need to open 3 different TCP ports). But OBS user folder is always located on the user path... How can I diversify it?

I would get the T400 I posted about above, vs a gaming card. It's less than half the price and has a much newer Nvenc chip!

You can encode without the screens if you can get RTSP streams into OBS. I have no idea how to do that or if it's possible
 

Tomasz Góral

Active Member
I would get the T400 I posted about above, vs a gaming card. It's less than half the price and has a much newer Nvenc chip!
Yes T400 is cheap, but only 64bit bus, only 80 GBitS speed, NVENC on Turing 5gen.
GTX 1650 128bit bus, 128 GBitS NVENC on Turing 5gen. (it's only e.g. chipset used in this model T117 same as T400, T106, T116)
GTX 1660 128bit bus, 192 GBitS NVENC on Turing 6gen. (chipset T116)
 

DayGeckoArt

Member
Yes T400 is cheap, but only 64bit bus, only 80 GBitS speed, NVENC on Turing 5gen.
GTX 1650 128bit bus, 128 GBitS NVENC on Turing 5gen. (it's only e.g. chipset used in this model T117 same as T400, T106, T116)
GTX 1660 128bit bus, 192 GBitS NVENC on Turing 6gen. (chipset T116)

the memory bus speed doesn't matter for recording, he's not going to game with it. Plus the T400 is low profile and includes both brackets, so if the server is a slim case it would still fit
 

Barabba

Member
Mates these are really precious infos!! I love you! <3 thanks! :D
Seems T400 is best choice for this, not expensive at all, 64bit I don't think are limiting nvenc, 2GB RAM will be enough? here https://github.com/keylase/nvidia-patch/tree/master/win seems possible to unlock T400 drivers on Windows! How many streams 1080p 25fps you think I can manage with it? There is a way to measure the GPU consuption to establish how many? And.. it's recomended 350W power supply, you think that nvenc will use them? If it is a separate chip, I suppose much less.. can you please confirm it?

About the use of OBS, is the portable istance saving the user data into its folder? Instead of c:\users\user\appdata\roaming\OBS.. etc.etc.?
If yes all seams really possible!
 

DayGeckoArt

Member
Mates these are really precious infos!! I love you! <3 thanks! :D
Seems T400 is best choice for this, not expensive at all, 64bit I don't think are limiting nvenc, 2GB RAM will be enough? here https://github.com/keylase/nvidia-patch/tree/master/win seems possible to unlock T400 drivers on Windows! How many streams 1080p 25fps you think I can manage with it? There is a way to measure the GPU consuption to establish how many? And.. it's recomended 350W power supply, you think that nvenc will use them? If it is a separate chip, I suppose much less.. can you please confirm it?

About the use of OBS, is the portable istance saving the user data into its folder? Instead of c:\users\user\appdata\roaming\OBS.. etc.etc.?
If yes all seams really possible!

I record 4K with 444 color with mine and it works perfectly so as long as you're not exceeding the max # of encoding tasks it should be fine. Koala said 3 concurrent NVENC sessions above

You can monitor power usage with HWInfo64.

I just did an experiment. I recorded TV at 1080p60, encoded a video with FFMPEG, and used Streamlabs to record my screen at 4K 30. I dragged windows around to make the encoder work hard. It handled it fine. Nvenc usage was in the 90s.

So it can definitely handle 3 encodings at the same time, and it can handle much more resolution than you're talking about. You should be fine recording 3x 1080p at 30fps, but you could even drop down to 15fps to make it easier on the GPU.

The most power usage I saw was 32 watts. Every X16 PCIE port is supposed to be able to put out 75 watts but you might want to check the documentation for your computer and make sure it will be OK

NVENC_3rec.jpg
 
Last edited:
Top