Question / Help Everything in obs seems fine, but stream is choppy on twitch

assrace

New Member
Hello,

I am streaming for about 1,5 year now but recently my stream has become very choppy or laggs every 3 or 4 seconds.
obs says that there is no framerate drop and the box is always green around 3000 kb/s.
I hope somebody has the solution, my pc specs are pretty good, so i am very confident that i can stream at 60 fps and 720p. Also the logg says that i have 4gb of physical memory or RAM, but in reality i have 16gb.
my gpu actually is: Nvidia Geforce GTX 670 Zotac AMP edition
my internet: http://www.speedtest.net/my-result/3028813190

my logg from my recent stream:

Code:
16:13:24: Open Broadcaster Software v0.571b - 32bit (´・ω・`)
16:13:24: -------------------------------
16:13:24: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
16:13:24: CPU Speed: 3430MHz
16:13:24: Physical Memory:  4095MB Total, 4095MB Free
16:13:24: stepping id: 9, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
16:13:24: monitor 1: pos={-1680, 0}, size={1680, 1050}
16:13:24: monitor 2: pos={0, 0}, size={1920, 1080}
16:13:24: Windows Version: 6.1 Build 7601 S
16:13:24: Aero is Disabled
16:13:24: -------------------------------
16:13:24: OBS Modules:
16:13:24: Base Address     Module
16:13:24: 013C0000         OBS.exe
16:13:24: 67490000         OBSApi.dll
16:13:24: 67AC0000         DShowPlugin.dll
16:13:24: 67AA0000         GraphicsCapture.dll
16:13:24: 67A50000         NoiseGate.dll
16:13:24: 67A30000         PSVPlugin.dll
16:13:24: ------------------------------------------
16:13:24: Adapter 1
16:13:24:   Video Adapter: NVIDIA GeForce GTX 670
16:13:24:   Video Adapter Dedicated Video Memory: 2087387136
16:13:24:   Video Adapter Shared System Memory: 2147807232
16:13:24: =====Stream Start: 2013-10-14, 16:13:24===============================================
16:13:24:   Multithreaded optimizations: On
16:13:24:   Base resolution: 1920x1080
16:13:24:   Output resolution: 1280x720
16:13:24: ------------------------------------------
16:13:24: Loading up D3D10 on NVIDIA GeForce GTX 670...
16:13:24: ------------------------------------------
16:13:24: Audio Format: 48000hz
16:13:24: Playback device {0.0.0.00000000}.{da5fc86a-a84e-4ee6-bb3b-6838681e9f47}
16:13:24: ------------------------------------------
16:13:24: Using desktop audio input: Luidsprekers (VIA High Definition Audio)
16:13:24: ------------------------------------------
16:13:24: Using auxilary audio input: Microfoon (VIA High Definition Audio)
16:13:24: ------------------------------------------
16:13:24: Audio Encoding: AAC
16:13:24:     bitrate: 160
16:13:24: Using graphics capture
16:13:24: ------------------------------------------
16:13:24: Video Encoding: x264
16:13:24:     fps: 60
16:13:24:     width: 1280, height: 720
16:13:24:     preset: veryfast
16:13:24:     profile: high
16:13:24:     keyint: 250
16:13:24:     CBR: yes
16:13:24:     CFR: yes
16:13:24:     max bitrate: 3000
16:13:24:     buffer size: 3000
16:13:24: ------------------------------------------
16:13:24: MMDeviceAudioSource: Frequency for device 'Luidsprekers (VIA High Definition Audio)' is 384000, samples per sec is 48000
16:13:24: MMDeviceAudioSource: Frequency for device 'Microfoon (VIA High Definition Audio)' is 384000, samples per sec is 48000
16:13:24: SharedTexCapture hooked
16:13:36: Using RTMP service: Twitch / Justin.tv
16:13:36:   Server selection: rtmp://live-ams.justin.tv/app
16:13:36:   Interface: Atheros AR8151 PCI-E Gigabit Ethernet Controller (NDIS 6.20) (ethernet, 100 mbps)
16:13:37: Completed handshake with rtmp://live-ams.justin.tv/app in 338 ms.
16:13:38: SO_SNDBUF was at 8192
16:13:38: SO_SNDBUF is now 65536
16:16:42: Total frames encoded: 11796, total frames duplicated: 11 (0.09%)
16:16:42: Total frames rendered: 11804, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
16:16:49: RTMPPublisher::SocketLoop: Graceful loop exit
16:16:50: Average send payload: 5987 bytes, average send interval: 15 ms
16:16:50: Number of times waited to send: 0, Waited for a total of 0 bytes
16:16:50: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
16:16:50: Number of bytes sent: 75570991
16:16:50: 
16:16:50: Profiler time results:
16:16:50: 
16:16:50: ==============================================================
16:16:50: video thread frame - [100%] [avg time: 0.578 ms] [children: 0.173%] [unaccounted: 99.8%]
16:16:50: | scene->Preprocess - [0.173%] [avg time: 0.001 ms]
16:16:50: GPU download and conversion - [100%] [avg time: 0.126 ms] [children: 83.3%] [unaccounted: 16.7%]
16:16:50: | flush - [72.2%] [avg time: 0.091 ms]
16:16:50: | CopyResource - [9.52%] [avg time: 0.012 ms]
16:16:50: | conversion to 4:2:0 - [1.59%] [avg time: 0.002 ms]
16:16:50: Convert444Threads - [100%] [avg time: 0.495 ms] [children: 99%] [unaccounted: 1.01%]
16:16:50: | Convert444toNV12 - [99%] [avg time: 0.49 ms]
16:16:50: encoder thread frame - [100%] [avg time: 0.97 ms]
16:16:50: ==============================================================
16:16:50: 
16:16:50: 
16:16:50: Profiler CPU results:
16:16:50: 
16:16:50: ==============================================================
16:16:50: video thread frame - [cpu time: avg 0.06 ms, total 717.605 ms] [avg calls per frame: 1]
16:16:50: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
16:16:50: GPU download and conversion - [cpu time: avg 0.027 ms, total 327.601 ms] [avg calls per frame: 1]
16:16:50: | flush - [cpu time: avg 0.01 ms, total 124.8 ms] [avg calls per frame: 1]
16:16:50: | CopyResource - [cpu time: avg 0.009 ms, total 109.201 ms] [avg calls per frame: 1]
16:16:50: | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
16:16:50: Convert444Threads - [cpu time: avg 0.401 ms, total 9438.06 ms] [avg calls per frame: 2]
16:16:50: | Convert444toNV12 - [cpu time: avg 0.4 ms, total 9406.86 ms] [avg calls per frame: 2]
16:16:50: encoder thread frame - [cpu time: avg 0.319 ms, total 3759.62 ms] [avg calls per frame: 1]
16:16:50: ==============================================================
16:16:50: 
16:16:50: =====Stream End: 2013-10-14, 16:16:50=================================================


Last game capture log:
2013-10-14, 16:13:24: we're booting up: 
16:13:24: NV Capture available
16:13:24: FBO available
16:13:24: GL Present
16:13:24: (half life scientist) everything..  seems to be in order
16:13:24: SwapBuffers(4278261985) Called
16:13:24: setting up gl data
16:13:24: share device: 1143688084
16:13:24: share texture: 1187183416
16:13:24: share device handle: 3231202446
16:13:24: share texture handle: 4026105506
16:13:24: DoGLGPUHook: success
16:13:24: wglSwapBuffers(4278261985) Called
16:16:42: stop requested, terminating gl capture
16:16:42: ---------------------- Cleared OpenGL Capture ----------------------
16:16:42: wglSwapBuffers(4278261985) Called
16:16:42: setting up gl data
16:16:42: SwapBuffers(4278261985) Called
 

FerretBomb

Active Member
Re: Everything in obs seems fine, but stream is choppy on tw

The reason OBS only sees 4GB is because you're using the 32-bit version. Try the 64-bit instead (it's faster too).

The reason you're getting stutter is almost definitely on your viewers' end. You're casting at 3000kbps, which is significantly above the recommended 2000kbps limit for non-partnered streamers. Most of your viewers will not have the dedicated constant downstream required to watch your stream smoothly, and the Twitch back-end may have trouble keeping up with that ingest (the hard-cap is 3500kbps). Anything over 2000 is recommended only if you are a partnered streamer, and have transcoding options available.

Your keyint is also significantly higher than it should be (at 60fps, it should be 120 at most, at 30fps it should be no higher than 60) which is also probably causing problems. I'd also recommend dropping your AAC audio rate to 96kbps or 128 at most; anything higher is very unlikely to make any noticeable difference, but only make the stuttering problem worse.
 

assrace

New Member
Re: Everything in obs seems fine, but stream is choppy on tw

thank you FerretBomb for the quick reply,
Now i am using the 64-bit version and I lowerd my maxbitrate to 2000kb/s, just like my buffer.
I also lowered my audio bitrate to 128.
the only thing i cant seem to figure out is the keyint, how can i change it? or is it the same as keyframe?
Anyways I tested my stream and it went pretty smoothwith some small, tiny laggspikes.
stream page: http://nl.twitch.tv/assrace
 

alpinlol

Active Member
Re: Everything in obs seems fine, but stream is choppy on tw

advanced>keyframe interval and there you put a simple 2 thats the end of the story.

and actually as long as you dont drop frames its literally only twitchs fault since they tend to suck probably the last 4 months+ for european streamers and viewers also. obviously as long as you dont use some fanzy obs settings ;D
 

FerretBomb

Active Member
Re: Everything in obs seems fine, but stream is choppy on tw

Also, you can set keyframe interval to 1 if you get the detection issue (where it says you're only sending at every 2.07 or 2.6 seconds or whatnot). You can also use manual keyint settings in the h264 custom settings to go slightly shorter, but generally it's easier to just use a keyframe interval of 1 (IF the detection gives you grief... otherwise leave it set at 2).

Yeah, if you're running at 720p@30fps you can get by with pretty good quality at 1500kbps and eliminate most of those little lagspikes. High bitrate is needed for good quality, but it'll also increase the stutter for a good portion of your viewer base. It's a real catch 22.
 

dodgepong

Administrator
Community Helper
Re: Everything in obs seems fine, but stream is choppy on tw

Generally, enabling CFR fixes the detection issue. If you're still sending wrong keyframes with CFR enabled, you might have some late frames showing up in your log.
 
Top