Question / Help Something (Update: "Copy Engine") stutters but it is neither Game nor OBS

I3ordo

Member
I am having great time with a fluent 60fps vsynced game but when i open the recording, i see this:

The three stripes are for showing that OBS has no problem on rendering or encoding but the game capture is , same with display capture.

Has anyone had this and resolved this?
 

I3ordo

Member
I moved my setup to another pc , gamebar, game mode, dvr disabled here aswell. Stats are clean, no missed or skipped frames that are related to choppiness. The three stries on the edges of the screen are there for OBS related stutters.
 

Suslik V

Active Member
Unfortunately, the playback is not perfect. And you should aware of this if you decided to went to high fps fluid videos - only few people can see it without problems in playback (even your local software players may stutter at random points).

If you can say at what time I should look at, please say it. But before doing this, try to playback video at 0.25 speed by YouTube player - is there any stutter for you?

Edit: I see that capturing has frame double in some points of your video (GAME 2018 10 30 15 54 46), for example, one between 0:05-0:07.
Is what you complaining about?
 
Last edited:

Harold

Active Member
If your displays are running at different refresh rates, the problem comes from the video card driver.
 

I3ordo

Member
Unfortunately, the playback is not perfect. And you should aware of this if you decided to went to high fps fluid videos - only few people can see it without problems in playback (even your local software players may stutter at random points).

If you can say at what time I should look at, please say it. But before doing this, try to playback video at 0.25 speed by YouTube player - is there any stutter for you?

Edit: I see that capturing has frame double in some points of your video (GAME 2018 10 30 15 54 46), for example, one between 0:05-0:07.
Is what you complaining about?

The last video is very choppy
and there is a proper recording at much heavier loads down below) this choppy recording created while the PC is at 20% CPU usage and 60%Gpu usage total (including game on main and OBS on a secondary monitor).

This is the same OBS and PC and loads of more sources BUT with another game. Usages are much higher (CPU is at 80% GPU at %60) yet the video fluency is nothing to scough at. I mean , this is a 9Mbit NVENC local recording with 6 channels (yt keeps one channel ofcourse)

my stutters are not from GPU or CPU limitation as the fluent recording was created under much heavier cpu load.

However, i am not claiming that both of i7 rigs are flawless. None of them can stay in the green when tested with a LatencyMon more than 3 minutes but i wonder, how many users around the world luckily get a whole stable system free of any bad device drivers? ANd more importantly why Does OBS get affected tthis badly from something (which does not occur during playing videos and games or when using shadowplay). And worse, not report anything about it in stats manager.

OBS's capturing interfaces MAY be working rock solid on PCs with DPC problem free rigs but on regular high-end rigs the LINK between GPU and OBS is not reliable at all as it does not REPORT any capture problems nor recover from the "stuttery cycle" as quick as should.

ps:my displays are all at 60hz,3 x1080p displays, one on display port converted to HDMI adapter, DVI to DVI cable and finally a "HDMI 2 hdmi" cable.

I have been strugling with this issue for three weeks and i did some tests while only on DVI, only on HDMI but Game mode was enabled in windows and those tests have to be remade...

apart from this problem, i think OBS is great at usability and customization. I LOVE it, that s why i am trying.
 

I3ordo

Member
Correction: I had sync issue where Frames were glitching for one frame even all monitors set at 60hz, i stopped using HDMI and the glitches were gone. As i switched from HDMI to Display port , ndivia drivers stopped trying to use audio over HDMIS so that may be a cause of problem.
I got rid of the problem by: using DVI+displayport+displayport. (it used to be, display+hdmi+dvi)
1540989674902.png

Which seems to stop the periodic microstutters that begin to accumulate over the one minute mark.improves the OBS preview window's and recorded videos immensely.


There are still problems in my current gaming rig but this atleast remove the most annoying one, the stutter that starts building up and never going away under any load.


Even after using two display ports , and not an hdmi socket, i can see the OBS preview begin stuttering ,maybe my onboard audio, or NIC/NICs ,

In this crash: preview gets choppy as i pull out the hdmi cable and start using two display ports. The stutter does not go away and
If i change the scene collection to an empty Collection, this crash occurs:
https://obsproject.com/logs/3x6tpS7_ounKQgJ8

maybe this log will shed some light to my ongoing problem.?
 
Last edited:

Suslik V

Active Member
Can you attach casual log to your crash-log? Are you still using virtual audio device for monitoring?
 

I3ordo

Member
"Are you still using virtual audio device for monitoring? " Yes, but i changed that reducing my comfort level a bit and targeting a usb audio device directly without Voicemeeter.

crashes are not so often, more like after seing OBS preview stutter and switch to simple scene collection \ BAM crash. rare though... (the crash)

attaching a casual-log to a crash log ?
 
Last edited:

Narcogen

Active Member
A regular log, such as OBS writes during normal operations, not a crash. Preferably one that includes a recording or streaming session where you observe the problem you're having.
 

I3ordo

Member
As i said, crashes don't happen frequent, here is a long session of OBS with CPu encoding on a CPu heavy game. The capture source skips frames while the VLC media source just plays beautifully along side it. Notice the 3 stripes, when they dont scroll fluently, that is when my system cant handle it other times it is the capture source.
https://obsproject.com/logs/C4H1lmZe-50TuyPT
and here is the stream of twitch...
https://www.twitch.tv/videos/330515347 it will be tedious watching through...
 

Narcogen

Active Member
That log shows significant lag due to CPU overload, significant GPU overload.

11:17:17.225: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 323 (4.6%)
11:17:17.226: ==== Recording Stop ================================================
11:17:17.227: Video stopped, number of skipped frames due to encoding lag: 1770/6944 (25.5%)



Drop your encoding preset from 'fast' down to 'veryfast'. This setting drastically increases CPU load for an only marginal quality improvement.

Don't record to MP4. Record to MKV or FLV and remux. If anything goes wrong during recording, an MP4 will be entirely unrecoverable. If you need MP4 for your editing software, use the "Remux recordings" option in the File menu.

12:19:19.347: adding 46 milliseconds of audio buffering, total audio buffering is now 510 milliseconds

The above indicates your system is overloaded and your audio device is buffering as a result.

Are you only recording and not streaming? Your card I believe supports the NVENC encoder, is there a reason you're not using it?
 

I3ordo

Member
x264 for better IQ for stream and i know about the CPU overload (because of game + encoding) i was trying the limits however the skipped frames even when i am not recording or streaming.



I have to make a another session this time, minimum strain just so show the stutters even on low load.
 

Suslik V

Active Member
So, is it still may crash with your new audio monitoring device selected?

About the frames double (in previous videos) - your footage shows that OBS Studio render and encoding works OK, but image (of the source) is not always ready to be captured.
I have few questions for you:
  1. Is the Power plan for the PC set to High performance?
  2. Is OBS application's priority set to Normal (advanced settings of obs)?
  3. Is Set Affinity from Windows Task Manager of the obs64.exe process set to any special core (CPU) or to any?
 

I3ordo

Member
So, is it still may crash with your new audio monitoring device selected?

About the frames double (in previous videos) - your footage shows that OBS Studio render and encoding works OK, but image (of the source) is not always ready to be captured.
I have few questions for you:
  1. Is the Power plan for the PC set to High performance?
  2. Is OBS application's priority set to Normal (advanced settings of obs)?
  3. Is Set Affinity from Windows Task Manager of the obs64.exe process set to any special core (CPU) or to any?
1: Yes high perf
2: it is proirty is set to ""high" through OBS's advanced settings tab
3:it s using all cores just like when you restart a pc and all affinity and priorities are set to default. I tried isolating OBS and Game to 4 threads each but that did not matter.

Also a new recording and a log and a screen shot.
https://obsproject.com/logs/4Vttq5tTi3gpIdYC
Notice the Taks manager's insanely high GPU usage. When ever i notice a strain on the flow of frames i check and come across that.
1541274047455.png

Theories:
1: Taks manager is stupid , it also reports wrong usage of CPU, if you comapred it to what is reported by Core temp's...
2: GPUZ is reporting only the GPU's overall usage , not the highest overloaded unit of the GPU that is crunching under heavyload. So GPUZ is at fault.(talk about double standards...).
3:I am not meant to experience the things i am most excited about in this life? F that.

Update:
A couple of more findings. Task bar is right, GPUZ (or anyother Utility that reports the overall usage)can be unreliable on showing how much headroom you have by just looking at a general %usage reading. It s like CPU threads, you may see a 40% usage on total but only if you dig in to the performance graph and see invidividual threads and see if they are handling the given task well.

Anotherthing i notice:

I have let the GPU force vsync:off and let tearing. But when i check the recording, i see a skipped frame instead of the torn frame. There is probably some logic to it....
 

Attachments

  • 1541273507801.png
    1541273507801.png
    995.2 KB · Views: 14
Last edited:

Suslik V

Active Member
...I have let the GPU force vsync:off and let tearing. But when i check the recording, i see a skipped frame instead of the torn frame...
You want to say, here, that the previous frame was doubled not just skipped. Am I right?


About the obs process priority, I think it has more influence on encoding (when using software x264) rather than capturing.
My thoughts (@Jim may correct me if it completely different, the way how it works) are next:

Capturing is something like:
it's time to get new image, can we copy it? Yes -> copy it to obs texture;
it's time to get new image, can we copy it? Still not ready, wait a bit, PC is busy... -> but it is time to feed something to obs, OK, just copy previous one (frame double in capture).

Encoding (mostly done by FFmpeg itself):
there is sample in the buffer, it is time to encode it. Is it encoded (encoding complete)? Yes -> OK send it to the file (muxer), you may overwrite encoded sample in the buffer;
there is sample in the buffer, it is time to encode it. Is it encoded (encoding complete)? Still not ready, wait a bit, PC is busy...
-> but there is other samples in the buffer. Is buffer full? No. -> OK, let's wait a bit more (lagged frames).
-> but there is other samples in the buffer. Is buffer full? Yes. -> OK, time to skip some samples. You may flush the buffer data (skipped frames).

Edit: https://obsproject.com/docs/backend-design.html#general-video-pipeline-overview - there is few words how you can get skipped frames, and it says about the frame double. I don't understand how frame can be skipped and doubled simultaneously (from this description). But this the best what I found here.
 
Last edited:

I3ordo

Member
You want to say, here, that the previous frame was doubled not just skipped. Am I right?
Well, at that time,i did not go frame by frame to see if it was a drop or a double...it was not a torn frame,
it's time to get new image, can we copy it? Still not ready, wait a bit, PC is busy... -> but it is time to feed something to obs, OK, just copy previous one (frame double in capture).
Now this is the part i am most concerned about, the "ok , just copy previous one" part should be reported to user in somewhere, for example the stats window should report that but it does not and the recording misses game frames while OBS rendering statys %100 consistent.

By the way, i have always been looking at "GPU load" in GPUZ to check if my GPU was overloaded but that was the wrong area... the right area to check the overload is here:
1541408120107.png

The skipped/doubled frames occur when "Copy" hits 99+%,

so this image makes sense now:
1541408628081.png as the GPUZ report only GPu's 3d load but not the "copy" engine's load whereareas, task manager does the "right thing" and report the highest usage of GPU's any component.

Found this :
"Straight from the DirectX Developer Blog: "
A GPU engine represents an independent unit of silicon on the GPU that can be scheduled and can operate in parallel with one another. For example, a copy engine may be used to transfer data around while a 3D engine is used for 3D rendering. While the 3D engine can also be used to move data around, simple data transfers can be offloaded to the copy engine, allowing the 3D engine to work on more complex tasks, improving overall performance. In this case both the copy engine and the 3D engine would operate in parallel.

I guess this is the part OBS gets the "game video texture" from, and this is the part that fails for me and its consistency cant be tracked by OBS, @Jim ?
 
Last edited:

KanniX

New Member
Hi everyone, yesterday i ran into the same problem . My GPU-copy engine did overload when i started the twitch stream. after 4 hours of troubleshooting i managed to solve that issue.

i did multiple changes on my obs settings and settings on my twitch dashboard.

i changed the bitrate, startet obs as administrator , i changed the encoder preset to performance. All that didnt fix the problem.
Then i did shutdown browsersources when invisble. didnt work

then i uninstalled all extension on my streamelements dashboard, nothing

i did uncheck !songrequest.

the problem were solved.

my guess is: using !sonrequest in addition to the advanced setting: enable browser source hardware accelelation is offloading youtube sources to GPU . to be currently , it`ll surely moving lots of data around, causing the copy going 100% everytime its refreshing the playlist.

Also after disable songrequests, my obs went down from 18 browser-pages to 7.
 
Top