Question / Help Small 1-frame like lag every second

ande048b

New Member
Hey guys.

I have been streaming on this computer for some time, and I must say, I love using OBS.

It's very simple to use, and it gives great value.

However, I recently started streaming again after a break, and now I'm getting a weird problem.

I know the specs of my computer isn't very good, but I have been streaming with it for some time without any problems.

But now I get a very small lag every second. It cuts out audio aswell, and is generally really annoying. I have no issues inside the game, and OBS does not tell me the "Takes too long to encode" warning.

I have tried several solutions, such as lowering and higtening the max bitrate, downscaling the resolution, and upping the processor priority.

Is there anything that would cause this problem that is easy to fix?

EDIT:

Oh, and also, there was no dropped frames the last test I did. but still it seems that some are dropped for a tiny bit of time, which cuts out the audio.

LOG:
Code:
19:40:19: Open Broadcaster Software v0.59b - 64bit ( ^ω^)
19:40:19: -------------------------------
19:40:19: CPU Name: AMD Phenom(tm) II X2 560 Processor
19:40:19: CPU Speed: 3314MHz
19:40:19: Physical Memory:  12287MB Total, 7978MB Free
19:40:19: stepping id: 3, model 4, family 16, type 0, extmodel 8, extfamily 0, HTT 1, logical cores 2, total cores 2
19:40:19: monitor 1: pos={0, 0}, size={1920, 1080}
19:40:19: Windows Version: 6.1 Build 7601 S
19:40:19: Aero is Enabled
19:40:19: -------------------------------
19:40:19: OBS Modules:
19:40:19: Base Address     Module
19:40:19: 000000003FA20000 OBS.exe
19:40:19: 00000000E1CC0000 OBSApi.dll
19:40:19: 00000000F3C10000 DShowPlugin.dll
19:40:19: 00000000F5C20000 GraphicsCapture.dll
19:40:19: 00000000F5C00000 NoiseGate.dll
19:40:19: 00000000F3BF0000 PSVPlugin.dll
19:40:19: ------------------------------------------
19:40:19: Adapter 1
19:40:19:   Video Adapter: NVIDIA GeForce GTS 450
19:40:19:   Video Adapter Dedicated Video Memory: 1024917504
19:40:19:   Video Adapter Shared System Memory: 3221106688
19:40:19:   Video Adapter Output 1: pos={0, 0}, size={1920, 1080}, attached=true
19:40:19: =====Stream Start: 2013-12-14, 19:40:19===============================================
19:40:19:   Multithreaded optimizations: On
19:40:19:   Base resolution: 1920x1080
19:40:19:   Output resolution: 640x360
19:40:19: ------------------------------------------
19:40:19: Loading up D3D10 on NVIDIA GeForce GTS 450...
19:40:19: ------------------------------------------
19:40:19: Audio Format: 48000hz
19:40:19: Playback device {0.0.0.00000000}.{dc4d8568-d816-4419-b1ff-872e245e99b4}
19:40:19: ------------------------------------------
19:40:19: Using desktop audio input: Headset (Playback) (2- Creative USB Headset)
19:40:19: ------------------------------------------
19:40:19: Using auxilary audio input: Headset (Record) (2- Creative USB Headset)
19:40:19: ------------------------------------------
19:40:19: Audio Encoding: AAC
19:40:19:     bitrate: 128
19:40:19: Using graphics capture
19:40:19: Scene buffering time set to 700
19:40:19: ------------------------------------------
19:40:19: Video Encoding: x264
19:40:19:     fps: 30
19:40:19:     width: 640, height: 360
19:40:19:     preset: superfast
19:40:19:     profile: main
19:40:19:     keyint: 60
19:40:19:     CBR: yes
19:40:19:     CFR: yes
19:40:19:     max bitrate: 2000
19:40:19:     buffer size: 2000
19:40:19: ------------------------------------------
19:40:19: MMDeviceAudioSource: Frequency for device 'Headset (Playback) (2- Creative USB Headset)' is 352800, samples per sec is 44100
19:40:19: MMDeviceAudioSource: Frequency for device 'Headset (Record) (2- Creative USB Headset)' is 176400, samples per sec is 44100
19:40:19: SharedTexCapture hooked
19:40:21: GraphicsCaptureSource::NewCapture:  eliminating old capture
19:40:21: SharedTexCapture hooked
19:40:21: Using RTMP service: Twitch / Justin.tv
19:40:21:   Server selection: rtmp://live-fra.justin.tv/app
19:40:21:   Interface: Realtek PCIe GBE Family Controller (ethernet, 100 mbps)
19:40:21: Completed handshake with rtmp://live-fra.justin.tv/app in 402 ms.
19:40:22: SO_SNDBUF was at 8192
19:40:22: SO_SNDBUF is now 65536
19:40:31: Total frames encoded: 356, total frames duplicated: 9 (2.53%)
19:40:31: Total frames rendered: 356, number of late frames: 1 (0.28%) (it's okay for some frames to be late)
19:40:31: RTMPPublisher::SocketLoop: Graceful loop exit
19:40:32: Average send payload: 5277 bytes, average send interval: 19 ms
19:40:32: Number of times waited to send: 0, Waited for a total of 0 bytes
19:40:32: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
19:40:32: Number of bytes sent: 2322246
19:40:32: 
19:40:32: Profiler time results:
19:40:32: 
19:40:32: ==============================================================
19:40:32: video thread frame - [100%] [avg time: 1.492 ms] [children: 18%] [unaccounted: 82%]
19:40:32: | scene->Preprocess - [0.067%] [avg time: 0.001 ms]
19:40:32: | GPU download and conversion - [18%] [avg time: 0.268 ms] [children: 6.43%] [unaccounted: 11.5%]
19:40:32: | | flush - [5.7%] [avg time: 0.085 ms]
19:40:32: | | CopyResource - [0.67%] [avg time: 0.01 ms]
19:40:32: | | conversion to 4:2:0 - [0.067%] [avg time: 0.001 ms]
19:40:32: Convert444Thread - [100%] [avg time: 0.34 ms] [children: 99.1%] [unaccounted: 0.882%]
19:40:32: | Convert444toNV12 - [99.1%] [avg time: 0.337 ms]
19:40:32: encoder thread frame - [100%] [avg time: 0.45 ms]
19:40:32: ==============================================================
19:40:32: 
19:40:32: 
19:40:32: Profiler CPU results:
19:40:32: 
19:40:32: ==============================================================
19:40:32: video thread frame - [cpu time: avg 0.087 ms, total 31.2 ms] [avg calls per frame: 1]
19:40:32: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
19:40:32: | GPU download and conversion - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
19:40:32: | | flush - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
19:40:32: | | CopyResource - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
19:40:32: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
19:40:32: Convert444Thread - [cpu time: avg 0.047 ms, total 15.6 ms] [avg calls per frame: 1]
19:40:32: | Convert444toNV12 - [cpu time: avg 0.047 ms, total 15.6 ms] [avg calls per frame: 1]
19:40:32: encoder thread frame - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
19:40:32: ==============================================================
19:40:32: 
19:40:32: =====Stream End: 2013-12-14, 19:40:32=================================================
19:40:46: =====Stream Start: 2013-12-14, 19:40:46===============================================
19:40:46:   Multithreaded optimizations: On
19:40:46:   Base resolution: 1920x1080
19:40:46:   Output resolution: 640x360
19:40:46: ------------------------------------------
19:40:46: Loading up D3D10 on NVIDIA GeForce GTS 450...
19:40:46: ------------------------------------------
19:40:46: Audio Format: 48000hz
19:40:46: Playback device {0.0.0.00000000}.{dc4d8568-d816-4419-b1ff-872e245e99b4}
19:40:46: ------------------------------------------
19:40:46: Using desktop audio input: Headset (Playback) (2- Creative USB Headset)
19:40:46: ------------------------------------------
19:40:46: Using auxilary audio input: Headset (Record) (2- Creative USB Headset)
19:40:46: ------------------------------------------
19:40:46: Audio Encoding: AAC
19:40:46:     bitrate: 128
19:40:46: Using graphics capture
19:40:46: Scene buffering time set to 700
19:40:46: ------------------------------------------
19:40:46: Video Encoding: x264
19:40:46:     fps: 30
19:40:46:     width: 640, height: 360
19:40:46:     preset: superfast
19:40:46:     profile: main
19:40:46:     keyint: 60
19:40:46:     CBR: yes
19:40:46:     CFR: yes
19:40:46:     max bitrate: 2000
19:40:46:     buffer size: 2000
19:40:46: ------------------------------------------
19:40:46: MMDeviceAudioSource: Frequency for device 'Headset (Playback) (2- Creative USB Headset)' is 352800, samples per sec is 44100
19:40:46: MMDeviceAudioSource: Frequency for device 'Headset (Record) (2- Creative USB Headset)' is 176400, samples per sec is 44100
19:40:47: SharedTexCapture hooked
19:40:52: GraphicsCaptureSource::NewCapture:  eliminating old capture
19:40:52: SharedTexCapture hooked
19:40:54: GraphicsCaptureSource::NewCapture:  eliminating old capture
19:40:54: SharedTexCapture hooked
19:40:55: GraphicsCaptureSource::NewCapture:  eliminating old capture
19:40:55: SharedTexCapture hooked
19:44:45: Total frames encoded: 7485, total frames duplicated: 20 (0.27%)
19:44:45: Total frames rendered: 7481, number of late frames: 4 (0.05%) (it's okay for some frames to be late)
19:44:45: 
19:44:45: Profiler time results:
19:44:45: 
19:44:45: ==============================================================
19:44:45: video thread frame - [100%] [avg time: 0.627 ms] [children: 20.6%] [unaccounted: 79.4%]
19:44:45: | scene->Preprocess - [0.159%] [avg time: 0.001 ms]
19:44:45: | GPU download and conversion - [20.4%] [avg time: 0.128 ms] [children: 13.2%] [unaccounted: 7.18%]
19:44:45: | | flush - [10.7%] [avg time: 0.067 ms]
19:44:45: | | CopyResource - [2.23%] [avg time: 0.014 ms]
19:44:45: | | conversion to 4:2:0 - [0.319%] [avg time: 0.002 ms]
19:44:45: Convert444Thread - [100%] [avg time: 0.312 ms] [children: 99%] [unaccounted: 0.962%]
19:44:45: | Convert444toNV12 - [99%] [avg time: 0.309 ms]
19:44:45: encoder thread frame - [100%] [avg time: 0.497 ms]
19:44:45: ==============================================================
19:44:45: 
19:44:45: 
19:44:45: Profiler CPU results:
19:44:45: 
19:44:45: ==============================================================
19:44:45: video thread frame - [cpu time: avg 0.095 ms, total 717.603 ms] [avg calls per frame: 1]
19:44:45: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
19:44:45: | GPU download and conversion - [cpu time: avg 0.01 ms, total 78 ms] [avg calls per frame: 1]
19:44:45: | | flush - [cpu time: avg 0.004 ms, total 31.2 ms] [avg calls per frame: 1]
19:44:45: | | CopyResource - [cpu time: avg 0.002 ms, total 15.6 ms] [avg calls per frame: 1]
19:44:45: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
19:44:45: Convert444Thread - [cpu time: avg 0.159 ms, total 1185.61 ms] [avg calls per frame: 1]
19:44:45: | Convert444toNV12 - [cpu time: avg 0.156 ms, total 1170.01 ms] [avg calls per frame: 1]
19:44:45: encoder thread frame - [cpu time: avg 0.087 ms, total 655.204 ms] [avg calls per frame: 1]
19:44:45: ==============================================================
19:44:45: 
19:44:45: =====Stream End: 2013-12-14, 19:44:45=================================================

(code tags please -jim)

EDIT:

The OBS Log Analyser's only comment is:
You have changed the default preset to superfast. The default of veryfast is designed for the optimum balance of quality and CPU usagee. Using superfast will result in greatly reduced quality. If possible, try to change other things such as lowering the resolution or FPS before modifying the preset.

Oh, and also, this problem persists both with Live Streaming and Output File only.
And also when not capturing a game, but instead the desktop.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Is the lag on your system, or only on the output? If it's the the latter, output to file and see how it plays with just a regular video player. Often it can mean flash is a culprit.

However, if it's on your system, that's a different matter. Would be interested in seeing a vod or something.
 

Boildown

Active Member
The only thing I see is that you have your audio devices set to 44100, but OBS set to 48000. Try setting OBS to 44100 so it matches. Otherwise I have no idea.
 
Top