Some general questions to those that may know...

TIMORLANG

Member
So, was wondering how bad is OBS using just the CPU to render?

I have a situation where the main GPU (2080ti) is powering a screen.

I run OBS on that machine and do a game capture and full screen preview it on U202 Video Capture device (similar to Camlink or similar).

I used to use the second port on the NVidia card and I used to mirror my display w/ the Video Capture device; but that was problemetic which is why I moved to using OBS install on box and using screen capture and full screen preview on the video capture cars.

So, here is the questions:
1. Would it make sense and free up resources on the Nvidia if I put the video capture on the i9 iGPU?
2. Would it also make sense to use CPU to render rather than the dGPU?

And could this set up possibly make mirroring the main screen on the nvidia card to the igpu video capture be workable? When I did with both the main monitor and video capture device; I got very weird tearing issues.

Let me know if any of this even makes sense?

Wanting to know best set ups? I do have 2 machines and one is obviously doing all the recording connected to the video capture card and other sources.
 

cyclemat

Active Member
Why you use a capture card did you have a dual PC setup?

Use the igpu is Not good so He renders twice and the igpu didnt have the Power

The nvenc encoding need smal resources of the nvidia so why you didnt use nvenc and Grab the pictures direct from the card without any Video capture device?
 

TIMORLANG

Member
Yes, this is a 2-machine set up. The one PC which has the video capture device on it, also has my audio interface, additional resources like videos, music, etc. So, that is why I am using the capture card.

Originally, I didn't want to do a passthrough via the capture device is only HDMI and my main PC is using HD Port. Was going to opt for a monitor like those from Benq which have an additional port on the back which output the signal for a capture card / recorder; but didn't really want to spend the money on a monitor that I really didn't need.

When I use mirroring (my main screen w/ the capture device), this causes several issues. Among them the inability to use HDR as well as sometimes noticeable picture tearing on the capture device.

Eventually, I hope to actually have something like the PCIe Elgato Capture Card; but currently only able to use USB3.0 devices as the OBS Studio machine is a laptop at this time.

The iGPU rendering twice makes sense. I guess the dGPU renders once and just sends out two different ports. I was not sure if the dGPU also had to render the image separately for each port. That is part of where the questions come from; to get a better understanding on how the image is rendered on the different ports.

Currently I am not using the iGPU except for a second monitor that I use for things like Voicemeeter control panel and such.

Thanks for the response, it is giving me a better understanding of the rendering path which I though was as you say; but was not sure.

T
 

cyclemat

Active Member
then the main display has 160hz and the 2nd display has only 60 hz he must render the picture twotimes did you have test NDI i uses NDI for my setup and it works great !
 

TIMORLANG

Member
Yes, that is the issue. The main display is actually even higher than 160 and the video capture device is 60. You are correct and in there lies the problem; besides HDR stuff.

So, I may have come across NDI. I see that it is some sort of plugin extension for OBS.

Can you explain further how it works and what I would need to make it work well with the 2 PC setup?

Thanks,
T
 

koala

Active Member
You seem to have a misunderstanding of what uses up resources and what doesn't. And what configuration makes a bottleneck and what doesn't.
I don't yet understand what final goal you want to achieve. It seems to me while trying to reach your goal, you built a complex setup that made you trying to fix issues that arose due to that setup, instead of fixing issues that prevented you from directly reaching your goal in the first place with a simple setup.

If you mirror an output with Windows, both outputs get the least common denominator. That means, whatever refresh rate is supported by the outputs, the mirrored output gets the lower one. Whatever resolution both outputs support, you can only use one both support. If only one supports hdr, you cannot use hdr. (by the way: OBS doesn't support hdr yet)

Then you need to know how OBS works in general. It is a compositor, that means it uses a (hidden) frame buffer on one GPU and composites (overlays, scales, filters) all your sources into one final picture. It does this even if you're using only one source. For output to stream or recording, the raw data of this OBS frame buffer is given to the encoder, and the encoder outputs the encoded frame to the stream or the recorded video file.

Now there is the capture method. Game capture or display capture is a method to directly read the frame buffer of the app. If the frame buffer of the game (or the frame buffer of the monitor) is on the same GPU as the hidden OBS frame buffer, it's a very fast simple memory to memory data copy to get the data into OBS.

But if you use a capture device, this data must be read from the capture device through a data bus. USB or pci-express. It's using a resource intensive and slow Windows API. After reading it through this API, it has to be copied from CPU memory space into GPU memory space for compositing. This is way more resource intensive than just game capture or display capture.

Finally, the encoder. On Nvidia GPUs, there is the Nvenc encoder with the exclusive feature that it's possible to directly feed it with the hidden frame buffer of OBS. After encoding, the small encoded frames need to be copied from GPU memory space to CPU memory space, and from there they will be actually output to stream or file.

All other encoders work from CPU memory space. If you use a different encoder, i. e. x264 or Quicksync, the raw video data has to be copied from GPU space (from the OBS frame buffer) to CPU memory space, fed into the encoding API, which in turn uploads it again into GPU space for encoding if it is Quicksync. This is somewhat resource intensive. It's also required for Nvenc, if the OBS frame buffer is not on the same GPU as the encoder.

So the least resource intensive solution is to run all on the same Nvidia GPU: OBS (to make the OBS frame buffer exist on the Nvidia GPU), capture from the Nvidia GPU (to make the game/app/display frame buffer exist in the same GPU memory space as the OBS frame buffer), encode with Nvenc (to enable the zero copy feature of Nvenc, that requires the OBS frame buffer exist on the same GPU memory space as the encoder). No capture device, no iGPU usage. Using Nvenc also doesn't put any stress on the Nvidia GPU itself, because Nvenc is a dedicated circuit on the GPU. It doesn't use up GPU computing resources.

Use a capture device only for external devices such as consoles to avoid the high resource cost of a capture device.

Run OBS on the same GPU as your game to avoid OBS needing to copy the huge video data from one GPU to the other (that's expensive!)

Don't use the monitor mirror feature of Windows. It prevents the usage of advanced monitor properties and creates performance bottlenecks, if it comes to gaming or capturing. Especially if monitors are mirrored that reside on different devices such as different GPUs, because Windows has to copy video data from one GPU memory space to the other. That's not free at all in terms of resource usage.

If you connected a monitor to your iGPU, disconnect it and connect it to your Nvidia GPU instead. Ignore the existence of the iGPU. This way, all frame buffers reside within the Nvidia GPU, which tremendously helps OBS compositing in terms of resource usage.
 
Last edited:

TIMORLANG

Member
Great, thank you very much. This is sort of exactly what I am looking for. Now let me explain the reason for the complex set up. The reason I am using a video encoder on an external machine that is running OBS and is recording or streaming is to allow for easily controlling obs and other sources while live. This helps me to easily use the second machine for everything else, including any chat / discord / voice / extra sources for different screens and so on. It is just way easier from a control point of view.

I have stopped using mirroring for exactly the reasons you stated. Although, when I was using mirroring; I was able to run the main monitor at a different framerate than the mirrored video capture device. It was simple enough to set under advanced monitor settings in Windows and worked fine. But one of the main issues was the inability of using HDR on my main monitor as that feature was disabled while mirroring. And of course, some tearing (not horrible) did occur on the mirror port.

For the most part my iGPU was disabled or used for a second monitor which is not involved in any sources or data to OBS or final video / stream.

What I was looking for was a detailed explanation as the one you just shared to help me understand the path of rendering and what is performed where. I really thank you for that as it helps me out greatly.

My current set up seems to be the most effective if I understand everything right. That set up is simply 2 machines. One machine runs OBS and has all sources (audio and video) except for those run on the main machine which is usually game audio and game.

The audio set up between both machines is pretty easy. It is the video that I am trying to get as effective as possible. And I push the video from the gaming machine to the video capture device using the Nvidia card. I was just wondering if it would be more effective to use the iGPU.

I also understand that the easiest setup would be to just use one machine and run OBS on the same machine and be pretty much done with it; however, I feel like the 2-machine set up allows me to control things much more easily as well as allows me to view my content in HDR if I want and stream it normally; which I am unsure if that is possible with direct frame capture or not.

Anyway, thank you very much for your response. It really helps me better understand the functionality of OBS which is what I was hoping to learn.

Cheers,
T
 

koala

Active Member
The reason I am using a video encoder on an external machine that is running OBS and is recording or streaming is to allow for easily controlling obs and other sources while live.
To achieve this, use a second monitor with your gaming PC and place OBS on that monitor. For seamless switching, run your game in windowed fullscreen mode, not in true fullscreen mode.
Using only 1 PC also means only 1 mouse and 1 keyboard on the table.

Be aware that playing a game with maximum best local settings isn't the same as playing the game while streaming. There is always some constraint if you're capturing and streaming in addition to just gaming. There is always some compromise to make.
 

TIMORLANG

Member
Great, thank you very much for the info. One last question; using game capture is better than using display capture? Is that correct?
 

TIMORLANG

Member
Great, I generally use Voicemeeter for the audio portion to keep all that split up and controllable via PC Panel devices. Seems to work well.

T
 
Top