Question / Help Intermittent Hanging Frames//Recording

MisterDeadeye

New Member
I recently switched from OBS to OBS Studio to get an updated UI and some QoL things, and because OBS is just legacy at this point. I use OBS for recording gameplay, and as such, I like to keep the quality as high as possible. Since I switched to Studio, the only game I've recorded is Hollow Knight, obviously not a very taxing game. I did test a recording of GTA V with my normal in-game settings, and the recording was a little laggy, but that's expected and if I was going to do an actual recording, I'd just change the encoding settings a bit.

Anyway, I've been recording as MP4, using x264 with a CRF of 5, CPU set to ultrafast, at 1080p60. I recorded about a 35 minute video of a new game today, Sundered(which ended up being 36GB, taking 5 minutes to conform in Premiere). I realized that occasionally, the game would hang for a moment, resulting in a dropped frame or two each time. This happened several times throughout the recording, I was debating whether or not I should upload the footage, or if I should change some settings and do it over.

I raised the CRF from 5 to 8, opened up task manager's utilization tab, and HWMonitor to show me percentage loads on both the CPU and GPU. My assumption was that my CPU was bottlenecking resulting in the lost frames, due to the way I've set it to encode. I went back in, started a new recording, and went on my way. Again, when enemies started spawning in as hordes, I noticed the dropped frames again. Throughout my recording, my GPU never went past 50% period, including VRAM and frame buffer, and the CPU only went up to 60% while I was loading the map(procedural generation). My temps were fine, no clock speeds suddenly dropped any significant amount, etc.

So, now I come here. To clarify, when this "hanging" occurs, it happens in-game as well. Despite the low utilization and stability in the resource monitors I used, is this just a simple encoding issue?

Log(wrong log, there was no log created for this video): https://gist.github.com/anonymous/f975c54e49f214fb2bc8c1666e3fa924

Sample:

EDIT: The log included is actually from an eleven second recording that I did right before I recorded the video I've included. I'm not sure why that one was uploaded, as I closed OBS and started typing this up before opening it back up and getting the log. I've just gone through all of the archived logs I have, and there are no logs for any of my extended recording sessions. I've got logs from yesterday, logs from the short recordings I've made since starting this post, but there is no log for my 35 minute recording or the 7 minute one I used to show you what's happening. Anyone know why that would be? OBS didn't crash, though even if it had, I'm sure it would have ended the log.
 
Last edited:

MisterDeadeye

New Member
Straight up you're overloading your cpu.

That's what I thought too, but it's doing the same thing with a CRF of 30. Like I said earlier, recording GTA V at a CRF of 5 was watchable, though obviously it was dropping frames pretty consistently in the recording itself(it felt like I was watching at a solid 30-40fps). I've recorded plenty of games with a CRF ranging from 5 to 10, and I've never had the issue I'm describing here. Not one of my games has ever lagged; if there's ever been an encoding issue, it's always presented itself in the recording only.

Maybe the problem is the game itself? The guys who developed it have only done one game before this, so maybe it's just unoptimized, and that's the issue. There was no lag when I wasn't recording, and I could most likely get rid of the issue if I was using a 7700K or something, but I refuse to record at 720, and I haven't had to do so for literally anything I've recorded. A 2GB indie game shouldn't be the exception. It doesn't make sense.
 

MisterDeadeye

New Member
Changing crf values don't actually affect cpu use.

So you're still just flat out saying that I need to record at a lower resolution or framerate? Despite the fact that I can record many other games with higher requirements and higher utilization across the board? I can record Black Ops 3 and Infinite Warfare at 1080p60, same settings I mentioned in the OP. I can record PSX emulators at 1080p60 with the same settings I mentioned in the OP. In both of these, my CPU usage is well over 70%. Hell, recording GTA V does show a bit of lag/dropped frames, but in that case, every core of my CPU maxes out and the overall usage gets to 99%.

This game's system requirements are a 1.8GHz dual-core and integrated graphics. Their recommended requirements are a seven year old notebook i5 and a GT740. I've recorded several times since my last post, with performance monitor and HWMonitor both on my other monitor, and not a single thread is showing over 55% usage on the CPU. The realtime graph is showing no spikes. My clock speeds don't fluctuate beyond 3.5 and 3.7GHz. The CPU is not overloaded. I have a video recorded showing HWMonitor's max values across all 8 threads if you need me to. I can show you the resource monitor's realtime graphs for all 8 threads if you need me to. I don't know how much more I can elaborate on the fact that my CPU is not maxing out or underclocking or experiencing any abnormal spikes. Something else is happening. The log earlier that showed skipped frames was when I was launching the game and sitting at the main menu. It happened each time I recorded the main menu, and when I'm recording the game itself, the log doesn't show any skipped or lagged frames, despite the game hanging.

I've included a video of me going into GTA V and playing for 2 minutes with the exact same settings that I'm using in the previous video. Out of the 10.7k frames, 5 of them were skipped and 11 lagged, again, because I was actually maxing out my CPU/GPU. The lag you see in the video isn't the same hanging that you see in the first.

Log: https://gist.github.com/anonymous/da19b57463f5bd538e8c2b39d557f227

22:32:36.760: [ffmpeg muxer: 'adv_file_output'] Writing file 'D:/Videos/Recordings/2017-08-06 22-32-36.mp4'...
22:35:35.143: [ffmpeg muxer: 'adv_file_output'] Output of file 'D:/Videos/Recordings/2017-08-06 22-32-36.mp4' stopped
22:35:35.143: Output 'adv_file_output': stopping
22:35:35.143: Output 'adv_file_output': Total encoded frames: 10702
22:35:35.143: Output 'adv_file_output': Total drawn frames: 10703
22:35:35.143: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 11 (0.1%)
22:35:35.143: Video stopped, number of skipped frames due to encoding lag: 5/10704 (0.0%)

Video:
 

Harold

Active Member
Hell, recording GTA V does show a bit of lag/dropped frames, but in that case, every core of my CPU maxes out and the overall usage gets to 99%.

Then cap the framerate of your game down to the refresh rate of your display.
 

MisterDeadeye

New Member
Then cap the framerate of your game down to the refresh rate of your display.

The display is 144Hz and I'm getting ~55-60fps in GTA V. Do you have any useful information to give me here? I'd love to get some support on a support forum, but if you don't have any support to give, I'd appreciate if you posted in someone else's thread. Your responses have been ridiculously short and despite each of my posts elaborating further about what's happening, you just get further and further off track. I don't need help optimizing GTA V's graphics settings to play the game. I've been playing it for two years. I intentionally have the graphics settings as high as possible without making the game unplayable. And like I mentioned in the OP, I'm well aware and comfortable with the fact that recording GTA V with the settings I'm using both in-game and in OBS will lead to suboptimal results.

If you'd like to take a step back, read through the thread again, and come back with something more thoughtful than "choppy playback? CPU overload", I'd really appreciate it. If not, sayonara.
 
Top