Question / Help Rescale Output => Encoding Lag (SOLVED)

Pixelretter

New Member
First off: I only did test-streams so far, so no real streaming material available.

What I would like to do:
Stream in 720p60, record at the same time in 1080p60.

The issue:
If I use "rescale output" on my stream settings, I get "encoding lag" (96+%!).

Possible Solutions:
I wouldn' have encoding lag (0.0%), if I would also stream in 1080p60, but my internet connection is too slow, and I would rather stream in 720p for viewer compatibility.

I wouldn't have encoding lag (0.0%), if I would use 30 fps instead, but then I would have 1080p30 recordings also, which is obsolete and not cool on YouTube anymore.

I wouldn't have encoding lag (0.0%), if I would scale the output resolution to 720p60, but then I would also have a 720p60 video, which isn't even worth uploading on YouTube, even not worth recording in the first place.

So what should I do? Why is the rescale output setting giving my CPU such a hard time?

I use the CPU (x264, AMD FX-8350 8-core) to encode the Stream, I use a secondary graphic card (NVENC, GTX750) to encode the recording, I currently have a 960GTX as primary graphic card.

I know it's not the best system these days, but shouldn't it be enough for what I want to do?

I will post a log tomorrow. Sobbing myself to sleep now.
 

koala

Active Member
Rescaling by setting the output resolution in Settings->Video takes place on the GPU, which requires next to none resources, because a GPU has extremely efficient commands for this.
Rescaling within the encoder settings takes place on the CPU, which is somewhat resource intensive and slow, because the CPU doesn't have as much efficient commands as a GPU for this, and it is performed in a single thread.

It seems your CPU isn't able to take the additional stress the CPU rescaling puts on it, so you get the behavior you observe. I don't know any workaround that will make things work as you like. A reasonably stronger CPU will make it work, but how much stronger exactly it has to be, I don't know.
 

Pixelretter

New Member
In theory, when I let GPU 0 encode the recording and render the game, and let GPU 1 encode the stream instead of the CPU, isn't GPU 1 rescaling and not the CPU? Shouldn't that work better?

I also have to admit I do currently not have an own hard disk for recording, my system hard disk is pretty old and I do only have 8GB Ram on my system. Could this all interfere the encoding process and create a bottle neck somewhere else?

Maybe I just have to start with 30fps and see what I can upgrade in the future.
 

koala

Active Member
Unfortunately, observations suggest that rescaling with the encoder settings takes place on the CPU, not on the GPU. It's not proved (you have to look into the source code of the encoder), but you are not the only one who has seen this behavior, so I assume it's true. And if you use a different GPU for encoding, the rescaling will still take place in CPU space - that part of the encoder is probably independent from the GPU. It seems only the actual raw h.264 encoding is done on the GPU.

Hard disk and the amount of RAM do not impact encoding performance. As long as your hd is able to sustain the bitrate of the encoded video, you're fine. Probably all hd's from the last 10 years are able to do this as long as you do not try to encode lossless.
And as long as OBS fits into memory, you're fine with whatever amount of RAM you have.
 

Pixelretter

New Member
I see. Thank you for your help.
So if I record and stream at the same time I will use 30 fps then and see where the journey is going.
 

Pixelretter

New Member
I solved the problem by simply deactivating Cool'n'Quiet function in the BIOS.
As I write this I am doing a test stream for several minutes with 1080p60 recording, 720p60 stream and 0.0% encoding lag.
So happy right now.
 
Top