Question / Help OBS as Shadowplay replacement using NVENC? Encoder Lag during capture

SlantedPillow

New Member
Hi there,

Due to having no audio control being one of the main reasons I am unable to use Shadowplay proficiently, I tried experimenting with using NVENC within OBS to see if I could use it as a replacement for 1080p60fps local recordings.

It appeared to work well at first glance by replicating the settings in Shadowplay (1080p60fps 50mbits) and the first preset I saw that produced video (High Performance), but going through the recording from the other day it has continuous dropped/skipped frames.

All I really want is exactly what shadowplay offers but with better audio control that OBS can do for local recordings, but it doesn't appear as smooth with the same settings.

I did try dropping the bitrate and spent about an hour just then trying out varying presets and bitrates, but the purpose is the 1080p60fps that ShadowPlay/Nvidia Encoder offers, so I don't want to compromise there.

NVENC.png

NVENC 2.png

NVENC 3.png

TL;DR Is there a way to improve performance of 1080p60fps capture in OBS using NVENC?

Thanks
 
Hey,

I was going to try and make another test recording for the log to be cleaner and less cluttered, but if you try and find "Video Encoding: NVENC" it seems to put you straight above where it mentions total frames encoded, duplicated and skipped.

http://pastebin.com/c1VFs2U9

This was on Next Car Game Wreckfest as it was a game I could mess around in. But the other day I was playing/recording Red Faction Guerrilla and I can post the logs to that aswell, but it's got the same settings in the log above with about the same results

The log above is me also testing different presets and bitrates and also Quicksync occassionally, but the preset: hp is High Performance which seems to be the most reliable.

It seems that on average with most of what I saw, around 8-12% of frames get duplicated. Occasionally on the OBS window it shows high CPU encoder usage, which obviously is the 1080p60fps capture, but I don't know if OBS is optimized to work well with NVENC just yet.

The only reason I bring all of this up is Shadowplay seems to be (from what I could see originally) stutter free in their recordings, I just want to match those settings 1:1 in OBS, but with audio control that OBS offers.
 
Never really seen NVEnc perform so poorly. I don't see any critical mistakes you've made either, so its kind of mysterious to me. You used Quicksync at the end and it worked well.

Stick to High Performance instead of Low Latency High Performance. Even when you did this however you still got over 9% duplicated frames.

Try setting your keyinterval to 5 seconds instead of 2 (i.e. 300 frames if you stay at 60fps). Use High profile instead of Main.

But neither of those should negatively effect anything as far as duplicated frames go.

Are your Nvidia drivers up to date? Do other games work better? Can you try downscaling and use a lower framerate to see if you can get it to work well (as a test)?
 
I'll try making another testing session tonight.

My Nvidia drivers are up to date and I haven't tried it with too many other games. Only ones I've tried it with so far is Red Faction Guerrilla, Contagion and Next Car Game. Contagion I haven't examined the footage much or the logs so I can check that tonight aswell. Any specific types of games do you think would negatively affect the recording/H264 encoder? That's something I was thinking aswell but with RFG performing poorly I wasn't too sure if games would affect it.
 
Some capture methods are better than others, and it depends on your OS and the game on which capture method will work best. In general you want to use game capture unless the game is incompatible with it. You might check some of the guides if you're not sure which capture method to use. This is really the only thing I can think of and the more games you try the better the odds you can find some commonality.
 
So I finally got around to do more testing tonight with the Evolve beta. And it performed terribly.

http://pastebin.com/FCC9AAXq

Even using high performance and whatnot, it was showing the high CPU encoding constantly. I tried using the key interval set to 5 and using High profile instead of main and both didn't improve anything.

I even tried 720p at 15mbits bitrate and it performed terribly. I really don't know what was happening tonight but Evolve was not playing nice at all.

Also to note, I tried Quicksync after this to get some usable footage and even that was having issues at 1080p60fps 50mbits with Evolve, whereas the other day it was smooth as hell with my testing. Really not sure.

EDIT: Just had a look through the logs, and saw that when I put it on 720p60fps 15mbits it showed this

  1. 21:53:28: Total frames encoded: 59411, total frames duplicated: 5659 (9.53%)
  2. 21:53:28: Number of frames skipped due to encoder lag: 502 (0.84%)
So less to do with encoder lag at that level, but still duplicating alot of frames.
 
I am not too sure which of the 3 updates I got today were a resolution to the encoder lag I've had with NVENC in OBS, but I received an update to GeForce Experience (2.2.3), my video card drivers (347.25), and an update to OBS (0.64b).

I had discovered other threads and forums about an update to either GeForce Experience or to the video card drivers causing massive lag with OBS capture aswell, so it was possibly one of them.

But I did a quick recording in Next Car Game and it gave this

00:04:38: Total frames encoded: 18851, total frames duplicated: 1187 (6.30%)
00:04:38: Number of frames skipped due to encoder lag: 7 (0.04%)
00:04:38: Total frames rendered: 18843, number of late frames: 9 (0.05%) (it's okay for some frames to be late)

Which is a hell of a lot better than the avg 10-20% encoder lagged skipped framswith the previous 1080p60fps 50mbit capture.

I do think that the duplicating would have just been that Next Car Game was running ~45fps so it wasn't a prime example of a game that is giving out 60fps to capture, but it's good to see there's no more encoder lag with the 1080p60fps capture.

All of this was on High Performance, but I might fiddle with the other presets to see if anything better that still holds <1% skipped frames.

Looks all good since the updates it seems.
 
Back
Top