Recording gameplay not smooth

jeens

New Member
Hi,

I'm trying to record fast-paced gameplay, counter-strike2 specifically and I dont feel completly satisfied becaused the recording is a bit choppy / laggy compared to ingame where its silky smooth.

I've tried to cap fps ingame at 120, 180, 240 and it doesn't seem to make a visible difference. Tried with vsync, gsync on/off. Set screen refreshrate at 120 / 144 (max)

Could it be that recording in 60 fps isnt enough for counter-strike? Because if I cap fps ingame at 60 the actual game will look choppy, compared to 120+ fps

Log file here

Example video here

Anyone that sees something obvious I'm missing?
 

rockbottom

Active Member
Game DVR can be disabled & your monitor should be @ 120HZ when using OBS. No encoding lag so leave your encoding settings alone for now, fine tune later.

Nvidia Control Panel:
Monitor Technology - Fixed
v-sync - Fast
Triple Buffering - Enabled
Texture Quality - anything but HQ

The other thing I would do is test using the on-board audio with the Razor completely removed from the audio chain first. It's THX surround & mixing stereo/surround with OBS doesn't really work all that well.
 

rockbottom

Active Member
Stats from the end of your log. Audio doesn't seem to be lagging too much but it is + 1.0ms slower than the video. The encoder has to wait for the audio arrive. I'm fairly certain this is the source of your stuttering.

10:48:32.005: obs_hotkey_thread(25 ms): min=0.002 ms, median=0.005 ms, max=0.327 ms, 99th percentile=0.069 ms, 100% below 25 ms
10:48:32.005: audio_thread(Audio): min=0.009 ms, median=0.03 ms, max=11.284 ms, 99th percentile=1.487 ms
10:48:32.005: ┗receive_audio: min=0.004 ms, median=0.386 ms, max=11.222 ms, 99th percentile=2.096 ms, 0.318768 calls per parent call
10:48:32.005: ┣buffer_audio: min=0 ms, median=0.001 ms, max=0.015 ms, 99th percentile=0.002 ms
10:48:32.005: ┗do_encode: min=0.011 ms, median=0.383 ms, max=11.217 ms, 99th percentile=2.093 ms
10:48:32.005: ┣encode(Track1): min=0.011 ms, median=0.351 ms, max=3.84 ms, 99th percentile=2.004 ms
10:48:32.005: ┗send_packet: min=0.001 ms, median=0.009 ms, max=10.559 ms, 99th percentile=0.148 ms
10:48:32.005: obs_graphics_thread(16.6667 ms): min=0.04 ms, median=0.149 ms, max=1062.52 ms, 99th percentile=0.373 ms, 99.9293% below 16.667 ms
10:48:32.005: ┣tick_sources: min=0.001 ms, median=0.01 ms, max=1062.45 ms, 99th percentile=0.127 ms
10:48:32.005: ┣output_frame: min=0.036 ms, median=0.077 ms, max=0.246 ms, 99th percentile=0.178 ms
10:48:32.005: ┃ ┗gs_context(video->graphics): min=0.036 ms, median=0.077 ms, max=0.245 ms, 99th percentile=0.178 ms
10:48:32.005: ┃ ┣render_video: min=0.003 ms, median=0.017 ms, max=0.049 ms, 99th percentile=0.031 ms
10:48:32.005: ┃ ┃ ┗render_main_texture: min=0.002 ms, median=0.015 ms, max=0.046 ms, 99th percentile=0.029 ms
10:48:32.005: ┃ ┗gs_flush: min=0.032 ms, median=0.059 ms, max=0.225 ms, 99th percentile=0.152 ms
10:48:32.005: ┗render_displays: min=0 ms, median=0.058 ms, max=1.336 ms, 99th percentile=0.148 ms
10:48:32.005: OBSBasic::ResetVideo: min=11.979 ms, median=0 ms, max=15.194 ms, 99th percentile=15.194 ms
10:48:32.005: obs_graphics_thread(16.6667 ms): min=0.09 ms, median=0.149 ms, max=0.65 ms, 99th percentile=0.316 ms, 100% below 16.667 ms
10:48:32.005: ┣tick_sources: min=0.005 ms, median=0.01 ms, max=0.476 ms, 99th percentile=0.131 ms
10:48:32.005: ┣output_frame: min=0.044 ms, median=0.078 ms, max=0.2 ms, 99th percentile=0.171 ms
10:48:32.005: ┃ ┗gs_context(video->graphics): min=0.044 ms, median=0.078 ms, max=0.199 ms, 99th percentile=0.171 ms
10:48:32.005: ┃ ┣render_video: min=0.009 ms, median=0.017 ms, max=0.076 ms, 99th percentile=0.025 ms
10:48:32.005: ┃ ┃ ┗render_main_texture: min=0.008 ms, median=0.015 ms, max=0.074 ms, 99th percentile=0.023 ms
10:48:32.005: ┃ ┗gs_flush: min=0.035 ms, median=0.061 ms, max=0.178 ms, 99th percentile=0.149 ms
10:48:32.005: ┗render_displays: min=0.036 ms, median=0.057 ms, max=0.164 ms, 99th percentile=0.111 ms
10:48:32.005: obs_graphics_thread(16.6667 ms): min=0.074 ms, median=0.2 ms, max=1.282 ms, 99th percentile=0.531 ms, 100% below 16.667 ms
10:48:32.005: ┣tick_sources: min=0.001 ms, median=0.012 ms, max=0.66 ms, 99th percentile=0.049 ms
10:48:32.005: ┣output_frame: min=0.044 ms, median=0.114 ms, max=1.122 ms, 99th percentile=0.406 ms
10:48:32.005: ┃ ┗gs_context(video->graphics): min=0.043 ms, median=0.113 ms, max=1.121 ms, 99th percentile=0.406 ms
10:48:32.005: ┃ ┣render_video: min=0.004 ms, median=0.023 ms, max=0.533 ms, 99th percentile=0.37 ms
10:48:32.005: ┃ ┃ ┣render_main_texture: min=0.003 ms, median=0.02 ms, max=0.125 ms, 99th percentile=0.034 ms
10:48:32.005: ┃ ┃ ┣render_convert_texture: min=0.006 ms, median=0.01 ms, max=0.071 ms, 99th percentile=0.021 ms, 0.383696 calls per parent call
10:48:32.005: ┃ ┃ ┗output_gpu_encoders: min=0 ms, median=0.026 ms, max=0.179 ms, 99th percentile=0.113 ms, 0.383696 calls per parent call
10:48:32.005: ┃ ┗gs_flush: min=0.003 ms, median=0.057 ms, max=1.091 ms, 99th percentile=0.18 ms
10:48:32.005: ┗render_displays: min=0 ms, median=0.059 ms, max=1.121 ms, 99th percentile=0.132 ms
10:48:32.005: send_packet: min=0.005 ms, median=0.07 ms, max=19.773 ms, 99th percentile=0.205 ms
10:48:32.005: =================================================
10:48:32.005: == Profiler Time Between Calls ==================
10:48:32.005: obs_hotkey_thread(25 ms): min=24.399 ms, median=25.42 ms, max=82.079 ms, 51.9568% within ±2% of 25 ms (0.0117523% lower, 48.0315% higher)
10:48:32.005: obs_graphics_thread(16.6667 ms): min=4.138 ms, median=16.667 ms, max=1062.53 ms, 99.8586% within ±2% of 16.667 ms (0.0707214% lower, 0.0707214% higher)
10:48:32.005: obs_graphics_thread(16.6667 ms): min=16.655 ms, median=16.667 ms, max=16.678 ms, 100% within ±2% of 16.667 ms (0% lower, 0% higher)
10:48:32.005: obs_graphics_thread(16.6667 ms): min=16.424 ms, median=16.667 ms, max=16.908 ms, 100% within ±2% of 16.667 ms (0% lower, 0% higher)
10:48:32.005: =================================================
10:48:32.215: Number of memory leaks: 0
 

rockbottom

Active Member
12900k/3090 using the on-board audio for comparison purposes. There's not much difference in performance between our systems but routing the audio to the Razor is gumming up the works.

16:32:52.286: obs_hotkey_thread(25 ms): min=0.001 ms, median=0.004 ms, max=6.426 ms, 99th percentile=0.08 ms, 100% below 25 ms
16:32:52.286: audio_thread(Audio): min=0.007 ms, median=0.083 ms, max=19.139 ms, 99th percentile=0.144 ms
16:32:52.286: ┗receive_audio: min=0.002 ms, median=0.042 ms, max=19.102 ms, 99th percentile=0.096 ms, 0.844672 calls per parent call
16:32:52.286: ┣buffer_audio: min=0 ms, median=0 ms, max=0.025 ms, 99th percentile=0.001 ms
16:32:52.286: ┗do_encode: min=0.003 ms, median=0.04 ms, max=19.101 ms, 99th percentile=0.094 ms
16:32:52.286: ┣encode(Track1): min=0.002 ms, median=0.011 ms, max=0.096 ms, 99th percentile=0.016 ms
16:32:52.286: ┗send_packet: min=0.001 ms, median=0.027 ms, max=19.09 ms, 99th percentile=0.081 ms
16:32:52.286: obs_graphics_thread(16.6667 ms): min=0.037 ms, median=0.456 ms, max=344.826 ms, 99th percentile=0.883 ms, 99.9994% below 16.667 ms
16:32:52.286: ┣tick_sources: min=0.001 ms, median=0.014 ms, max=344.128 ms, 99th percentile=0.026 ms
16:32:52.286: ┣output_frame: min=0.027 ms, median=0.204 ms, max=1.77 ms, 99th percentile=0.394 ms
16:32:52.286: ┃ ┗gs_context(video->graphics): min=0.026 ms, median=0.204 ms, max=1.769 ms, 99th percentile=0.393 ms
16:32:52.286: ┃ ┣render_video: min=0.002 ms, median=0.175 ms, max=0.978 ms, 99th percentile=0.349 ms
16:32:52.286: ┃ ┃ ┣render_main_texture: min=0.002 ms, median=0.024 ms, max=0.515 ms, 99th percentile=0.04 ms
16:32:52.286: ┃ ┃ ┣render_convert_texture: min=0.005 ms, median=0.012 ms, max=0.484 ms, 99th percentile=0.024 ms, 0.844689 calls per parent call
16:32:52.286: ┃ ┃ ┗output_gpu_encoders: min=0 ms, median=0.032 ms, max=0.639 ms, 99th percentile=0.094 ms, 0.844689 calls per parent call
16:32:52.286: ┃ ┗gs_flush: min=0.002 ms, median=0.028 ms, max=1.728 ms, 99th percentile=0.126 ms
16:32:52.286: ┗render_displays: min=0 ms, median=0.059 ms, max=0.607 ms, 99th percentile=0.087 ms
16:32:52.286: send_packet: min=0.006 ms, median=0.031 ms, max=19.352 ms, 99th percentile=0.092 ms
16:32:52.286: =================================================
16:32:52.286: == Profiler Time Between Calls ==================
16:32:52.286: obs_hotkey_thread(25 ms): min=24.392 ms, median=25.503 ms, max=502.07 ms, 49.9452% within ±2% of 25 ms (0.000225106% lower, 50.0546% higher)
16:32:52.286: obs_graphics_thread(16.6667 ms): min=0.683 ms, median=16.667 ms, max=502.466 ms, 99.9932% within ±2% of 16.667 ms (0.0036782% lower, 0.00308968% higher)
16:32:52.286: =================================================
16:32:52.495: Number of memory leaks: 0
 

jeens

New Member
12900k/3090 using the on-board audio for comparison purposes. There's not much difference in performance between our systems but routing the audio to the Razor is gumming up the works.

16:32:52.286: obs_hotkey_thread(25 ms): min=0.001 ms, median=0.004 ms, max=6.426 ms, 99th percentile=0.08 ms, 100% below 25 ms
16:32:52.286: audio_thread(Audio): min=0.007 ms, median=0.083 ms, max=19.139 ms, 99th percentile=0.144 ms
16:32:52.286: ┗receive_audio: min=0.002 ms, median=0.042 ms, max=19.102 ms, 99th percentile=0.096 ms, 0.844672 calls per parent call
16:32:52.286: ┣buffer_audio: min=0 ms, median=0 ms, max=0.025 ms, 99th percentile=0.001 ms
16:32:52.286: ┗do_encode: min=0.003 ms, median=0.04 ms, max=19.101 ms, 99th percentile=0.094 ms
16:32:52.286: ┣encode(Track1): min=0.002 ms, median=0.011 ms, max=0.096 ms, 99th percentile=0.016 ms
16:32:52.286: ┗send_packet: min=0.001 ms, median=0.027 ms, max=19.09 ms, 99th percentile=0.081 ms
16:32:52.286: obs_graphics_thread(16.6667 ms): min=0.037 ms, median=0.456 ms, max=344.826 ms, 99th percentile=0.883 ms, 99.9994% below 16.667 ms
16:32:52.286: ┣tick_sources: min=0.001 ms, median=0.014 ms, max=344.128 ms, 99th percentile=0.026 ms
16:32:52.286: ┣output_frame: min=0.027 ms, median=0.204 ms, max=1.77 ms, 99th percentile=0.394 ms
16:32:52.286: ┃ ┗gs_context(video->graphics): min=0.026 ms, median=0.204 ms, max=1.769 ms, 99th percentile=0.393 ms
16:32:52.286: ┃ ┣render_video: min=0.002 ms, median=0.175 ms, max=0.978 ms, 99th percentile=0.349 ms
16:32:52.286: ┃ ┃ ┣render_main_texture: min=0.002 ms, median=0.024 ms, max=0.515 ms, 99th percentile=0.04 ms
16:32:52.286: ┃ ┃ ┣render_convert_texture: min=0.005 ms, median=0.012 ms, max=0.484 ms, 99th percentile=0.024 ms, 0.844689 calls per parent call
16:32:52.286: ┃ ┃ ┗output_gpu_encoders: min=0 ms, median=0.032 ms, max=0.639 ms, 99th percentile=0.094 ms, 0.844689 calls per parent call
16:32:52.286: ┃ ┗gs_flush: min=0.002 ms, median=0.028 ms, max=1.728 ms, 99th percentile=0.126 ms
16:32:52.286: ┗render_displays: min=0 ms, median=0.059 ms, max=0.607 ms, 99th percentile=0.087 ms
16:32:52.286: send_packet: min=0.006 ms, median=0.031 ms, max=19.352 ms, 99th percentile=0.092 ms
16:32:52.286: =================================================
16:32:52.286: == Profiler Time Between Calls ==================
16:32:52.286: obs_hotkey_thread(25 ms): min=24.392 ms, median=25.503 ms, max=502.07 ms, 49.9452% within ±2% of 25 ms (0.000225106% lower, 50.0546% higher)
16:32:52.286: obs_graphics_thread(16.6667 ms): min=0.683 ms, median=16.667 ms, max=502.466 ms, 99.9932% within ±2% of 16.667 ms (0.0036782% lower, 0.00308968% higher)
16:32:52.286: =================================================
16:32:52.495: Number of memory leaks: 0
Hi,

Thank you for the information, never thought that audio would be the source of my video problem.

Is this something I can change in obs or do i need to change my windows settings?

I will do some testa as soon as i get time!

Thanks again
 

jeens

New Member
Game DVR can be disabled & your monitor should be @ 120HZ when using OBS. No encoding lag so leave your encoding settings alone for now, fine tune later.

Nvidia Control Panel:
Monitor Technology - Fixed
v-sync - Fast
Triple Buffering - Enabled
Texture Quality - anything but HQ

The other thing I would do is test using the on-board audio with the Razor completely removed from the audio chain first. It's THX surround & mixing stereo/surround with OBS doesn't really work all that well.
Didn't see this messages at first, thank you will try this
 

rockbottom

Active Member
Hi,

Thank you for the information, never thought that audio would be the source of my video problem.

Is this something I can change in obs or do i need to change my windows settings?

I will do some testa as soon as i get time!

Thanks again

Possibly, but the on-board audio could also be disabled in BIOS. On my Asus Z690, it's located:

Advanced > Onboard Devices Configuration > USB Audio
 

jeens

New Member
Possibly, but the on-board audio could also be disabled in BIOS. On my Asus Z690, it's located:

Advanced > Onboard Devices Configuration > USB Audio
I have the Z790 so it should be the same.

I'm asking this because I can't try for myself right now and thank you for taking the time to answer.

How does this affect the pc, I wont notice a difference while gaming for example?
 

jeens

New Member
One thing I forgot to mention is that i have a secondary screen that is running on 60hz if that could do anything negative for my recording
 

rockbottom

Active Member
This looks good:
10:45:33.476: video settings reset:
10:45:33.476: base resolution: 1920x1080
10:45:33.476: output resolution: 1920x1080
10:45:33.476: downscale filter: Bicubic
10:45:33.476: fps: 60/1
10:45:33.476: format: NV12
10:45:33.476: YUV mode: Rec. 709/Partial
10:45:33.476: NV12 texture support enabled
10:45:33.476: P010 texture support not available
10:45:33.490: Settings changed (advanced)


Fine tune the encoder:
10:45:35.916: [obs-nvenc: 'advanced_video_recording'] settings:
10:45:35.916: codec: H264
10:45:35.916: rate_control: CQP
10:45:35.916: bitrate: 0
10:45:35.916: cqp: 14
10:45:35.916: keyint: 250 > 2 Seconds
10:45:35.916: preset: p7 > p4 or p5
10:45:35.916: tuning: hq
10:45:35.916: multipass: disabled > qres
10:45:35.916: profile: high
10:45:35.916: width: 1920
10:45:35.916: height: 1080
10:45:35.916: b-frames: 2 > 0
10:45:35.916: lookahead: true > false
10:45:35.916: psycho_aq: true > false
 

rockbottom

Active Member
If you need to update the Realtek audio driver, go to the Z790's support page & look for this version or similar. Sonic Studio is disabled & it works great with OBS.
1706391587876.png
 

jeens

New Member
Possibly, but the on-board audio could also be disabled in BIOS. On my Asus Z690, it's located:

Advanced > Onboard Devices Configuration > USB Audio

If you need to update the Realtek audio driver, go to the Z790's support page & look for this version or similar. Sonic Studio is disabled & it works great with OBS.
View attachment 101242

Can you explain this a little bit more indepth,

Is it that my audio right now is being rrouted because I have my bluetooth dongle for my wireless Blackshark with Razor Synaps install?

I can't find the setting that you mentioned, but how does it stop the audio from being routed.

Tried doing my own research but the only thing that comes up while searching for audio problem is delay and my delay is not noticeable.

Best regards
 

rockbottom

Active Member
The example above is for an Asus ROG Maximus Z690, sounds like your mobo is possibly from a different manufacturer. You'll need to check the Owner's Manual or if there is a BIOS manual, check it for the location of the audio settings.

How's the stuttering, have you noticed any improvement running both monitors @ 120/60?
 

jeens

New Member
Okey, but if my setting is named differently for example what is it that I'm doing by disabling on-board usb audio?

I can't try because my secondary monitor atm is only 60hz max, but I ordered another monitor today that is 240hz so I will record on that with my second monitor at 120hz as soon as I get the time
 

rockbottom

Active Member
I wanted you to test with the on-board audio enabled so the Razor could be removed from the audio chain. Using the on-board audio should be significantly faster than the Razor & the encoder won't have to wait for the audio.

The main monitor was @ 144, that should be run @ 120 while using OBS. The second monitor can be left alone, it's fine @ 60.
 

jeens

New Member
The only audio setting I had in bios was enabled so I changed it to disabled, and I just looked through the manual. Nothing about onboard audio unfortunately. Would it be the same if I uninstall everything Razor and disconnect my headphones or am I just being stupid now?

Yeah if I run my monitor at 120hz and also record in 120fps it's decent, but its not the same as when i look on some youtubers clips and they have edit their clips.

Here is an example

I'm also thinking of reset my bios, format pc and upgrade w10 to w11
 

rockbottom

Active Member
What board is it, got some time & can take a look.

The example video looks good. Maybe just some minor tweaks are needed at this point. Post a new log.

I don't think any of that is necessary & I would stick with W10.
 
Top