Question / Help OBS Studio using GPU when using x264 to record.

FleebusMcGee

New Member
Hello,

I am wondering why OBS Studio is having around 30% GPU usage when using x264 to record. I know that when using x264, it is using the CPU for encoding, not the GPU. Does anyone know why this could be happening?

I don't remeber this ever happening before.

System Specs:
CPU: Ryzen Threadripper 2950x overclocked 4ghz
GPU: GTX 1070 overclocked 2100mhz
Ram: 64GB 2400 DDR4
Windows 10
Storage being recorded on: 550mb/s SSD
 
From what I've read here, that's because OBS Studio has to render the image ("put togheter all the sources layers and combine visible of it"), it has to create the image, and it does that work in the GPU.

After that, that created image (at the framerate you've set) is what is sent to the encoder (CPU if you have set x264 encoder).
 

carlmmii

Active Member
No.

CPUs are general purpose computational machines. They can do a lot of complex things with intricate programming, and have a lot of flexibility. They've even gotten more advanced where you can have multiple parallel threads going on at the same time to help.

Image processing is quite within the realm of a CPU to handle on a small scale. If you're just talking about simple compositing, you could probably get away with it no problem. But this eats up a lot of CPU resources... and when you're asking it to do it 60 times a second, *before* it's sent to the encoder, and aside from whatever game you're asking it to run, then that becomes a huge problem.

Compare that to a GPU. It is literally designed to handle mammoth amounts of parallel instructions, all revolving around image manipulation. This is what a GPU does, and it does it a lot more efficiently than a CPU can.

The GPU also has the advantage of being closer to where the actual image data is stored. The less information that needs to be transferred along the PCIe bus, the lower the latency for rendering time.

If you're having GPU usage up to 60% that might be a result of your GPU just being in a lower power state... or you're actually asking OBS to composite a fairly complex scene.
 

Kheldartv

New Member
thanks for this more than complete answer. I'll look at the reduced power supply side (even if I don't know where to see and modify it).
 

BK-Morpheus

Active Member
What carlmmii meant by pointing out, that high GPU load percentages for OBS on idle can simply come from the GPU not clocking into 3D mode.
Example:
Only OBS is opened and the GPU is running in 2D idle mode with less then 500MHz clockspeed, which might result in a high percentage of GPU load from OBS (let's say 40%).
Then you start a game and the GPU clock boosts up to 1800MHz or more and the same amount of OBS GPU load will now result in a much lower percentage (maybe 2-9%).
This has nothing to do with the power supply, it's just the way modern graphics cards work with their variable clock speeds.
 

Kheldartv

New Member
ok I understand better. On the other hand my computer is only used for streaming, nothing else that runs at the same time (stream in dual pc) how to do to put it in 3D all the time?

thank you for your help
 

BK-Morpheus

Active Member
Then you don't need to do anything. If the GPU load of OBS gets high enough, the GPU will increase the clockspeed.
Maybe just check the GPU clockspeed and load percentage in GPU-Z before and after running OBS.
It's also possible that there are some problems in the scene collection, that causes a high GPU load (browser sources, multiple video files etc.).
 
Top