Bug Report Video Stuttering at 60fps

I'm expiriecing stuttering (video, not audio) every few seconds with OBS at 60fps.

In my scene are the following capture sources: LiveGamer HD, a Logitech C910, images and Window capture. I've been googling this for a while now and know that monitor capturing is/was evil, but even after removing all sources but the LiveGamer HD it's stuttering every few seconds and there are very few to no frame drops.

When using the RECentral software to stream or record I get perfect 60fps. I tried to set video buffering to 200ms in the device settings in OBS, but that made things even worse.

The stuttering also appears in the preview mode alone. Coding while previewing is disabled.

I'm streaming Wii/WiiU/Xbox360/PS3 ... my PC has all it's power for streaming alone.

UPDATE:
I just did a test with VirtualDub's capture mode and it's rendering perfect 60fps without any stuttering.

11:42:38: Open Broadcaster Software v0.541b - 64bit ( ^ω^)
11:42:38: -------------------------------
11:42:38: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
11:42:38: CPU Speed: 3400MHz
11:42:38: Physical Memory: 16270MB Total, 11903MB Free
11:42:38: stepping id: 9, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
11:42:38: monitor 1: pos={0, 0}, size={2560, 1440}
11:42:38: monitor 2: pos={-2560, 0}, size={2560, 1440}
11:42:38: Windows Version: 6.2 Build 9200
11:42:38: Aero is Enabled
11:42:38: -------------------------------
11:42:38: OBS Modules:
11:42:38: Base Address Module
11:42:38: 0000000030CE0000 OBS.exe
11:42:38: 00000000BF1E0000 OBSApi.dll
11:42:38: 00000000C6960000 DShowPlugin.dll
11:42:38: 00000000CAE40000 GraphicsCapture.dll
11:42:38: 00000000C6940000 NoiseGate.dll
11:42:38: 00000000C6920000 PSVPlugin.dll
11:42:38: ------------------------------------------
11:42:38: Adapter 1
11:42:38: Video Adapter: NVIDIA GeForce GTX 580
11:42:38: Video Adapter Dedicated Video Memory: 3133833216
11:42:38: Video Adapter Shared System Memory: 3967252480
11:42:38: ------------------------------------------
11:42:38: Adapter 2
11:42:38: Video Adapter: Intel(R) HD Graphics 4000
11:42:38: Video Adapter Dedicated Video Memory: 33554432
11:42:38: Video Adapter Shared System Memory: 1711276032
11:42:38: =====Stream Start: 2013-07-13, 11:42:38===============================================
11:42:38: Multithreaded optimizations: On
11:42:38: Base resolution: 1920x1080
11:42:38: Output resolution: 1280x720
11:42:38: ------------------------------------------
11:42:38: Loading up D3D10...
11:42:38: Playback device Default
11:42:38: ------------------------------------------
11:42:38: Using desktop audio input: Lautsprecher (Realtek High Definition Audio)
11:42:38: ------------------------------------------
11:42:38: Using auxilary audio input: Mikrofon (HD Pro Webcam C910)
11:42:38: ------------------------------------------
11:42:38: Audio Encoding: AAC
11:42:38: bitrate: 96
11:42:38: ------------------------------------------
11:42:38: device: AVerMedia HD Capture C985 Bus 6,
11:42:38: device id \\?\pci#ven_1af2&dev_a001&subsys_a0011af2&rev_00#4&443610c&0&00e6#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{957bd672-7934-4b55-b81a-3e22b14c679a},
11:42:38: chosen type: YV12, usingFourCC: true, res: 1280x800 - 1280x800, frameIntervals: 166666-666666, fourCC: 'YV12'
11:42:38:
11:42:38: Using directshow input
11:42:38: Using custom x264 settings: "opencl=true threads=8"
11:42:38: ------------------------------------------
11:42:38: Video Encoding: x264
11:42:38: fps: 60
11:42:38: width: 1280, height: 720
11:42:38: preset: veryfast
11:42:38: CBR: no
11:42:38: CFR: no
11:42:38: max bitrate: 2176
11:42:38: buffer size: 2176
11:42:38: quality: 5
11:42:38: ------------------------------------------
11:45:19: Total frames rendered: 9651, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
11:45:20: =====Stream End: 2013-07-13, 11:45:20=================================================
11:45:25:
11:45:25: Profiler results:
11:45:25:
11:45:25: ==============================================================
11:45:25: frame - [100%] [avg time: 2.477 ms (cpu time: avg 2.175 ms, total 21000 ms)] [avg calls per frame: 1] [children: 74.3%] [unaccounted: 25.7%]
11:45:25: | scene->Preprocess - [25.6%] [avg time: 0.633 ms (cpu time: avg 0.597 ms, total 5765.63 ms)] [avg calls per frame: 1]
11:45:25: | video encoding and uploading - [48.8%] [avg time: 1.208 ms (cpu time: avg 1 ms, total 9656.25 ms)] [avg calls per frame: 1] [children: 47.7%] [unaccounted: 1.09%]
11:45:25: | | CopyResource - [1.05%] [avg time: 0.026 ms (cpu time: avg 0.019 ms, total 187.5 ms)] [avg calls per frame: 0]
11:45:25: | | conversion to 4:2:0 - [0.121%] [avg time: 0.003 ms (cpu time: avg 0 ms, total 0 ms)] [avg calls per frame: 0]
11:45:25: | | call to encoder - [45.9%] [avg time: 1.138 ms (cpu time: avg 0.948 ms, total 9156.25 ms)] [avg calls per frame: 0]
11:45:25: | | sending stuff out - [0.565%] [avg time: 0.014 ms (cpu time: avg 0.019 ms, total 187.5 ms)] [avg calls per frame: 0]
11:45:25: | Convert444Threads - [1.34e+003%] [avg time: 33.142 ms (cpu time: avg 1.036 ms, total 10000 ms)] [avg calls per frame: 1]
11:45:25: ==============================================================
11:45:25:
 
Re: Video Stuttering

I turned off core parking, tested an older OBS version, played with the settings of my graphics card ... nothing helps.

As I already wrote it's stuttering every few seconds even in preview mode alone.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Does it still happen if you use "disable encoding while previewing" in advanced? Also while checking that, could you also turn off "Use Multithreaded Optimizations" there as well, and then give me a new log file of that sessions after doing that?
 
Jim said:
Does it still happen if you use "disable encoding while previewing" in advanced?

Yes.

Jim said:
Also while checking that, could you also turn off "Use Multithreaded Optimizations" there as well, and then give me a new log file of that sessions after doing that?

Sure, but it really doesn't matter. It's always stuttering every few seconds. I've been playing with all the settings and I read all about what they do (here in the forums).

I just payed 15$ for XSplit in hope to fix this, but guess what XD ... ByeBye 15$. The same thing happens with XSplit :D ...

Now, since it also happens with XSplit one could think the card is broken or something, right? Well, no. It's still perfect 60fps with VirtualDub.

I have the latest drivers installed and the latest firmware.

The next thing I'll try: Capture VirtualDub's window with OBS :D ... and see if it's stuttering.

Here is the log:
Code:
17:59:35: Open Broadcaster Software v0.541b - 64bit ( ^ω^)
17:59:35: -------------------------------
17:59:35: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
17:59:35: CPU Speed: 3400MHz
17:59:35: Physical Memory:  16270MB Total, 12889MB Free
17:59:35: stepping id: 9, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
17:59:35: monitor 1: pos={0, 0}, size={2560, 1440}
17:59:35: monitor 2: pos={-2560, 0}, size={2560, 1440}
17:59:35: Windows Version: 6.2 Build 9200 
17:59:35: Aero is Enabled
17:59:35: -------------------------------
17:59:35: OBS Modules:
17:59:35: Base Address     Module
17:59:35: 00000000D1610000 OBS.exe
17:59:35: 00000000B62F0000 OBSApi.dll
17:59:35: 00000000C0570000 DShowPlugin.dll
17:59:35: 00000000CE320000 GraphicsCapture.dll
17:59:35: 00000000C96F0000 NoiseGate.dll
17:59:35: 00000000C9680000 PSVPlugin.dll
17:59:35: ------------------------------------------
17:59:35: Adapter 1
17:59:35:   Video Adapter: NVIDIA GeForce GTX 580
17:59:35:   Video Adapter Dedicated Video Memory: 3133833216
17:59:35:   Video Adapter Shared System Memory: 3967252480
17:59:35: ------------------------------------------
17:59:35: Adapter 2
17:59:35:   Video Adapter: Intel(R) HD Graphics 4000
17:59:35:   Video Adapter Dedicated Video Memory: 33554432
17:59:35:   Video Adapter Shared System Memory: 1711276032
17:59:35: =====Stream Start: 2013-07-15, 17:59:35===============================================
17:59:35:   Multithreaded optimizations: On
17:59:35:   Base resolution: 1920x1080
17:59:35:   Output resolution: 1280x720
17:59:35: ------------------------------------------
17:59:35: Loading up D3D10...
17:59:35: Playback device Default
17:59:35: ------------------------------------------
17:59:35: Using desktop audio input: Lautsprecher (Realtek High Definition Audio)
17:59:35: ------------------------------------------
17:59:35:     device: AVerMedia HD Capture C985 Bus 6,
17:59:35:     device id \\?\pci#ven_1af2&dev_a001&subsys_a0011af2&rev_00#4&443610c&0&00e6#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{957bd672-7934-4b55-b81a-3e22b14c679a},
17:59:35:     chosen type: YV12, usingFourCC: true, res: 1280x720 - 1280x720, frameIntervals: 166666-666666, fourCC: 'YV12'
17:59:35: 
17:59:35: Using directshow input
18:00:14: Total frames rendered: 2333, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
18:00:14: =====Stream End: 2013-07-15, 18:00:14=================================================
18:00:25: =====Stream Start: 2013-07-15, 18:00:25===============================================
18:00:25:   Multithreaded optimizations: Off
18:00:25:   Base resolution: 1920x1080
18:00:25:   Output resolution: 1280x720
18:00:25: ------------------------------------------
18:00:25: Loading up D3D10...
18:00:25: Playback device Default
18:00:25: ------------------------------------------
18:00:25: Using desktop audio input: Lautsprecher (Realtek High Definition Audio)
18:00:25: ------------------------------------------
18:00:25: Audio Encoding: AAC
18:00:25:     bitrate: 96
18:00:25: ------------------------------------------
18:00:25:     device: AVerMedia HD Capture C985 Bus 6,
18:00:25:     device id \\?\pci#ven_1af2&dev_a001&subsys_a0011af2&rev_00#4&443610c&0&00e6#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{957bd672-7934-4b55-b81a-3e22b14c679a},
18:00:25:     chosen type: YV12, usingFourCC: true, res: 1280x720 - 1280x720, frameIntervals: 166666-666666, fourCC: 'YV12'
18:00:25: 
18:00:25: Using directshow input
18:00:25: ------------------------------------------
18:00:25: Video Encoding: x264
18:00:25:     fps: 60
18:00:25:     width: 1280, height: 720
18:00:25:     preset: veryfast
18:00:25:     CBR: yes
18:00:25:     CFR: no
18:00:25:     max bitrate: 2688
18:00:25: ------------------------------------------
18:01:12: Total frames rendered: 2784, number of frames that lagged: 1 (0.04%) (it's okay for some frames to lag)
18:01:12: =====Stream End: 2013-07-15, 18:01:12=================================================
18:01:19: 
18:01:19: Profiler results:
18:01:19: 
18:01:19: ==============================================================
18:01:19: frame - [100%] [avg time: 1.707 ms (cpu time: avg 1.56 ms, total 7984.38 ms)] [avg calls per frame: 1] [children: 67.7%] [unaccounted: 32.3%]
18:01:19: | scene->Preprocess - [31.5%] [avg time: 0.538 ms (cpu time: avg 0.516 ms, total 2640.63 ms)] [avg calls per frame: 1]
18:01:19: | video encoding and uploading - [36.1%] [avg time: 0.617 ms (cpu time: avg 0.613 ms, total 3140.63 ms)] [avg calls per frame: 1] [children: 34.9%] [unaccounted: 1.23%]
18:01:19: | | CopyResource - [0.0586%] [avg time: 0.001 ms (cpu time: avg 0 ms, total 0 ms)] [avg calls per frame: 0]
18:01:19: | | conversion to 4:2:0 - [14.9%] [avg time: 0.254 ms (cpu time: avg 0.259 ms, total 1328.13 ms)] [avg calls per frame: 0]
18:01:19: | | call to encoder - [19.6%] [avg time: 0.335 ms (cpu time: avg 0.341 ms, total 1750 ms)] [avg calls per frame: 0]
18:01:19: | | sending stuff out - [0.351%] [avg time: 0.006 ms (cpu time: avg 0.003 ms, total 15.625 ms)] [avg calls per frame: 0]
18:01:19: ==============================================================
18:01:19:
 
I can't capture VirtualDub with obs -.- ...

Kharay said:
Could you link to a VOD that shows this stutter?

I've uploaded a file for you:
http://sickbattery.name/files/videos/stuttering.mp4

Try 0:54 and wait for 0:57. Watch it in fullscreen.

In VirtualDub you can see the framerate in the down right corner. Most of the time it's 60 but sometimes it jumps between 59 and 61, rarely between 58 and 62. It's also in that order 59, then 61 or 58 then 62. Maybe that is causing it? However VirtualDub doesn't stutter ...
 

Kharay

Member
I watched it several times, that particular section and... well, looks fine. I mean, it may be dropping a single frame but, to call it a stutter? As per the most recent log file you posted -- 1 frame lagged. Well, we're talking about real time encoding and streaming here. It's not too weird for 1 frame here and there to lag or drop.

Honestly, the example you gave me really does look fine. If anything, the encoding quality could use a bit of work but the framerate is perfectly acceptable and watchable.
 
Kharay said:
I watched it several times, that particular section and... well, looks fine. I mean, it may be dropping a single frame but, to call it a stutter?

It's micro stuttering that sometimes stutters for a second, which I didn't capture in my video.

Ok, I'm giving up on this -_- ... it might be my gamer eye, that I see this so much.

When others don't care, why should I? I'm just peeking at the steam while playing, I don't really watch it live. But remember: It's also in the preview mode. It might be a general timing issue in OBS. Or my card is broken :D ...
 
R1CH said:
Try removing those x264 custom settings.

Occures also in preview. x264 shouldn't have anything to do with this. I already tried with these paramters removed. It's nothing that I can fix with settings. As I said it's also in XSPlit. I guess the AverMedia LiveGamer HD isn't innocent on this "bug" ... and VirtualDub is doing some colorful magic to make it work :).

I'll just stream at 30fps for now and use 60fps with the RECentral when playing games like Mario Kart Wii.

Thanks.

Edit:
Btw. I can't set 59.94Hz on the device settings on my LGHD ... as I read in the XSplit forums that removed the bug. It's also not possible to set 59.94fps in OBS.
 
Ok. I thought about it again.

I'm a developer myself and I took a look at the obs source code. When creating the SwapChain, I don't see any paramter set for the refresh rate. Because of that the swapchain is probably running at what it auto detects: 59.94 fps because my monitor is running at 59.94. (NVidia shows 60, windows shows 59 and I googled why.) The main loop however is probably running full speed at 60fps.

These two parameters:
swapDesc.BufferDesc.RefreshRate.Denominator;
swapDesc.BufferDesc.RefreshRate.Numerator;

Can that be causing the stuttering? Well, since I read about ppl switching AverMedia LiveGamer HD to run at 59.94 and getting rid of the stuttering in XSplit (setting also 59.94 in XSplit itself, not just the driver)... it might be it :P ... ... because the source gives only 59 images, while OBS renders 60, rendering 1 of the 59 twice per second? because my AverMedia LiveGamer HD is running at 60 and the swapchain at 59.94 it misses a frame each second? (Is obs somehow working against the lost frame until it can't and then stutters more instead of every second once?)

The sad thing is, that I can't switch my AM LGHD to 59.94 anymore. Must have been a driver update that took away the possibility. At least I can't in VirtualDub (the option is there but it's not accepted).

I'd compile and run the code to test it myself and not just post untested thoughts -.- ... , but all I have is the express edition of VS for Windows 8 :( ... I'd also be happy if I could help with the development, but I need time to code on my own project :/ ...
 
Oh XD ... my fault. I have also VS 2010 for Windows Phone installed and as I tried to open the OBS-All.sln it opened in VS2010WP and I didn't notice XD ... just thought it's unsupported and quit, because I'm on my own project anyway oO ... and didn't want to investigate too much.

It just opens fine now ^^ ... I'll have to configure some lib and header folder paths and install the DX SDK ... ... ...

It's years ago that I've been doing some C++ stuff ...

I'll see what I can do, but it's long ago :P ... I'm still interested in C++, but it's long, long ago :D ... ... I'm 30 and the last time I was programming C++ I was 21? Don't expect too much! That's all I want to say :D.
 

jaakkom

New Member
I have same card and same problem. Been wondering about it for over a year now but nah I doubt it's ever getting fixed.
Try to complain on a forum and all you get is people answering problem is basically in your head.

If you are willing to look for other cards, I might recommend the Blackmagic Intensity Pro. It's not perfect either, but stutters significantly less.

Btw. I think LGHD stutters little bit less if you chain the picture through AmarecTV.
 
Top