Bug Report OBS Causing Audio Latency/Glitches

GuitarBizarre

New Member
Hi all. Recently I've been having some annoying sound issues on my machine, which it transpires are caused by OBS. I've reinstalled windows, and even borrowed an alternative DAC (Since I thought my hardware was breaking) to solve the problems, so it definitely isn't hardware in my machine.

Both 32 Bit and 64 Bit versions cause the problem.

I stream Starcraft 2.

System specs are:

Asus P6T Deluxe V2 Motherboard
Core i7 920 D0 @ 3.6GHz
Radeon HD5870
12GB RAM
Win7 Ultimate x64
Outboard DAC as soundcard (Cambridge Audio DacMagic)

I have had the DAC, and a replacement (loaned) DAC, connected via both Optical Toslink, and via USB, using sampling rates between 44.1 and 96KHz - The popping problem is consistent and does not become better or worse with changes to the output rates. 16 bit vs 24 bit audio also makes no difference.

When I use the machine normally I have no issues. However when I start streaming, my audio begins to randomly "click" or "pop" - It transpires after using DPC Latency checker (http://www.thesycon.de/deu/latency_check.shtml)that turning on my stream in OBS causes my normally stable audio latency to spike as much as 18309 µs. (compared to between 70-110 µs when not streaming).

No other programs cause this - Even heavy-duty games with high requirements don't force this kind of behaviour. - Unless a stream is on!

Its not Stream breaking - As far as I can tell the stream viewers cannot hear any difference, but it is tremendously annoying to deal with every time I want to stream, and has resulted in a lot of uneccesary troubleshooting and checking of my equipment to try and solve it!

Does anyone have any suggestions on why this is happening? I personally believe it is a bug, rather than a settings issue, hence posting it here. Log below, though it doesn't seem to contain any useful information.

Code:
Open Broadcaster Software v0.472b - 64bit ( ^ω^)
-------------------------------
CPU Name: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
CPU Speed: 3600MHz
Physical Memory:  12279MB Total, 8699MB Free
stepping id: 5, model 10, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
monitor 1: pos={0, 0}, size={1920, 1080}
monitor 2: pos={-1920, 0}, size={1920, 1080}
Windows Version: 6.1 Build 7601 S
Aero is Enabled
------------------------------------------
Adapter 1
  Video Adapter: ATI Radeon HD 5800 Series
  Video Adapter Dedicated Video Memory: 1057849344
  Video Adapter Shared System Memory: 1874391040
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 960x540
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (Cambridge Audio USB Audio 1.0)
------------------------------------------
Using auxilary audio input: Microphone (HD Pro Webcam C910)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
Using graphics capture
x264: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264: profile High, level 3.1
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 960, height: 540
    preset: veryfast
    CBR: no
    CFR: no
    max bitrate: 1600
    buffer size: 1600
    quality: 8
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: rtmp://live-3c.justin.tv/app
bufferTime: 2207, outputRateWindowTime: 1000, dropThreshold: 2707
SharedTexCapture hooked
Total frames rendered: 858, number of frames that lagged: 3 (0.35%) (it's okay for some frames to lag)
RTMPPublisher::SocketLoop: Aborting due to bStopping
Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
x264: frame I:4     Avg QP:16.23  size: 21462
x264: frame P:306   Avg QP:19.14  size:  1696
x264: frame B:504   Avg QP:20.07  size:    41
x264: consecutive B-frames: 17.3%  0.0%  0.0% 82.7%
x264: mb I  I16..4: 73.2% 12.6% 14.1%
x264: mb P  I16..4:  0.2%  0.1%  0.0%  P16..4: 15.6%  3.7%  1.6%  0.0%  0.0%    skip:78.9%
x264: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.1%  0.0%  0.0%  direct: 0.1%  skip:99.8%  L0:35.6% L1:62.4% BI: 2.1%
x264: 8x8 transform intra:14.4% inter:14.3%
x264: coded y,uvDC,uvAC intra: 46.3% 39.4% 13.9% inter: 1.6% 0.7% 0.0%
x264: i16 v,h,dc,p: 61% 12% 19%  9%
x264: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 26% 24%  4%  7%  5% 10%  5%  8%
x264: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 30% 20%  5%  6%  4%  7%  4%  6%
x264: i8c dc,h,v,p: 65% 22%  8%  6%
x264: Weighted P-Frames: Y:0.0% UV:0.0%
x264: kb/s:183.83
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 960x540
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (Cambridge Audio USB Audio 1.0)
------------------------------------------
Using auxilary audio input: Microphone (HD Pro Webcam C910)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
    device: Logitech HD Pro Webcam C910,
    device id \\?\usb#vid_046d&pid_0821&mi_02#6&4fb11ce&0&0002#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
    chosen type: RGB24, usingFourCC: false, res: 1920x1080 - 1920x1080, fps: 5-30, fourCC: 00000000

Using directshow input
Using bitmap image
Using graphics capture
x264: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264: profile High, level 3.1
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 960, height: 540
    preset: veryfast
    CBR: no
    CFR: no
    max bitrate: 1600
    buffer size: 1600
    quality: 8
------------------------------------------
SharedTexCapture hooked
SharedTexCapture hooked
SharedTexCapture hooked
Total frames rendered: 3145, number of frames that lagged: 19 (0.60%) (it's okay for some frames to lag)
x264: frame I:14    Avg QP:18.00  size: 47008
x264: frame P:854   Avg QP:21.74  size:  2056
x264: frame B:2233  Avg QP:25.98  size:   198
x264: consecutive B-frames:  3.2%  2.0%  1.3% 93.6%
x264: mb I  I16..4: 41.0% 11.0% 48.0%
x264: mb P  I16..4:  1.7%  0.6%  0.2%  P16..4:  9.1%  3.2%  1.7%  0.0%  0.0%    skip:83.6%
x264: mb B  I16..4:  0.1%  0.0%  0.0%  B16..8:  1.5%  0.5%  0.0%  direct: 0.4%  skip:97.4%  L0:38.4% L1:46.8% BI:14.7%
x264: 8x8 transform intra:18.9% inter:17.9%
x264: coded y,uvDC,uvAC intra: 36.4% 38.2% 22.0% inter: 1.2% 1.1% 0.1%
x264: i16 v,h,dc,p: 67% 18% 12%  3%
x264: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 15% 36%  3%  4%  4%  3%  4%  4%
x264: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 27% 13%  5%  9%  6%  5%  6%  5%
x264: i8c dc,h,v,p: 59% 21% 17%  3%
x264: Weighted P-Frames: Y:1.8% UV:1.4%
x264: kb/s:219.45
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 960x540
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (Cambridge Audio USB Audio 1.0)
------------------------------------------
Using auxilary audio input: Microphone (HD Pro Webcam C910)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
Using bitmap image
------------------------------------------
    device: Logitech HD Pro Webcam C910,
    device id \\?\usb#vid_046d&pid_0821&mi_02#6&4fb11ce&0&0002#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
    chosen type: RGB24, usingFourCC: false, res: 1920x1080 - 1920x1080, fps: 5-30, fourCC: 00000000

Using directshow input
Using graphics capture
x264: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264: profile High, level 3.1
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 960, height: 540
    preset: veryfast
    CBR: no
    CFR: no
    max bitrate: 1600
    buffer size: 1600
    quality: 8
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: rtmp://live-3c.justin.tv/app
SharedTexCapture hooked
SharedTexCapture hooked
bufferTime: 2404, outputRateWindowTime: 1000, dropThreshold: 2904
SharedTexCapture hooked
SharedTexCapture hooked
Total frames rendered: 8056, number of frames that lagged: 48 (0.60%) (it's okay for some frames to lag)
RTMPPublisher::SocketLoop: Aborting due to bStopping
Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
x264: frame I:33    Avg QP:18.92  size: 60147
x264: frame P:2118  Avg QP:23.46  size:  1472
x264: frame B:5861  Avg QP:31.37  size:   173
x264: consecutive B-frames:  2.3%  0.3%  0.5% 96.9%
x264: mb I  I16..4: 27.1% 15.5% 57.4%
x264: mb P  I16..4:  1.2%  0.5%  0.2%  P16..4:  5.0%  1.7%  0.9%  0.0%  0.0%    skip:90.5%
x264: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.8%  0.4%  0.0%  direct: 0.2%  skip:98.5%  L0:34.9% L1:49.3% BI:15.8%
x264: 8x8 transform intra:20.4% inter:19.3%
x264: coded y,uvDC,uvAC intra: 48.9% 49.2% 28.8% inter: 0.8% 0.5% 0.1%
x264: i16 v,h,dc,p: 55% 29% 12%  4%
x264: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 22% 32%  4%  4%  4%  4%  4%  4%
x264: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 27% 13%  6% 11%  6%  6%  5%  6%
x264: i8c dc,h,v,p: 52% 28% 17%  3%
x264: Weighted P-Frames: Y:0.0% UV:0.0%
x264: kb/s:181.09
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 4.91 ms] [avg calls per frame: 1] [children: 57.1%] [unaccounted: 42.9%]
| scene->Preprocess - [25%] [avg time: 1.226 ms] [avg calls per frame: 1]
| video encoding and uploading - [32.2%] [avg time: 1.579 ms] [avg calls per frame: 1] [children: 15.2%] [unaccounted: 17%]
| | CopyResource - [0.692%] [avg time: 0.034 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [0.122%] [avg time: 0.006 ms] [avg calls per frame: 0]
| | call to encoder - [14.1%] [avg time: 0.694 ms] [avg calls per frame: 0]
| | sending stuff out - [0.204%] [avg time: 0.01 ms] [avg calls per frame: 0]
==============================================================
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I don't think this is caused by the card. What I have heard however is that sometimes the webcam can cause this issue and I don't know why, but I haven't been able to replicate. Perhaps being in a bad port, I don't know for sure. It's been very annoying. My theory is that it's interfering with the desktop audio loopback recording stream somehow, perhaps a bug in the windows audio subsystem or some driver somewhere, but as I can't get it to happen on my system, I don't have sufficient evidence to back that up. Very frustrating dealing with a bug that only happens on specific computers or in specific situations.

At the same time though, I have the one-up model of that webcam, the C920, and I've never experienced any audio strangeness from it. I also know other who use the C910 with no problems as well. Though your belief that it is a bug with OBS itself is not impossible (and is understandable), I simply cannot find sufficient evidence to back that statement up either because I don't get the same results from my own system (which is just as annoying for me as it is for you).
 

GuitarBizarre

New Member
Jim said:
I don't think this is caused by the card. What I have heard however is that sometimes the webcam can cause this issue and I don't know why, but I haven't been able to replicate. Perhaps being in a bad port, I don't know for sure. It's been very annoying. My theory is that it's interfering with the desktop audio loopback recording stream somehow, perhaps a bug in the windows audio subsystem or some driver somewhere, but as I can't get it to happen on my system, I don't have sufficient evidence to back that up. Very frustrating dealing with a bug that only happens on specific computers or in specific situations.

At the same time though, I have the one-up model of that webcam, the C920, and I've never experienced any audio strangeness from it. I also know other who use the C910 with no problems as well. Though your belief that it is a bug with OBS itself is not impossible (and is understandable), I simply cannot find sufficient evidence to back that statement up either because I don't get the same results from my own system (which is just as annoying for me as it is for you).

Well, I don't use a normal soundcard. This is an external DAC - Mine is a Cambridge Audio DacMagic, and the one I borrowed is a DacMagic Plus. They're basically pieces of Hi-Fi equipment.

Have you tried using the Latency checker while running a stream yourself? It may be that your system handles the latency spikes better, but they may still be present (Since it takes quite a lot to make the latency spikes an audible problem).

I can post screenshots of my Results if you'd like?
 

R1CH

Forum Admin
Developer
Keep in mind that DPC latency is caused by drivers deferring their procedure calls. OBS does not install any drivers or run anything in kernel land, so it cannot cause the high DPC latency directly. You may wish to use a tool such as Latencymon to isolate what driver is giving you high DPC times.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I used the program myself with OBS on/off and got almost no difference from non-streaming. It seemed to always be in the 1000 range for me. The most I ever got up to was 1600. I played a game for a while to test it, enabled my mic as well and everything, but never got anything unusual. I unfortunately don't have a solid answer. I'm not doing things that games normally do, but at the same time, you should know that I'm just simply reading from the devices, I'm not actually doing anything special.
 
Top