Question / Help Stuttering at 60fps (workaround found)

tbob18

New Member
I'm getting some stuttering at 60fps, it doesn't matter if I'm recording at 1080p, 480p or what bitrate I'm using, it happens with VBR, CBR 1000kb/s and 100000kb/s. No dropped frames, but it stutters occasionally no matter what settings I try.

At first I thought it was a problem with VCE but I decided to get the latest official build and found it also happens with x264, it does not happen with other software but OBS seems to have the least overhead so I'd prefer to use it. :)

Here is my log:
https://gist.github.com/d1779204ba7fb393ee55

I can upload another video but this is what happens (although this was VCE, it also happens with x264 using the official build): http://youtu.be/cuqQhZjDt3o
Use Chrome for 60fps

My settings are attached.

Any help would be appreciated. Thanks.

Edit:
Workaround:
If you are getting stuttering (on the recording only) use this:
http://www.monitortests.com/forum/Thread-Custom-Resolution-Utility-CRU
Open CRI and make sure your monitor is set to 60hz (not 59.950). if it isn't, change it to 60hz and reboot.

This will not do anything for in-game stuttering, if you are getting in-game stuttering you are probably over working your GPU or CPU.

New video:
https://www.youtube.com/watch?v=F1lJT01jf8Q
For whatever reason, it stutters in Chrome for me but in IE11 it is perfectly smooth.
 

Attachments

  • 1.jpg
    1.jpg
    89.8 KB · Views: 376
  • 2.jpg
    2.jpg
    52.4 KB · Views: 348
  • 3.jpg
    3.jpg
    56.1 KB · Views: 320
Last edited:

alpinlol

Active Member
in my opinion its a problem with the 7900 and 7800 series of amd cards since i had the 7870xt which was technically the 7950 and i also hat those kind of choppy frames as soon as i tried streaming/recording with 60 fps but i have no real arguement why or any real proof in my case i was about to buy a gtx 770 anyway since the amd card was for my lan machine since i bought it really really really damn cheap

btw the gtx770 fixed my problem but as already stated theres no proof this was the actual solution


you might try using above normal or even high on process priority @ advanced settings
 

tbob18

New Member
in my opinion its a problem with the 7900 and 7800 series of amd cards since i had the 7870xt which was technically the 7950 and i also hat those kind of choppy frames as soon as i tried streaming/recording with 60 fps but i have no real arguement why or any real proof in my case i was about to buy a gtx 770 anyway since the amd card was for my lan machine since i bought it really really really damn cheap

btw the gtx770 fixed my problem but as already stated theres no proof this was the actual solution


you might try using above normal or even high on process priority @ advanced settings

I tried that, no difference. However in game it is perfectly smooth. No stutters whatsoever and a solid 60fps all the time, only in the preview and recording are there any stutters.
 

alpinlol

Active Member
i know when i was trying it with my 7870xt i was playing wow with 150+ fps and streamed 720p60 i had stable fps no late or duplicated frames in my logs nothing just a choppy stream now and then and never this real 60fps "feeling" (on the stream obviously and this also counts for the local records)
 

tbob18

New Member
i know when i was trying it with my 7870xt i was playing wow with 150+ fps and streamed 720p60 i had stable fps no late or duplicated frames in my logs nothing just a choppy stream now and then and never this real 60fps "feeling" (on the stream obviously and this also counts for the local records)

Strange. I should try my old GTX 470 and see if the same thing happens.

Edit: As a test, I tried to disable vsync and the stuttering became much, much worse.
 
Last edited:

alpinlol

Active Member
mhm not sure about the gtx 4xx and 5xx series its worth a test but i only had a test machine of a mate with a gtx 660ti and even on his system it ran better even though my system was technically better and also performing way better ingame just the output of obs was worse on my end i really cant explain this i also had a postn open on this forum and in the end there was no real explanation other than something seems to be odd with 78xx and 79xx series or some other hardware within the combination maybe ram maybe the hdd who knows :/
 

Questwizard

New Member
I have the same problem with OBS as well. Even for my "very weak" AMD A8-4500M APU, 240p @ 60fps is easily doable without putting much strain on the CPU at all. I can guarantee this is not a problem with x264, as it happens even in preview mode with encoding disabled, regardless of OBS settings or capture type.

I've tried countless tweaks and combinations of settings, but the problem still persists. Every few seconds, a few frames get duplicated once, then everything goes back to normal for a few more seconds. It doesn't matter what game I'm capturing either. Even RetroArch with "Hard GPU Sync" turned on at a setting of 0 (every frame) and VSync turned on exhibits this issue. I run it at native 320x240 on my CRT monitor, with no doublescan or any other weirdness. There is no way missed frames should even be remotely possible at that point unless the fps drops below 60.0, which it doesn't.

What's even weirder, is the log always reports zero duplicated frames and maybe one or two late frames at an absolute max for a 40k+ frame recording. This has me thinking that perhaps there's a slight timing inaccuracy somewhere in OBS that's causing the capture plugins to capture the same frame twice. It doesn't matter what capture method you use either, it happens with all of them. I've watched quite a few 60fps streams on Twitch using multiple PCs and different devices, and every 60 fps stream I've seen that I know comes from OBS has this problem.

Every other capture software I've tried is 100% butter smooth. This includes FRAPS, Dxtory, HyperCam 2, and MSI Afterburner.

Just for the record, here's the specs:

PC: Gateway NV52L23u notebook
CPU: AMD A8-4500M APU
GPU: AMD Radeon HG 7640G, 512MB RAM
RAM: 6GB DDR3
OS: Windows 8

Edit: I set up a little test by outputting a series of test frames, which I recorded into a video file with another program and then tested to ensure it had no dropped/duplicate frames. I then played that file back in Media Player Classic Homecinema in D3D Fullscreen mode (640x480, 60Hz) with Accurate VSync on. OBS scene was 640x480, downscaled to 2.0 (320x240), 60 fps, using game capture. CPU didn't even break a sweat doing the encode, and the log reports zero issues, yet the video has missing/incorrect frames. The input video as viewed on my monitor was buttery smooth, with no hiccups whatsoever.

Here's the log from that session: http://pastebin.com/jFuNx5XD
Here is the resulting video file: http://questwizard.net/files/obs-60fpsframedropbugtest.flv (slightly too big to upload here even when zipped, so I uploaded it to my own storage)
 
Last edited:

Osiris

Active Member
I don't see any hiccups in the video that you posted. I played it in VLC with fraps on, no hiccups, constant 60fps
 

Questwizard

New Member
Yes, the playback fps itself is fine. Its exactly 60, just like the sample the OP posted. The problem is that some frames are missing or duplicated in the video itself to get that 60 frames per second. The problem is kind of like this:

0, 1, 1, 2, 3, 4, 6, 7, 8, 8, 9, 10 and so on...

Essentially, the actual OBS capture either misses the frames altogether, or happens to get the same frame twice in a row.
Its especially noticeable in the first pass of my test video, up until about frame 260-270. If you play the video in slow-motion or frame-by-frame, you'll see that certain frames are missing or duplicated. Same thing happens with the video the OP posted if you check it in slow-motion.

Whatever is causing this to happen has to be somewhere from the time the actual capture happens up to the scene being rendered before it is sent to the encoder, since this happens in preview as well.
 

tbob18

New Member
Yes, the playback fps itself is fine. Its exactly 60, just like the sample the OP posted. The problem is that some frames are missing or duplicated in the video itself to get that 60 frames per second. The problem is kind of like this:

0, 1, 1, 2, 3, 4, 6, 7, 8, 8, 9, 10 and so on...

Essentially, the actual OBS capture either misses the frames altogether, or happens to get the same frame twice in a row.
Its especially noticeable in the first pass of my test video, up until about frame 260-270. If you play the video in slow-motion or frame-by-frame, you'll see that certain frames are missing or duplicated. Same thing happens with the video the OP posted if you check it in slow-motion.

Whatever is causing this to happen has to be somewhere from the time the actual capture happens up to the scene being rendered before it is sent to the encoder, since this happens in preview as well.

Exactly. Nice test video, that shows exactly what I'm experiencing. It seems to affect mainly AMD GPU's in combination with OBS, I have yet to try an Nvidia card but I'll be sure to update when I do.
 

Osiris

Active Member
Yes, the playback fps itself is fine. Its exactly 60, just like the sample the OP posted. The problem is that some frames are missing or duplicated in the video itself to get that 60 frames per second. The problem is kind of like this:

0, 1, 1, 2, 3, 4, 6, 7, 8, 8, 9, 10 and so on...

Essentially, the actual OBS capture either misses the frames altogether, or happens to get the same frame twice in a row.
Its especially noticeable in the first pass of my test video, up until about frame 260-270. If you play the video in slow-motion or frame-by-frame, you'll see that certain frames are missing or duplicated. Same thing happens with the video the OP posted if you check it in slow-motion.

Whatever is causing this to happen has to be somewhere from the time the actual capture happens up to the scene being rendered before it is sent to the encoder, since this happens in preview as well.

Disable CFR
 

Questwizard

New Member
Just tried with CFR turned off. The result was exactly the same. That made no difference whatsoever.

I am on nvidia 675mx and have the same problem but only in OBS. Other apps are recording smoothly
Interesting. maybe its not AMD after all?

Edit: I just tried window capture with MPC-HC's normal fullscreen mode at 480p, downscaling to 240p just like the previous tests, and it had much less issues than game capture. There were only a couple dropped/duplicated frames, probably from the fact that MPC's VSync doesn't work well at all without D3D fullscreen enabled.

This is not an option for some of the stuff I plan to stream, since "fake" fullscreen can't VSync properly, which leads to very jittery movement, plus I can't set low desktop resolutions to get the same effect as fullscreen thanks to MS' ultra-retarded OS.

I'm thinking it has to mostly be an issue with game capture. I expect a single frame or so every once in a while to get missed, but missing tons of them for a couple seconds and none for like 5-7 seconds afterwards makes for an unwatchable video.
 
Last edited:

Osiris

Active Member
Well, I can't reproduce your problem with CFR off, made a few videos, none had missing or duplicate frames.
I checked them frame by frame and none of them were duplicated.
 

n3v3rm1nd

Member
i dont know what happened with obs but the issues with stuttering are getting more... i only have it with obs so my system seems fine
 

Questwizard

New Member
I ran a few tests with some games in RetroArch after tweaking its settings to fake a refresh rate of exactly 60.000000 despite my monitor being 120Hz at 320x240, forcing Hard GPU sync every frame and setting a VSync interval of 2 to force the FPS to 60 instead of 120. CFR was also off for all the tests I ran. The jitter is still there in recorded footage, although it wasn't as bad. What I saw on my screen as I was playing was 100% butter smooth, with absolutely no jitter.

If it takes this much dedication to getting proper sync and timing and OBS still can't capture it reliably, I have no idea what else to try at this point.

EDIT: It seems the best settings so far are to make sure you're VSync'ing at something that can multiply/divide to exactly 60Hz, like 30, 60, 120, etc., turn off CFR, turn off Multithreaded Optimizations, and set the process priority to High. If your monitor can do it, go for the 120Hz. It seems to help slightly for some reason, even if a game is capped at 60 fps. Avoid anything that's not a multiple entirely, like 75Hz or 85Hz. This combined with my syncing efforts from above got me a log of only two duplicated frames out of 18339, with zero being late. The video itself only had about 6-7 instances of stuttering as a whole, where with my original settings, it was happening around every 500 frames.

EDIT2: I decided to try one more test. I cranked the fps in OBS all the way to 120. I recorded two test videos, both around 10 minutes long. One was with the monitor set to 640x480@60Hz, and the other 640x480@120Hz. The game's FPS was still locked at 60 for both tests. CPU usage was basically the same as 60fps recording, though I'm recording retro console games, which are very easy to encode quickly. The 60Hz recording was a disaster, and stuttering is like above, around every 500 frames. The 120Hz recording still stutters every once in a while, but its almost not even noticeable since OBS gets two refreshes to catch each frame instead of one. Both recordings had a slight quality reduction compared to straight 60 fps recording, but would probably be much worse on non-retro games.

I'm not sure how twitch or other services would even handle 120fps, considering flash has a hard enough time maintaining 60fps as it is. I haven't tried streaming any of this yet, but I assume having CFR off might cause keyframe issues with Twitch wanting them exactly every 2 seconds?
 
Last edited:

tbob18

New Member
I ran a few tests with some games in RetroArch after tweaking its settings to fake a refresh rate of exactly 60.000000 despite my monitor being 120Hz at 320x240, forcing Hard GPU sync every frame and setting a VSync interval of 2 to force the FPS to 60 instead of 120. CFR was also off for all the tests I ran. The jitter is still there in recorded footage, although it wasn't as bad. What I saw on my screen as I was playing was 100% butter smooth, with absolutely no jitter.

If it takes this much dedication to getting proper sync and timing and OBS still can't capture it reliably, I have no idea what else to try at this point.

EDIT: It seems the best settings so far are to make sure you're VSync'ing at something that can multiply/divide to exactly 60Hz, like 30, 60, 120, etc., turn off CFR, turn off Multithreaded Optimizations, and set the process priority to High. If your monitor can do it, go for the 120Hz. It seems to help slightly for some reason, even if a game is capped at 60 fps. Avoid anything that's not a multiple entirely, like 75Hz or 85Hz. This combined with my syncing efforts from above got me a log of only two duplicated frames out of 18339, with zero being late. The video itself only had about 6-7 instances of stuttering as a whole, where with my original settings, it was happening around every 500 frames.

EDIT2: I decided to try one more test. I cranked the fps in OBS all the way to 120. I recorded two test videos, both around 10 minutes long. One was with the monitor set to 640x480@60Hz, and the other 640x480@120Hz. The game's FPS was still locked at 60 for both tests. CPU usage was basically the same as 60fps recording, though I'm recording retro console games, which are very easy to encode quickly. The 60Hz recording was a disaster, and stuttering is like above, around every 500 frames. The 120Hz recording still stutters every once in a while, but its almost not even noticeable since OBS gets two refreshes to catch each frame instead of one. Both recordings had a slight quality reduction compared to straight 60 fps recording, but would probably be much worse on non-retro games.

I'm not sure how twitch or other services would even handle 120fps, considering flash has a hard enough time maintaining 60fps as it is. I haven't tried streaming any of this yet, but I assume having CFR off might cause keyframe issues with Twitch wanting them exactly every 2 seconds?

Yeah, some settings can reduce it. A higher framerate almost eliminated it completely in the preview, but I wasn't able to get smooth playback as any player I tried would skip frames all over the place (MPCHC, XBMC, VLC).

Edit: Just popped in an Nvidia 8800GTX (after uninstalling the ATI drivers of course). Even though it is far less powerful, it has the same exact stuttering (I tried in 2d to make sure). I forgot my GTX 470 has artifacts so I'm not going to bother with it. Next thing to try is a fresh install (on a spare drive).

Edit2: Decided to play around with custom resolutions in the Nvidia panel. Created a custom resolution with a refresh rate of 59hz and set OBS to 640x480 59fps. Zero stuttering, absolutely flawless.

Went back to 60hz/60fps, stutters again. Tried 61hz/61fps, 59hz/60fps, 60hz/59fps, 61hz/59fps, 59hz/61fps, and they all stutter. Only 59hz/59fps is smooth.

Whatever this means, I do not know. But I do know that I'll be playing with 59hz a bit more.

Edit3: It worked on my 7950 too! I'm using this program for custom resolutions:
http://www.monitortests.com/forum/Thread-Custom-Resolution-Utility-CRU
My monitor was being detected at 59.950hz, I changed it to 60hz and tried again, but it didn't seem to make any difference. 59.000hz still works fine though.

I'm not sure how 59fps will play on Youtube, playback when at 60hz stutters quite a bit.

Edit4: Scratch that, 60hz works fine! Use the CRU reset-all to reset everything, then use CRU to change 59.950 to 60fps and reboot. Perfectly smooth now at 60hz/60fps! no noticable stuttering for ~10,000 frames.

New test video incoming. :)
 
Last edited:

Questwizard

New Member
I was using the DALNonStandardModes registry hack method to add my custom resolutions. I deleted my 320x240@120Hz setting from that registry key, ran the reset-all, and added 320x240 into the top section, and changed settings until it read exactly 120.000Hz. I rebooted and RetroArch detected an average of 59.999Hz over 2048 frames. I tried recording, and only had one 10-15 second long section that stuttered in a 20k frame recording. That one section stuttered much more severely than before, but after that, it was fine. Log showed zero duplicated, yet tons of frames were duplicated or missed in that one section.

This is still a major problem with OBS. Every other recording software I've used works perfectly without extreme refresh rate tweaking. I'd bet its basing the capture timing off whatever the OS reports the refresh rate to be, which is guaranteed to be a blatant lie on Windows (For example, if your real refresh is 59.977207Hz, Windows will lie and report it as 60.000000. The only reason this tweak somewhat works is because you're forcing the monitor to the exact BS refresh rate Windows would be reporting. Best fix I can think of for this problem is to allow non-whole number framerates. I have no idea why it isn't there already given that people use capture cards from real consoles that might output 29.97 or 59.94Hz signals, leading to odd stutter because it gets rounded to 60, causing periods where frames are missed or sent to the encoder twice. One thing I learned when taking a class on coding in DirectX was to never rely on anything it or Windows reports as the refresh rate, because its rarely ever accurate.
 
Last edited:

tbob18

New Member
Yeah, that would be the proper solution. But this works for now and at least it is possible to capture without stuttering. I much prefer OBS with VCE over any other program I've used because of the very small overhead (yes that includes dxtory or similar using openencodevfw).

Maybe try 60.001 or whatever it takes to show an average of 60.000? It shouldn't stutter at all. I've recorded about 30,000 frames in one recording without any stuttering.

Edit:
New video:
https://www.youtube.com/watch?v=F1lJT01jf8Q
Youtube has some heavy compression which causes other issues, but it is much more acceptable.
 
Last edited:

Questwizard

New Member
I tried tweaking mine again and it still won't go any better than a 10-15 second stutter every few minutes. I guess I'll have to stick with that until they fix the bug that's causing the sync issues. I haven't started streaming anything on these settings yet, so hopefully it'll be fixed by the time I do.
 
Top