Question / Help Lag spikes and random freezes while streaming on Twitch.

Bagz93

New Member
Hi, i just got a new net and decided to try streaming, my problem is that when i stream i have these lag spikes i have tried so many things but have yet to find a solution. Please help me :)

Code:
20:56:36: Open Broadcaster Software v0.584b - 32bit (´・ω・`)
20:56:36: -------------------------------
20:56:36: CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
20:56:36: CPU Speed: 3392MHz
20:56:36: Physical Memory:  4095MB Total, 2080MB Free
20:56:36: stepping id: 7, model 42, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
20:56:36: monitor 1: pos={0, 0}, size={2560, 1440}
20:56:36: monitor 2: pos={-1920, 0}, size={1920, 1080}
20:56:36: Windows Version: 6.1 Build 7601 S
20:56:36: Aero is Enabled
20:56:36: -------------------------------
20:56:36: OBS Modules:
20:56:36: Base Address     Module
20:56:36: 00120000         OBS.exe
20:56:36: 77E10000         OBSApi.dll
20:56:36: 53C00000         DShowPlugin.dll
20:56:36: 53BE0000         GraphicsCapture.dll
20:56:36: 53BC0000         NoiseGate.dll
20:56:36: 53BA0000         PSVPlugin.dll
20:56:36: ------------------------------------------
20:56:36: Adapter 1
20:56:36:   Video Adapter: AMD Radeon HD 6900 Series
20:56:36:   Video Adapter Dedicated Video Memory: 3221225472
20:56:36:   Video Adapter Shared System Memory: 1073676288
20:56:36:   Video Adapter Output 1: pos={0, 0}, size={2560, 1440}, attached=true
20:56:36:   Video Adapter Output 2: pos={-1920, 0}, size={1920, 1080}, attached=true
20:56:36: =====Stream Start: 2013-12-08, 20:56:36===============================================
20:56:36:   Multithreaded optimizations: On
20:56:36:   Base resolution: 2560x1440
20:56:36:   Output resolution: 1280x720
20:56:36: ------------------------------------------
20:56:36: Loading up D3D10 on AMD Radeon HD 6900 Series...
20:56:36: ------------------------------------------
20:56:36: Audio Format: 48000hz
20:56:36: Playback device Default
20:56:36: ------------------------------------------
20:56:36: Using desktop audio input: Speakers (ASUS Xonar Essence STX Audio Device)
20:56:36: ------------------------------------------
20:56:36: Audio Encoding: AAC
20:56:36:     bitrate: 128
20:56:36: Scene buffering time set to 700
20:56:36: ------------------------------------------
20:56:36: Video Encoding: x264
20:56:36:     fps: 40
20:56:36:     width: 1280, height: 720
20:56:36:     preset: superfast
20:56:36:     profile: high
20:56:36:     keyint: 80
20:56:36:     CBR: yes
20:56:36:     CFR: no
20:56:36:     max bitrate: 3500
20:56:36:     buffer size: 3500
20:56:36: ------------------------------------------
20:56:36: MMDeviceAudioSource: Frequency for device 'Speakers (ASUS Xonar Essence STX Audio Device)' is 352800, samples per sec is 44100
20:56:38: Using RTMP service: Twitch / Justin.tv
20:56:38:   Server selection: rtmp://live-ams.justin.tv/app
20:56:38:   Interface: Realtek PCIe GBE Family Controller (ethernet, 100 mbps)
20:56:39: Completed handshake with rtmp://live-ams.justin.tv/app in 414 ms.
20:56:39: Total frames encoded: 89, total frames duplicated: 0 (0.00%)
20:56:39: Total frames rendered: 94, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
20:56:40: SO_SNDBUF was at 8192
20:56:40: SO_SNDBUF is now 65536
20:56:40: RTMPPublisher::SocketLoop: Graceful loop exit
20:56:40: Number of times waited to send: 0, Waited for a total of 0 bytes
20:56:40: Number of b-frames dropped: 0 (-1.$%), Number of p-frames dropped: 0 (-1.$%), Total 0 (-1.$%)
20:56:40: Number of bytes sent: 0
20:56:40: 
20:56:40: Profiler time results:
20:56:40: 
20:56:40: ==============================================================
20:56:40: video thread frame - [100%] [avg time: 0.804 ms] [children: 50.4%] [unaccounted: 49.6%]
20:56:40: | scene->Preprocess - [0.124%] [avg time: 0.001 ms]
20:56:40: | GPU download and conversion - [50.2%] [avg time: 0.404 ms] [children: 48.1%] [unaccounted: 2.11%]
20:56:40: | | flush - [45.8%] [avg time: 0.368 ms]
20:56:40: | | CopyResource - [2.24%] [avg time: 0.018 ms]
20:56:40: | | conversion to 4:2:0 - [0.124%] [avg time: 0.001 ms]
20:56:40: Convert444Threads - [100%] [avg time: 0.37 ms] [children: 98.9%] [unaccounted: 1.08%]
20:56:40: | Convert444toNV12 - [98.9%] [avg time: 0.366 ms]
20:56:40: encoder thread frame - [100%] [avg time: 0.594 ms]
20:56:40: ==============================================================
20:56:40: 
20:56:40: 
20:56:40: Profiler CPU results:
20:56:40: 
20:56:40: ==============================================================
20:56:40: video thread frame - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:56:40: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:56:40: | GPU download and conversion - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:56:40: | | flush - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:56:40: | | CopyResource - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:56:40: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:56:40: Convert444Threads - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 2]
20:56:40: | Convert444toNV12 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 2]
20:56:40: encoder thread frame - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:56:40: ==============================================================
20:56:40: 
20:56:40: =====Stream End: 2013-12-08, 20:56:40=================================================
20:56:43: =====Stream Start: 2013-12-08, 20:56:43===============================================
20:56:43:   Multithreaded optimizations: On
20:56:43:   Base resolution: 2560x1440
20:56:43:   Output resolution: 1280x720
20:56:43: ------------------------------------------
20:56:43: Loading up D3D10 on AMD Radeon HD 6900 Series...
20:56:43: ------------------------------------------
20:56:43: Audio Format: 48000hz
20:56:43: Playback device Default
20:56:43: ------------------------------------------
20:56:43: Using desktop audio input: Speakers (ASUS Xonar Essence STX Audio Device)
20:56:43: ------------------------------------------
20:56:43: Audio Encoding: AAC
20:56:43:     bitrate: 128
20:56:43: Using graphics capture
20:56:43: Scene buffering time set to 700
20:56:43: ------------------------------------------
20:56:43: Video Encoding: x264
20:56:43:     fps: 40
20:56:43:     width: 1280, height: 720
20:56:43:     preset: superfast
20:56:43:     profile: high
20:56:43:     keyint: 80
20:56:43:     CBR: yes
20:56:43:     CFR: no
20:56:43:     max bitrate: 3500
20:56:43:     buffer size: 3500
20:56:43: ------------------------------------------
20:56:43: MMDeviceAudioSource: Frequency for device 'Speakers (ASUS Xonar Essence STX Audio Device)' is 352800, samples per sec is 44100
20:56:45: Using RTMP service: Twitch / Justin.tv
20:56:45:   Server selection: rtmp://live-ams.justin.tv/app
20:56:45:   Interface: Realtek PCIe GBE Family Controller (ethernet, 100 mbps)
20:56:45: Completed handshake with rtmp://live-ams.justin.tv/app in 413 ms.
20:56:46: SO_SNDBUF was at 8192
20:56:46: SO_SNDBUF is now 65536
20:56:47: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 131072 (buffer: 22952 / 463872)
Warning -- SharedTexCapture::Init: Could not open file mapping: 2
20:56:58: SharedTexCapture hooked
20:57:00: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 524288 (buffer: 0 / 463872)
20:57:31: Total frames encoded: 1885, total frames duplicated: 131 (6.95%)
20:57:31: Total frames rendered: 1837, number of late frames: 15 (0.82%) (it's okay for some frames to be late)
20:57:31: RTMPPublisher::SocketLoop: Graceful loop exit
20:57:31: Average send payload: 9275 bytes, average send interval: 20 ms
20:57:31: Number of times waited to send: 0, Waited for a total of 0 bytes
20:57:31: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
20:57:31: Number of bytes sent: 19701591
20:57:31: 
20:57:31: Profiler time results:
20:57:31: 
20:57:31: ==============================================================
20:57:31: video thread frame - [100%] [avg time: 2.676 ms] [children: 32.7%] [unaccounted: 67.3%]
20:57:31: | scene->Preprocess - [0.0374%] [avg time: 0.001 ms]
20:57:31: | GPU download and conversion - [32.7%] [avg time: 0.875 ms] [children: 27.6%] [unaccounted: 5.08%]
20:57:31: | | flush - [24.6%] [avg time: 0.658 ms]
20:57:31: | | CopyResource - [2.95%] [avg time: 0.079 ms]
20:57:31: | | conversion to 4:2:0 - [0.0747%] [avg time: 0.002 ms]
20:57:31: Convert444Threads - [100%] [avg time: 0.386 ms] [children: 99%] [unaccounted: 1.04%]
20:57:31: | Convert444toNV12 - [99%] [avg time: 0.382 ms]
20:57:31: encoder thread frame - [100%] [avg time: 0.679 ms]
20:57:31: ==============================================================
20:57:31: 
20:57:31: 
20:57:31: Profiler CPU results:
20:57:31: 
20:57:31: ==============================================================
20:57:31: video thread frame - [cpu time: avg 0.008 ms, total 15.6 ms] [avg calls per frame: 1]
20:57:31: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:57:31: | GPU download and conversion - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:57:31: | | flush - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:57:31: | | CopyResource - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:57:31: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
20:57:31: Convert444Threads - [cpu time: avg 0.064 ms, total 234 ms] [avg calls per frame: 2]
20:57:31: | Convert444toNV12 - [cpu time: avg 0.064 ms, total 234 ms] [avg calls per frame: 2]
20:57:31: encoder thread frame - [cpu time: avg 0.042 ms, total 78 ms] [avg calls per frame: 1]
20:57:31: ==============================================================
20:57:31: 
20:57:31: =====Stream End: 2013-12-08, 20:57:31=================================================
20:57:39: =====Stream Start: 2013-12-08, 20:57:39===============================================
20:57:39:   Multithreaded optimizations: On
20:57:39:   Base resolution: 2560x1440
20:57:39:   Output resolution: 1280x720
20:57:39: ------------------------------------------
20:57:39: Loading up D3D10 on AMD Radeon HD 6900 Series...
20:57:39: ------------------------------------------
20:57:39: Audio Format: 48000hz
20:57:39: Playback device Default
20:57:39: ------------------------------------------
20:57:39: Using desktop audio input: Speakers (ASUS Xonar Essence STX Audio Device)
20:57:39: ------------------------------------------
20:57:39: Audio Encoding: AAC
20:57:39:     bitrate: 128
20:57:39: Using graphics capture
20:57:39: Scene buffering time set to 700
20:57:39: ------------------------------------------
20:57:39: Video Encoding: x264
20:57:39:     fps: 40
20:57:39:     width: 1280, height: 720
20:57:39:     preset: veryfast
20:57:39:     profile: high
20:57:39:     keyint: 80
20:57:39:     CBR: yes
20:57:39:     CFR: no
20:57:39:     max bitrate: 3500
20:57:39:     buffer size: 3500
20:57:39: ------------------------------------------
20:57:39: MMDeviceAudioSource: Frequency for device 'Speakers (ASUS Xonar Essence STX Audio Device)' is 352800, samples per sec is 44100
20:57:41: Using RTMP service: Twitch / Justin.tv
20:57:41:   Server selection: rtmp://live-ams.justin.tv/app
20:57:41:   Interface: Realtek PCIe GBE Family Controller (ethernet, 100 mbps)
20:57:41: Completed handshake with rtmp://live-ams.justin.tv/app in 412 ms.
20:57:43: SO_SNDBUF was at 8192
20:57:43: SO_SNDBUF is now 65536
20:57:44: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 131072 (buffer: 0 / 463872)
Warning -- SharedTexCapture::Init: Could not open file mapping: 2
20:58:13: SharedTexCapture hooked
20:58:14: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 524288 (buffer: 0 / 463872)
21:02:15: Settings::Video: Enabling Aero
21:02:18: Total frames encoded: 11129, total frames duplicated: 117 (1.05%)
21:02:18: Total frames rendered: 11085, number of late frames: 12 (0.11%) (it's okay for some frames to be late)
21:02:18: RTMPPublisher::SocketLoop: Graceful loop exit
21:02:18: Average send payload: 9083 bytes, average send interval: 20 ms
21:02:18: Number of times waited to send: 0, Waited for a total of 0 bytes
21:02:18: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
21:02:18: Number of bytes sent: 124806522
21:02:18: 
21:02:18: Profiler time results:
21:02:18: 
21:02:18: ==============================================================
21:02:18: video thread frame - [100%] [avg time: 1.376 ms] [children: 59.2%] [unaccounted: 40.8%]
21:02:18: | scene->Preprocess - [0.0727%] [avg time: 0.001 ms]
21:02:18: | GPU download and conversion - [59.2%] [avg time: 0.814 ms] [children: 55.5%] [unaccounted: 3.63%]
21:02:18: | | flush - [48.5%] [avg time: 0.667 ms]
21:02:18: | | CopyResource - [6.83%] [avg time: 0.094 ms]
21:02:18: | | conversion to 4:2:0 - [0.218%] [avg time: 0.003 ms]
21:02:18: Convert444Threads - [100%] [avg time: 0.419 ms] [children: 98.8%] [unaccounted: 1.19%]
21:02:18: | Convert444toNV12 - [98.8%] [avg time: 0.414 ms]
21:02:18: encoder thread frame - [100%] [avg time: 0.832 ms]
21:02:18: ==============================================================
21:02:18: 
21:02:18: 
21:02:18: Profiler CPU results:
21:02:18: 
21:02:18: ==============================================================
21:02:18: video thread frame - [cpu time: avg 0.04 ms, total 452.403 ms] [avg calls per frame: 1]
21:02:18: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
21:02:18: | GPU download and conversion - [cpu time: avg 0.026 ms, total 296.403 ms] [avg calls per frame: 1]
21:02:18: | | flush - [cpu time: avg 0.009 ms, total 109.2 ms] [avg calls per frame: 1]
21:02:18: | | CopyResource - [cpu time: avg 0.008 ms, total 93.601 ms] [avg calls per frame: 1]
21:02:18: | | conversion to 4:2:0 - [cpu time: avg 0.001 ms, total 15.6 ms] [avg calls per frame: 1]
21:02:18: Convert444Threads - [cpu time: avg 0.148 ms, total 3276.02 ms] [avg calls per frame: 2]
21:02:18: | Convert444toNV12 - [cpu time: avg 0.146 ms, total 3244.82 ms] [avg calls per frame: 2]
21:02:18: encoder thread frame - [cpu time: avg 0.125 ms, total 1388.41 ms] [avg calls per frame: 1]
21:02:18: ==============================================================
21:02:18: 
21:02:18: =====Stream End: 2013-12-08, 21:02:18=================================================
21:02:19: =====Stream Start: 2013-12-08, 21:02:19===============================================
21:02:19:   Multithreaded optimizations: On
21:02:19:   Base resolution: 2560x1440
21:02:19:   Output resolution: 1024x576
21:02:19: ------------------------------------------
21:02:19: Loading up D3D10 on AMD Radeon HD 6900 Series...
21:02:19: ------------------------------------------
21:02:19: Audio Format: 48000hz
21:02:19: Playback device Default
21:02:19: ------------------------------------------
21:02:19: Using desktop audio input: Speakers (ASUS Xonar Essence STX Audio Device)
21:02:19: ------------------------------------------
21:02:19: Audio Encoding: AAC
21:02:19:     bitrate: 128
21:02:19: Using graphics capture
21:02:19: Scene buffering time set to 700
21:02:19: ------------------------------------------
21:02:19: Video Encoding: x264
21:02:19:     fps: 40
21:02:19:     width: 1024, height: 576
21:02:19:     preset: veryfast
21:02:19:     profile: high
21:02:19:     keyint: 80
21:02:19:     CBR: yes
21:02:19:     CFR: no
21:02:19:     max bitrate: 3500
21:02:19:     buffer size: 3500
21:02:19: ------------------------------------------
21:02:19: MMDeviceAudioSource: Frequency for device 'Speakers (ASUS Xonar Essence STX Audio Device)' is 352800, samples per sec is 44100
21:02:21: SharedTexCapture hooked
21:02:21: Using RTMP service: Twitch / Justin.tv
21:02:21:   Server selection: rtmp://live-ams.justin.tv/app
21:02:21:   Interface: Realtek PCIe GBE Family Controller (ethernet, 100 mbps)
21:02:21: Completed handshake with rtmp://live-ams.justin.tv/app in 428 ms.
21:02:23: SO_SNDBUF was at 8192
21:02:23: SO_SNDBUF is now 65536
21:02:24: GraphicsCaptureSource::NewCapture:  eliminating old capture
21:02:24: SharedTexCapture hooked
21:02:26: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 262144 (buffer: 680 / 463872)
21:02:44: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 524288 (buffer: 0 / 463872)
21:05:30: Total frames encoded: 7620, total frames duplicated: 151 (1.98%)
21:05:30: Total frames rendered: 7572, number of late frames: 19 (0.25%) (it's okay for some frames to be late)
21:05:30: RTMPPublisher::SocketLoop: Graceful loop exit
21:05:31: Average send payload: 8655 bytes, average send interval: 19 ms
21:05:31: Number of times waited to send: 0, Waited for a total of 0 bytes
21:05:31: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
21:05:31: Number of bytes sent: 84892350
21:05:31: 
21:05:31: Profiler time results:
21:05:31: 
21:05:31: ==============================================================
21:05:31: video thread frame - [100%] [avg time: 1.379 ms] [children: 55.8%] [unaccounted: 44.2%]
21:05:31: | scene->Preprocess - [0.0725%] [avg time: 0.001 ms]
21:05:31: | GPU download and conversion - [55.8%] [avg time: 0.769 ms] [children: 51.5%] [unaccounted: 4.28%]
21:05:31: | | flush - [46.1%] [avg time: 0.636 ms]
21:05:31: | | CopyResource - [5.22%] [avg time: 0.072 ms]
21:05:31: | | conversion to 4:2:0 - [0.145%] [avg time: 0.002 ms]
21:05:31: Convert444Threads - [100%] [avg time: 0.247 ms] [children: 98.8%] [unaccounted: 1.21%]
21:05:31: | Convert444toNV12 - [98.8%] [avg time: 0.244 ms]
21:05:31: encoder thread frame - [100%] [avg time: 0.595 ms]
21:05:31: ==============================================================
21:05:31: 
21:05:31: 
21:05:31: Profiler CPU results:
21:05:31: 
21:05:31: ==============================================================
21:05:31: video thread frame - [cpu time: avg 0.039 ms, total 296.402 ms] [avg calls per frame: 1]
21:05:31: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
21:05:31: | GPU download and conversion - [cpu time: avg 0.01 ms, total 78 ms] [avg calls per frame: 1]
21:05:31: | | flush - [cpu time: avg 0.004 ms, total 31.2 ms] [avg calls per frame: 1]
21:05:31: | | CopyResource - [cpu time: avg 0.004 ms, total 31.2 ms] [avg calls per frame: 1]
21:05:31: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
21:05:31: Convert444Threads - [cpu time: avg 0.099 ms, total 1497.61 ms] [avg calls per frame: 2]
21:05:31: | Convert444toNV12 - [cpu time: avg 0.098 ms, total 1482.01 ms] [avg calls per frame: 2]
21:05:31: encoder thread frame - [cpu time: avg 0.08 ms, total 608.404 ms] [avg calls per frame: 1]
21:05:31: ==============================================================
21:05:31: 
21:05:31: =====Stream End: 2013-12-08, 21:05:31=================================================
 

dodgepong

Administrator
Community Helper
Re: Lag spikes while streaming on Twitch.

If you're getting high ping, that means your stream and the game are competing too much for your internet connection. First try enabling "Minimize Network Impact" in Broadcast Settings, and if that still doesn't help, try lowering the bit rate that you are streaming at.
 

Kirby420

New Member
Re: Lag spikes while streaming on Twitch.

Internet connection throughput capacity does not determine ping.

You could get 10ms ping to a server with a gigabit fibre connection, and the same 10ms with a 1.5mbps DSL plan.
 

Bagz93

New Member
Re: Lag spikes while streaming on Twitch.

I noticed that when i use screen capture instead of game capture i don't get any of those freezes (which is my main problem in game mode) but the fps is low both ingame and on-screen in window capture.

EDIT
Freezes came back after a while.
 

hilalpro

Member
Lower your windows resolution to 1920x1080 run the game in windowed mode and use either game capture or window capture with aero on.
Disable aero if you must be using monitor capture.
 

Bagz93

New Member
Seems like its working ! (wont work with borderless but that's fine). Thanks for the help!

Edit:

Scratch that, still these freezes that last 1-2 seconds randomly.
 
Top