Bug Report Sound issue

pusio

New Member
From time to time audio in my recording is skipping few miliseconds.

It sounds like this:
(00:02sec and 00:30sec)
http://youtu.be/zvbXAoKPDA0

Here is full log file for this recording:
Code:
12:45:39: Open Broadcaster Software v0.60b - 32bit (´・ω・`)
12:45:39: -------------------------------
12:45:39: CPU Name: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
12:45:39: CPU Speed: 2672MHz
12:45:39: Physical Memory:  4095MB Total, 3352MB Free
12:45:39: stepping id: 5, model 26, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
12:45:39: monitor 1: pos={0, 0}, size={1920, 1200}
12:45:39: Windows Version: 6.1 Build 7601 S
12:45:39: Aero is Enabled
12:45:39: -------------------------------
12:45:39: OBS Modules:
12:45:39: Base Address     Module
12:45:39: 01200000         OBS.exe
12:45:39: 709C0000         OBSApi.dll
12:45:39: 731B0000         DShowPlugin.dll
12:45:39: 73480000         GraphicsCapture.dll
12:45:39: 73170000         NoiseGate.dll
12:45:39: 73190000         PSVPlugin.dll
12:45:39: ------------------------------------------
12:45:39: Adapter 1
12:45:39:   Video Adapter: NVIDIA GeForce GTX 660 
12:45:39:   Video Adapter Dedicated Video Memory: 2086469632
12:45:39:   Video Adapter Shared System Memory: 2147807232
12:45:39:   Video Adapter Output 1: pos={0, 0}, size={1920, 1200}, attached=true
12:45:39: =====Stream Start: 2014-02-09, 12:45:39===============================================
12:45:39:   Multithreaded optimizations: On
12:45:39:   Base resolution: 1600x900
12:45:39:   Output resolution: 1280x720
12:45:39: ------------------------------------------
12:45:39: Loading up D3D10 on NVIDIA GeForce GTX 660 (Adapter 1)...
12:45:39: ------------------------------------------
12:45:39: Audio Format: 48000hz
12:45:39: Playback device {0.0.0.00000000}.{ce6b4e9a-5081-48ff-a0a2-2b9ddd78a2c9}
12:45:39: ------------------------------------------
12:45:39: Using desktop audio input: Speakers (ASUS Xonar DG Audio Device)
12:45:39: ------------------------------------------
12:45:39: Using auxilary audio input: Microphone (ASUS Xonar DG Audio Device)
12:45:39: Using Mic QPC timestamps
12:45:39: ------------------------------------------
12:45:39: Audio Encoding: AAC
12:45:39:     bitrate: 128
12:45:39: Using Window Capture
12:45:39: Scene buffering time set to 900
12:45:39: ------------------------------------------
12:45:39: Video Encoding: x264
12:45:39:     fps: 30
12:45:39:     width: 1280, height: 720
12:45:39:     preset: veryfast
12:45:39:     profile: main
12:45:39:     keyint: 60
12:45:39:     CBR: yes
12:45:39:     CFR: yes
12:45:39:     max bitrate: 2500
12:45:39:     buffer size: 2500
12:45:39: ------------------------------------------
12:45:40: Audio timestamp for device 'Microphone (ASUS Xonar DG Audio Device)' was behind target timestamp by 43
12:45:43: Audio timestamp for device 'Microphone (ASUS Xonar DG Audio Device)' was behind target timestamp by 64
12:46:16: Total frames encoded: 1076, total frames duplicated: 0 (0.00%)
12:46:16: Total frames rendered: 1080, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
12:46:16: 
12:46:16: Profiler time results:
12:46:16: 
12:46:16: ==============================================================
12:46:16: video thread frame - [100%] [avg time: 1.404 ms] [children: 90.1%] [unaccounted: 9.9%]
12:46:16: | scene->Preprocess - [82.1%] [avg time: 1.153 ms]
12:46:16: | GPU download and conversion - [7.98%] [avg time: 0.112 ms] [children: 7.41%] [unaccounted: 0.57%]
12:46:16: | | flush - [5.7%] [avg time: 0.08 ms]
12:46:16: | | CopyResource - [1.5%] [avg time: 0.021 ms]
12:46:16: | | conversion to 4:2:0 - [0.214%] [avg time: 0.003 ms]
12:46:16: Convert444Threads - [100%] [avg time: 0.533 ms] [children: 98.9%] [unaccounted: 1.13%]
12:46:16: | Convert444toNV12 - [98.9%] [avg time: 0.527 ms]
12:46:16: encoder thread frame - [100%] [avg time: 1.332 ms]
12:46:16: ==============================================================
12:46:16: 
12:46:16: 
12:46:16: Profiler CPU results:
12:46:16: 
12:46:16: ==============================================================
12:46:16: video thread frame - [cpu time: avg 0.563 ms, total 608.403 ms] [avg calls per frame: 1]
12:46:16: | scene->Preprocess - [cpu time: avg 0.086 ms, total 93.601 ms] [avg calls per frame: 1]
12:46:16: | GPU download and conversion - [cpu time: avg 0.086 ms, total 93.601 ms] [avg calls per frame: 1]
12:46:16: | | flush - [cpu time: avg 0.043 ms, total 46.801 ms] [avg calls per frame: 1]
12:46:16: | | CopyResource - [cpu time: avg 0.029 ms, total 31.2 ms] [avg calls per frame: 1]
12:46:16: | | conversion to 4:2:0 - [cpu time: avg 0.014 ms, total 15.6 ms] [avg calls per frame: 1]
12:46:16: Convert444Threads - [cpu time: avg 0.178 ms, total 374.402 ms] [avg calls per frame: 2]
12:46:16: | Convert444toNV12 - [cpu time: avg 0.178 ms, total 374.402 ms] [avg calls per frame: 2]
12:46:16: encoder thread frame - [cpu time: avg 0.773 ms, total 811.205 ms] [avg calls per frame: 1]
12:46:16: ==============================================================
12:46:16: 
12:46:16: =====Stream End: 2014-02-09, 12:46:16=================================================

More info:
> Changing codec between MP3 and AAC does nothing.
> Increasing scene buffering time delays the moment when audio starts skipping. (Around 1min per 1000buff time).
> Force desktop audio to use video timestamps as base.. does nothing.
> Use mic QPC timestamps is enabled, when disabled it skips more frequently.
> Changing windows -> microphone settings -> format to match 48kHz does nothing.

It's a bit annoying.. Any idea how to fix it?
 

pusio

New Member
> Changing to 64bit (0.60b) version did not help.
> Using other mic did not help.
> Not using asus sound card (integrated sound card instead) did not help.
> Using usb mic did not help.
> Windows sound recorder works fine. (no skipping)
> Fraps also records without skipping.
There must be something wrong with my OBS settings..

Edit:
I disabled microphone in OBS settings (and unplugged from PC). Log no longer contain
Audio timestamp for device X was behind target timestamp by N
but I can still hear skipping in recorded video.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
It didn't sound like you were using a mic in the video. That being said, if you have the issue with desktop sound capture as well, then you *may* want to try the "sync audio to video timestamps" in advanced, though not entirely sure if it'll help. This sort of stuff doesn't typically happen to desktop audio capture, and it will affect other captures if it does. This sort of thing can also happen with improper overclocks and computers with timing issues if you're getting it from desktop sound capture.
 

pusio

New Member
Syncing audio to video timestamps didn't help. I also found out that it is unrelated to microphone, it occurs even when im not speaking or mic is not plugged in. This "skipping" happens ONLY when im recording with OBS.
Also : there was no overclocking on this pc ever done.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I'm unsure of what's going on here to be perfectly honest. I do hear that skipping, though I'd like to see another example if possible. And yea, I'm pretty sure it's unrelated to the mic.
 

pusio

New Member
Here you go, another example (~5min):
http://youtu.be/5F-viBiNbR8

For this recording:
Mic was disabled (as unrelated).
Sync to video timestamps was disabled (as it changed nothing).

Log:
Code:
09:00:17: Open Broadcaster Software v0.60b - 64bit ( ^ω^)
09:00:17: -------------------------------
09:00:17: CPU Name: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
09:00:17: CPU Speed: 2672MHz
09:00:17: Physical Memory:  6135MB Total, 2731MB Free
09:00:17: stepping id: 5, model 26, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
09:00:17: monitor 1: pos={0, 0}, size={1920, 1200}
09:00:17: Windows Version: 6.1 Build 7601 S
09:00:17: Aero is Enabled
09:00:17: -------------------------------
09:00:17: OBS Modules:
09:00:17: Base Address     Module
09:00:17: 000000003FB10000 OBS.exe
09:00:17: 00000000F0A10000 OBSApi.dll
09:00:17: 00000000F5610000 DShowPlugin.dll
09:00:17: 00000000F55E0000 GraphicsCapture.dll
09:00:17: 00000000F55C0000 NoiseGate.dll
09:00:17: 00000000F55A0000 PSVPlugin.dll
09:00:17: ------------------------------------------
09:00:17: Adapter 1
09:00:17:   Video Adapter: NVIDIA GeForce GTX 660 
09:00:17:   Video Adapter Dedicated Video Memory: 2086469632
09:00:17:   Video Adapter Shared System Memory: 2147807232
09:00:17:   Video Adapter Output 1: pos={0, 0}, size={1920, 1200}, attached=true
09:00:17: =====Stream Start: 2014-02-12, 09:00:17===============================================
09:00:17:   Multithreaded optimizations: On
09:00:17:   Base resolution: 1280x720
09:00:17:   Output resolution: 1280x720
09:00:17: ------------------------------------------
09:00:17: Loading up D3D10 on NVIDIA GeForce GTX 660 (Adapter 1)...
09:00:17: ------------------------------------------
09:00:17: Audio Format: 48000hz
09:00:17: Playback device {0.0.0.00000000}.{ce6b4e9a-5081-48ff-a0a2-2b9ddd78a2c9}
09:00:17: ------------------------------------------
09:00:17: Using desktop audio input: Speakers (ASUS Xonar DG Audio Device)
09:00:17: ------------------------------------------
09:00:17: Audio Encoding: AAC
09:00:17:     bitrate: 128
09:00:17: Using Window Capture
09:00:17: Scene buffering time set to 900
09:00:17: ------------------------------------------
09:00:17: Video Encoding: x264
09:00:17:     fps: 30
09:00:17:     width: 1280, height: 720
09:00:17:     preset: veryfast
09:00:17:     profile: main
09:00:17:     keyint: 60
09:00:17:     CBR: yes
09:00:17:     CFR: yes
09:00:17:     max bitrate: 2500
09:00:17:     buffer size: 2500
09:00:17: ------------------------------------------
09:05:15: Total frames encoded: 9005, total frames duplicated: 1 (0.01%)
09:05:15: Total frames rendered: 9010, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
09:05:15: 
09:05:15: Profiler time results:
09:05:15: 
09:05:15: ==============================================================
09:05:15: video thread frame - [100%] [avg time: 1.444 ms] [children: 71.5%] [unaccounted: 28.5%]
09:05:15: | scene->Preprocess - [66.8%] [avg time: 0.964 ms]
09:05:15: | GPU download and conversion - [4.78%] [avg time: 0.069 ms] [children: 4.16%] [unaccounted: 0.623%]
09:05:15: | | flush - [2.42%] [avg time: 0.035 ms]
09:05:15: | | CopyResource - [1.59%] [avg time: 0.023 ms]
09:05:15: | | conversion to 4:2:0 - [0.139%] [avg time: 0.002 ms]
09:05:15: Convert444Threads - [100%] [avg time: 957.195 ms] [children: 0.0545%] [unaccounted: 99.9%]
09:05:15: | Convert444toNV12 - [0.0545%] [avg time: 0.522 ms]
09:05:15: encoder thread frame - [100%] [avg time: 1.164 ms]
09:05:15: ==============================================================
09:05:15: 
09:05:15: 
09:05:15: Profiler CPU results:
09:05:15: 
09:05:15: ==============================================================
09:05:15: video thread frame - [cpu time: avg 0.73 ms, total 6583.24 ms] [avg calls per frame: 1]
09:05:15: | scene->Preprocess - [cpu time: avg 0.006 ms, total 62.4 ms] [avg calls per frame: 1]
09:05:15: | GPU download and conversion - [cpu time: avg 0.122 ms, total 1107.61 ms] [avg calls per frame: 1]
09:05:15: | | flush - [cpu time: avg 0.06 ms, total 546.003 ms] [avg calls per frame: 1]
09:05:15: | | CopyResource - [cpu time: avg 0.048 ms, total 436.807 ms] [avg calls per frame: 1]
09:05:15: | | conversion to 4:2:0 - [cpu time: avg 0.003 ms, total 31.2 ms] [avg calls per frame: 1]
09:05:15: Convert444Threads - [cpu time: avg 0.338 ms, total 6084.04 ms] [avg calls per frame: 2]
09:05:15: | Convert444toNV12 - [cpu time: avg 0.334 ms, total 6006.04 ms] [avg calls per frame: 2]
09:05:15: encoder thread frame - [cpu time: avg 0.205 ms, total 1840.81 ms] [avg calls per frame: 1]
09:05:15: ==============================================================
09:05:15: 
09:05:15: =====Stream End: 2014-02-12, 09:05:15=================================================

Other random info that may or may not be related to the issue:
> Sound card and video card drivera are up-to-date.
> DirectX is (obviously) up-to-date.
> Codecs installed : codecguide Mega Pack 6th Feb 2014 (newest).
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Yea, I actually don't quite know what's going on here. I'm fairly convinced it's not a bug though, I'm pretty sure it ma have something to do with system timing, as system timing is usually the only thing that can affect desktop audio sound. It's very strange, I'm not entirely sure if I have an answer as of yet. I would be curious to see if changing the windows system timer would help with this or not.
 

Jack0r

The Helping Squad
I would check if the same problem occurs on the onboard soundcard of your Motherboard. Those Xonar Soundcards are not really known for being "stable". I remember their "GX" function or what it was to practically kill any streaming software that wanted to use the soundcard :D
 

pusio

New Member
@Jack0r
This happens no matter if sound card is in use or not.

@Jim
I think I've localised most of the problem here. You were somewhat right about overclocking.
Some asus motherboards with drivers install also a program called 'EPU-6 Engine'. I though it just controlls speed of fans, but now I found out that this program also does software overclocking of CPU.
Default mode ('auto') switches between modes 'Max Power Saving' , 'Medium Power Saving' , 'High Performance' and 'Turbo'.
'Max Power Saving' does -2% CPU Frequency
'Medium Power Saving' does -1% CPU Frequency
'High Performance' does nothing to CPU Frequency.
'Turbo' does +3% CPU Frequency.
That means 'EPU-6 Engine' is changing randomly my CPU Frequency ranging from -2% to +3%. This would explain random intervals between 'skipping' in my recordings.

With 'EPU-6 Engine' disabled my recordings are way more stable. Skipping still happens but once every 5 minutes.
Also how come OBS 'breaks' with any overclocking, while Fraps or FFSplit works fine?
 
Top