Question / Help Offload GPU Encoding to non-primary GPU?

BioGenx2b

Member
Hey guys. I was wondering if there's a way to offload GPU encoding to a second GPU. Currently, I'm using an R9 290X and I added an R9 380 to test that. I was using the VCE branch and that requires me to select the encoding GPU from the Video menu, but a problem occurs there that I think the main build might experience with NVENC, so I wanted to ask.

Problems:

1. GPU Encoding only occurs when the GPU is selected under Video.
2. Game Capture only works when the GPU selected under Video is also rendering the game.

Is this a hard limitation or is there a way to work around this? Any plans regarding this?

Also, OBSMP doesn't make a difference here, same issue.
 

FerretBomb

Active Member
Not really. OBS does all scaling, compositing, and other operations in VRAM. Why it has problems with SLI/XFire setups, because they mangle VRAM usage. Only way I could think of would be to run OBS on the secondary (encoding) GPU, and use something like a capture card or DXtory to handle capturing gameplay.

That said, hardware encoding (QSV, NVENC, VCE) is significantly lower-quality than x264 and is mostly a band-aid to allow weaker machines to stream, or for locally recording at extremely high bitrates while minimizing system impact.
 

sam686

Member
1. GPU Encoding only occurs when the GPU is selected under Video.
2. Game Capture only works when the GPU selected under Video is also rendering the game.
1. I am not sure what you meant, but I can use intel quicksync encoder while using radeon graphics as OBS rendering.
2. Game capture uses shared GPU memory to speed up capture, which only works if both OBS and game is using the same graphics card.
 

FerretBomb

Active Member
The way OBS is coded, in short. If it was going to offload processing to a secondary GPU, it would have to pull the frames from VRAM and send it across the system bus, then place it into the secondary GPU's VRAM before continuing on with any scaling and/or compositing. A slower proposition at best, and could risk flooding the bus depending on rates and resolution.

Add to that that development on OBS Classic is pretty much halted aside from bugfixes, while the devs work on OBS-MP.

None of which changes the fact that hardware encoding is extremely poor quality anyway, and wouldn't really be worth the trouble as compared to telling the person to turn down the game's quality settings to compensate for the additional encoding load on the primary GPU, if they don't mind the quality loss to begin with.
Add on that you can get almost the same low impact for local recordings with CPU-based encoding by throwing a mountain of bitrate at it and using the Ultrafast preset.
https://obsproject.com/forum/threads/how-to-make-high-quality-local-recordings.12600/
 

BioGenx2b

Member
None of which changes the fact that hardware encoding is extremely poor quality anyway, and wouldn't really be worth the trouble as compared to telling the person to turn down the game's quality settings to compensate for the additional encoding load on the primary GPU, if they don't mind the quality loss to begin with.

http://www.twitch.tv/biogenx2b/v/30756912

That's a matter of opinion. It's not the best, sure, but GPU encoding is what enables me to stream at all given my budget.

The point is, please stop trying to sink home the quality issue, you've already made that point. It's irrelevant to the discussion here.

OBS-MP exhibits the same issue and I'd like to see if there's some way of actually dealing with it better than we're currently doing.
 

FerretBomb

Active Member
Sorry, the quality issue was more meant to point out why the option is not available/time was not spent to add the feature.

Short version (again), no, there's no way to do it with OBS, aside from the workaround I'd outlined above where OBS 'lives' on the secondary GPU and relies on other capture methods to grab game video.
 
Top