At my wits end. OBS dropping frames due to Encoding Lag on a 4090.

norgmang

New Member

This is my last stream. I spent the first hour trying to stream Fatekeeper, a new UE5 game - an engine which I usually have problems with, sadly.

I took steps beforehand to significantly offload the GPU load
- Windowed Fullscreen, 1920x1080, 60fps locked, DLSS Ultra Performance.
Everything seemed like it was running great, and then suddenly I'd get weird random spikes of dipping frames into the 40s and 30s. Unwatchable. Gave up and played some other stuff.

I've been having encoding issues in a lot of other high demand 3d games. They run fine natively, but OBS gets absolutely rocked.

I've tried a ton of different stuff:
- disabling HAGS (even though I could really benefit from framegen)
- trying to dial my BIOS settings in for XMP and other minor CPU/GPU optimizations, which required dropping down to 64gb ram (XMP wouldn't work with 128)
- dropping the OBS output resolution to 936p
- manually gating my monitor refresh rate to a max of 120hz
- gating fps to either 120 or 60fps, whatever I can get away with
- dropping game resolution to 1920x1080 (from 2k native)

I just want to play these games at as good of quality as I can get away with while being able to not worry as much about my stream. It's driving me absolutely batty.

Any help or suggestions would be massively appreciated. I don't know what else to do at this point, and it's set to only get worse with UE6.
 
Encoding lag isn't your issue. Rendering Lag/GPU overload is. Load Reduction is in order. Get rid of the Rendering Lag & the encoding lag will go away too, simple stuff.

01:03:41.069: Output 'adv_stream': stopping
01:03:41.069: Output 'adv_stream': Total frames output: 1280651
01:03:41.069: Output 'adv_stream': Total drawn frames: 1278457 (1280691 attempted)
01:03:41.069: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 2234 (0.2%)
01:03:41.069: Video stopped, number of skipped frames due to encoding lag: 2821/1280662 (0.2%)
01:03:41.072: ==== Streaming Stop ================================================
01:03:41.109: warning: 2 frames left in the queue on closing

 
In your encoding settings, change Multipass to qres or disabled. The current setting is too slow for real time encoding & also slows down Rendering Time.

21:45:39.759: multipass: fullres
 
Too many Media Sources are using hardware acceleration. Disable it for all except 2 or 3 of them in your Main Scene.

19:05:00.237: [Media Source 'BGVideo']: settings:
19:05:00.237: input: C:/Users/User/Desktop/Vid Archive/bgvideos/bgvideo_HUNT_INFERNO_RETURNS.mp4
19:05:00.237: input_format: (null)
19:05:00.237: speed: 100
19:05:00.237: is_looping: yes
19:05:00.237: is_linear_alpha: no
19:05:00.237: is_hw_decoding: yes
19:05:00.237: is_clear_on_media_end: yes
19:05:00.237: restart_on_activate: no
19:05:00.237: close_when_inactive: no
19:05:00.237: full_decode: no
 
Nvidia added a 2nd decode engine to the 5080 & 5090 so there's a bit more flexibility with them. For the rest of us, just a single decode engine.
 
Thank you so much for the suggestions rockbottom. I'll give it a shot. Could these media sources affect the gaming scenes when they're not active? Is there anything else I could try as well?
 
Yep.

Your Scene Collection is massive. You may want to spend some time streamlining it or even breaking it up into several collections to save resources. At the minimum, go through it & get rid of all the duplicate captures. There should only be (1) Display, Game or Window Capture per Scene. Helps to avoid interference.

19:05:06.423: - scene 'Clip Watching':
19:05:06.423: - source: 'Display Capture' (monitor_capture)
19:05:06.423: - source: 'Image 2' (image_source)
19:05:06.423: - source: 'uaehuhuea' (ffmpeg_source)
19:05:06.423: - source: 'Clip Zoom' (window_capture)
19:05:06.423: - filter: 'Chroma Key' (chroma_key_filter_v2)
19:05:06.423: - source: 'Clips' (window_capture)
19:05:06.423: - filter: 'Chroma Key' (chroma_key_filter_v2)
19:05:06.423: - source: 'Chat' (browser_source)
19:05:06.423: - filter: '3D Effect' (3d_effect_filter)
19:05:06.423: - source: 'Image 3' (image_source)
19:05:06.423: - source: 'CAMONE' (scene)
19:05:06.423: - filter: 'User-defined shader' (shader_filter)
19:05:06.423: - filter: 'NVIDIA Background Removal' (nv_greenscreen_filter)
19:05:06.423: - source: 'Lodge' (browser_source)
19:05:06.423: - source: 'DKC Alerts' (scene)
19:05:06.423: - source: 'Browser' (browser_source)
19:05:06.423: - source: 'USABLE TEXT' (text_gdiplus_v2)
19:05:06.423: - filter: '3D Effect' (3d_effect_filter)
19:05:06.423: - filter: 'User-defined shader' (shader_filter)
 
Definitely. I'll clear those out.

It just drives me nuts. My PC is an absolute monster (at least on paper, lately I've been feeling screwed in the silicon lottery running benchmarks) and it should be able to chew this stuff up and spit it out. I don't understand how people are able to stream these games with so few issues without a 5090, again, unless I have something else weird going on hardware wise that I just don't understand - like my inactive capture card or multiple monitors throwing issues.
  • Mobo: X670 AORUS ELITE AX
  • CPU: AMD Ryzen 9 7950X3D
  • GPU: NVIDIA GeForce RTX 4090
  • RAM: 64 GB DDR5
 
Just needs some optimization. I suspect that there's been some overload/rendering lag all along so that's on the input side of things. You have been tweaking the output. Crap in, there's always crap out.
 
Picked through the log. Overall, set-up is good.

You can disable both of these. They're not needed & there may be some savings with Game DVR out of the way
19:04:56.908: Game Bar: On
19:04:56.908: Game DVR: On

Color Space, if you're going to watch any of your recordings on a TV, might want to switch to Rec 709. In my testing, I thought sRGB looked A-OK on PC monitors but the colors seemed to be washed out when watching that recording on a TV.
YUV mode: sRGB/Partial

This Media Source lagged. It was using acceleration. Keep an eye on it, it may stop lagging as load is reduced or it could be something else to fix.
20:12:44.691: adding 64 milliseconds of audio buffering, total audio buffering is now 106 milliseconds (source: BGVideo)
 
I shifted some stuff around, deleted some scenes and sources, and tried running a bandwidth test/recording test, prior to your latest suggestions


Still getting about 0.5% rendering lag, but generally a lot more stable...I think.

-------------------

Disabling the game bar/dvr stuff, and I'll see about the color space change.

I'll see if maybe there's a more performant format I can export that media source to, like webm or something.

Thank you again so much for these suggestions. It still feels like there's something really dumb holding everything down - it'd be crazy if it was just the background video media source.
 
Yeah it's improving.

Run your stream @ 1080p

Fullres is still in play on your recording. Use Preset P5. CQ Level is the Quality setting in CQP Rate Control. The Preset is compression level only.

Make all of your changes/updates & then close/re-open OBS. Run your test. Repeat close/re-open, post the previous log.
 
For your recording, disable all of it. You should see a nice quality bump. B frames are the lowest quality frame type, replace them with higher quality P frames. They are good in the right situation, low bit rate or save some space, that's it.

10:33:14.448: b-frames: 2
10:33:14.448: b-ref-mode: 0
10:33:14.448: lookahead: true (16 frames)
10:33:14.448: aq: true
 
It just drives me nuts. My PC is an absolute monster (at least on paper, lately I've been feeling screwed in the silicon lottery running benchmarks) and it should be able to chew this stuff up and spit it out. I don't understand how people are able to stream these games with so few issues without a 5090, again, unless I have something else weird going on hardware wise that I just don't understand - like my inactive capture card or multiple monitors throwing issues.
Thanks @rockbottom for your time and expertise. much appreciated.
@norgmang - the issue is that your are asking system to perform really compute/resource intensive tasks, and that requires understanding how and where bottlenecks can occur. And lots of folks, especially on social media, fail to go into the context, and specific details that are critical to optimized/smooth operations under load.
And rockbottom's comment apply to what is visible in OBS Studio logs.
Hopefully you are aware that similar optimization considerations apply at Operating System level. If you OS looks like your Scene collection, so to speak, that will cause its own issues as well. More hardware only helps to a point.. a problematic config will cripple a US$20K workstation.
 
Need to disable acceleration on at least (3) more Media Sources. I counted (6). Free up that VRAM, your system has plenty of RAM available. Balance the load...
 
Thanks @rockbottom for your time and expertise. much appreciated.
@norgmang - the issue is that your are asking system to perform really compute/resource intensive tasks, and that requires understanding how and where bottlenecks can occur. And lots of folks, especially on social media, fail to go into the context, and specific details that are critical to optimized/smooth operations under load.
And rockbottom's comment apply to what is visible in OBS Studio logs.
Hopefully you are aware that similar optimization considerations apply at Operating System level. If you OS looks like your Scene collection, so to speak, that will cause its own issues as well. More hardware only helps to a point.. a problematic config will cripple a US$20K workstation.
You're absolutely right, and believe me, I'm painfully aware of my own shortcomings in this regard. I'm happy to provide whatever context might help. I've been bashing my head against this long enough.

Yes, a huge thanks to @rockbottom , I'm already seeing massive improvements. Basically buttery smooth here after the last test, and still prior to your other suggestions.


Since this test, I've basically deleted every non essential media source and will stick to display capture on a separate scene for sharing memes and videos. My Logo/Scene label videos will need to be converted to webm, hopefully keeping the transparency. I had no idea there was such a bottleneck there.
 
Once you get the input side error free, your set-up will smoke.

Getting closer, Fullres is spoiling the fun.
12:05:05.933: codec: H264
12:05:05.933: rate_control: CQP
12:05:05.933: cqp: 20
12:05:05.933: keyint: 120
12:05:05.933: preset: p5
12:05:05.933: tuning: hq
12:05:05.933: multipass: fullres
12:05:05.933: profile: high
12:05:05.933: width: 1920
12:05:05.933: height: 1080
12:05:05.933: b-frames: 2
12:05:05.933: b-ref-mode: 0
12:05:05.933: lookahead: false (0 frames)
12:05:05.933: aq: true
12:05:05.933:
12:05:05.977: ---------------------------------
12:05:05.977: [FFmpeg aac encoder: 'Track1'] bitrate: 160, channels: 2, channel_layout: stereo, track: 1
12:05:05.977:
12:05:06.014: ==== Recording Start ===============================================
12:05:06.014: [mp4 output: 'adv_file_output'] Writing Hybrid MP4/MOV file 'E:/VODs/2026-06-05 12-05-05.mp4'...
12:08:01.883: [game-capture: 'Game Capture 2'] capture window no longer exists, terminating capture
12:08:01.884: [game-capture: 'Game Capture 2'] capture stopped
12:08:11.632: [rtmp stream: 'adv_stream'] User stopped the stream
12:08:11.632: [rtmp stream: 'adv_stream'] Socket send buffer is 1048576 bytes
12:08:11.632: Output 'adv_stream': stopping
12:08:11.632: Output 'adv_stream': Total frames output: 11169
12:08:11.632: Output 'adv_stream': Total drawn frames: 11206 (11208 attempted)
12:08:11.632: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 2 (0.0%)
12:08:11.636: ==== Streaming Stop ================================================
12:08:11.689: warning: 2 frames left in the queue on closing
12:08:12.186: [mp4 muxer: 'adv_file_output'] Flushing final fragment...
12:08:12.186: [mp4 muxer: 'adv_file_output'] Number of fragments: 93
12:08:12.188: [mp4 muxer: 'adv_file_output'] Full moov size: 139 KiB
12:08:12.188: [mp4 muxer: 'adv_file_output'] Final mdat size: 2154186 KiB
12:08:12.188: Output 'adv_file_output': stopping
12:08:12.188: Output 'adv_file_output': Total frames output: 11157
12:08:12.188: Output 'adv_file_output': Total drawn frames: 11169 (11171 attempted)
12:08:12.188: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 2 (0.0%)
12:08:12.188: [mp4 output: 'adv_file_output'] Waiting for file writer to finish...
12:08:12.188: Video stopped, number of skipped frames due to encoding lag: 2/11214 (0.0%)
12:08:12.188: ==== Recording Stop ================================================
12:08:12.190: [mp4 output: 'adv_file_output'] File output complete. Finalization took 3 ms.
12:08:12.244: warning: 2 frames left in the queue on closing
 
(12) Concurrent Encodes are possible now on consumer GPU's. 4090 has duel encoders.

I get (8) easily with my 12900k/3090. Haven't updated the driver far enough to try 12 yet.
 
Awesome, thanks! Down to Quarter. Currently converting the alpha channel .mov's and will test again.

I mean, if I could just record and stream to Twitch simultaneously, and have it look and sound great, that'd be enough for me. I wouldn't even know where to begin with even more additional encodes, though multistreaming and vertical formatting would be great one day.
 
Back
Top