Question / Help Audio Delay when using "Output audio to desktop"

EDGAR_SEC

Member
Hey guys,

So I noticed that whenever I have a capture device/source, right click on it, and select "Output audio to desktop," there is always about a 500ms delay before any audio is output to the desktop.

The issue is present no matter what I set the desktop audio device to and even shows up in a local recording. If I set the capture device/source to "Output audio to stream only," the audio is spot-on. Any ideas on how to fix this on a per source basis?

If not, is there a way to set an offset when using "Output audio to desktop" the same way we can with "Output audio to stream only?"

Both devices are PCIe internal cards (Datapath VisionDVI-DL and Micomsoft card)

Thanks

Log attached. You might notice in the log that I'm using a virtual audio device as "Desktop audio," but this issue is persistent even if I switch the "Desktop audio device" to the analog output onboard Realtek with speakers attached.


Code:
01:15:59: Failed to initialize plugin plugins/CLRBrowserSourcePlugin.dll
01:16:00: Failed to load plugin plugins/CLRHost.Interop.dll, 126
01:16:00: CLR host plugin strings not found, dynamically loading 4 strings
01:16:00: CLRHost::Initialize() attempting to load and start the .NET runtime (null)
01:16:00: CLRHost::Initialize() Found version v2.0.50727 .NET runtime
01:16:00: CLRHost::Initialize() Found version v4.0.30319 .NET runtime
01:16:00: CLRHost::Initialize() attempting to use v4.0.30319 .NET runtime
01:16:00: CLRHost::LoadInteropLibrary() load the assembly plugins\CLRHostPlugin\CLRHost.Interop.dll
01:16:00: CLRHost::LoadPlugins() attempting to load the plugin assembly CLRBrowserSourcePlugin
01:16:01: CLRHost::LoadPlugins() successfully added CLR plugin [Type: CLRBrowserSourcePlugin.CLRBrowserSourcePlugin, Name: CLR Browser Source Plugin]
01:16:01: CLRHost::LoadPlugins() attempting to load the plugin assembly CLRHostPlugin
01:16:01: CLRHost::LoadPlugins() failed to load the assembly CLRHostPlugin: 0x80131018
01:16:01: CLRHost::LoadPlugins() attempting to load the plugin assembly MumbleOverlayPlugin
01:16:01: CLRHost::LoadPlugins() successfully added CLR plugin [Type: MumbleOverlayPlugin.MumbleOverlayPlugin, Name: Mumble Overlay Plugin]
01:16:01: Video Source Plugin strings not found, dynamically loading 52 strings
01:16:14: Open Broadcaster Software v0.651b - 32bit (´・ω・`)
01:16:14: -------------------------------
01:16:14: CPU Name: Intel(R) Core(TM) i7-5960X CPU @ 3.00GHz
01:16:14: CPU Speed: 3818MHz
01:16:14: Physical Memory:  4095MB Total, 4095MB Free
01:16:14: stepping id: 2, model 63, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 16, total cores 8
01:16:14: monitor 1: pos={0, 0}, size={1920, 1080}
01:16:14: Windows Version: 6.2 Build 9200
01:16:14: Aero is Enabled
01:16:14: -------------------------------
01:16:14: OBS Modules:
01:16:14: Base Address     Module
01:16:14: 00940000         OBS.exe
01:16:14: 6A560000         OBSApi.dll
01:16:14: 6A310000         CLRHostPlugin.dll
01:16:14: 5FED0000         DShowPlugin.dll
01:16:14: 69FA0000         GraphicsCapture.dll
01:16:14: 61E80000         NoiseGate.dll
01:16:14: 6A2F0000         PSVPlugin.dll
01:16:14: 5FEB0000         scenesw.dll
01:16:14: 73220000         VideoSourcePluginWrapper.dll
01:16:14: ------------------------------------------
01:16:14: Adapter 1
01:16:14:   Video Adapter: NVIDIA GeForce GTX 980
01:16:14:   Video Adapter Dedicated Video Memory: 3221225472
01:16:14:   Video Adapter Shared System Memory: 1073676288
01:16:14:   Video Adapter Output 1: pos={0, 0}, size={1920, 1080}, attached=true
01:16:14: =====Stream Start: 2015-04-28, 01:16:14===============================================
01:16:14:   Multithreaded optimizations: On
01:16:14:   Base resolution: 1920x1080
01:16:14:   Output resolution: 1920x1080
01:16:14: ------------------------------------------
01:16:14: Loading up D3D10 on NVIDIA GeForce GTX 980 (Adapter 1)...
01:16:14: ------------------------------------------
01:16:14: Audio Format: 48000 Hz
01:16:14: ------------------------------------------
01:16:14: Audio Channels: 2 Ch
01:16:14: Playback device {0.0.0.00000000}.{88c46a62-97e3-4b16-ba87-a537637f3c05}
01:16:14: ------------------------------------------
01:16:14: Using desktop audio input: CABLE-A Input (VB-Audio Cable A)
01:16:14: Global Audio time adjust: 0
01:16:14: ------------------------------------------
01:16:14: Using auxilary audio input: CABLE-B Output (VB-Audio Cable B)
01:16:14: Mic time offset: 0
01:16:14: ------------------------------------------
01:16:14: Audio Encoding: AAC
01:16:14:     bitrate: 160
01:16:14: ------------------------------------------
01:16:14:     device: SA7160 PCI, Analog 01 Capture,
01:16:14:     device id \\?\pci#ven_1131&dev_7160&subsys_12abe517&rev_03#6&1eadc0e5&0&00080018#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{6f814be9-9af6-43cf-9249-c0340100021c},
01:16:14:     chosen type: YUY2, usingFourCC: false, res: 1920x1080 - 1920x1080, frameIntervals: 166833-333667
01:16:14:     use buffering: false - 0, fourCC: 'YUY2'
01:16:14:     audio device: SA7160 PCI, Analog 01 WaveIn,
01:16:14:     audio device id \\?\pci#ven_1131&dev_7160&subsys_12abe517&rev_03#6&1eadc0e5&0&00080018#{33d9a762-90c8-11d0-bd43-00a0c911ce86}\{6f814be9-9af6-43cf-9249-c0340100031c},
01:16:14:     audio time offset 0,
01:16:14:
01:16:14: Using directshow input
01:16:14: ------------------------------------------
01:16:14:     device: Datapath VisionDVI-DL Video 01,
01:16:14:     device id (null),
01:16:14:     chosen type: YUY2, usingFourCC: false, res: 320x240 - 4096x4096, frameIntervals: 1000-10000000
01:16:14:     use buffering: false - 0, fourCC: 'YUY2'
01:16:14:     audio device: Line In (Realtek High Definition Audio),
01:16:14:     audio device id (null),
01:16:14:     audio time offset 0,
01:16:14:
01:16:14:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
01:16:14: Using directshow input
01:16:14: Scene buffering time set to 700
01:16:14: ------------------------------------------
01:16:14: Video Encoding: x264
01:16:14:     fps: 30
01:16:14:     width: 1920, height: 1080
01:16:14:     preset: medium
01:16:14:     profile: main
01:16:14:     keyint: 60
01:16:14:     CBR: yes
01:16:14:     CFR: yes
01:16:14:     max bitrate: 5000
01:16:14:     buffer size: 5000
01:16:14: ------------------------------------------
01:17:49: Total frames encoded: 2815, total frames duplicated: 0 (0.00%)
01:17:49: Total frames rendered: 2839, number of late frames: 1 (0.04%) (it's okay for some frames to be late)
01:17:50:
01:17:50: Profiler time results:
01:17:50:
01:17:50: ==============================================================
01:17:50: video thread frame - [100%] [avg time: 3.159 ms] [children: 87.2%] [unaccounted: 12.8%]
01:17:50: | scene->Preprocess - [83.9%] [avg time: 2.65 ms]
01:17:50: | GPU download and conversion - [3.36%] [avg time: 0.106 ms] [children: 3.07%] [unaccounted: 0.285%]
01:17:50: | | flush - [2.69%] [avg time: 0.085 ms]
01:17:50: | | CopyResource - [0.19%] [avg time: 0.006 ms]
01:17:50: | | conversion to 4:2:0 - [0.19%] [avg time: 0.006 ms]
01:17:50: Convert444Threads - [100%] [avg time: 0.362 ms] [children: 98.3%] [unaccounted: 1.66%]
01:17:50: | Convert444toNV12 - [98.3%] [avg time: 0.356 ms]
01:17:50: encoder thread frame - [100%] [avg time: 1.589 ms] [children: 0.126%] [unaccounted: 99.9%]
01:17:50: | sending stuff out - [0.126%] [avg time: 0.002 ms]
01:17:50: ==============================================================
01:17:50:
01:17:50:
01:17:50: Profiler CPU results:
01:17:50:
01:17:50: ==============================================================
01:17:50: video thread frame - [cpu time: avg 2.542 ms, total 7218.75 ms] [avg calls per frame: 1]
01:17:50: | scene->Preprocess - [cpu time: avg 2.3 ms, total 6531.25 ms] [avg calls per frame: 1]
01:17:50: | GPU download and conversion - [cpu time: avg 0.055 ms, total 156.25 ms] [avg calls per frame: 1]
01:17:50: | | flush - [cpu time: avg 0.049 ms, total 140.625 ms] [avg calls per frame: 1]
01:17:50: | | CopyResource - [cpu time: avg 0.005 ms, total 15.625 ms] [avg calls per frame: 1]
01:17:50: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
01:17:50: Convert444Threads - [cpu time: avg 0.479 ms, total 8109.38 ms] [avg calls per frame: 6]
01:17:50: | Convert444toNV12 - [cpu time: avg 0.477 ms, total 8062.5 ms] [avg calls per frame: 6]
01:17:50: encoder thread frame - [cpu time: avg 1.143 ms, total 3218.75 ms] [avg calls per frame: 1]
01:17:50: | sending stuff out - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
01:17:50: ==============================================================
01:17:50:
01:17:50: =====Stream End: 2015-04-28, 01:17:50=================================================
01:17:50: CLR host plugin instance deleted; removing dynamically loaded localization strings
01:17:50: Video Source Plugin instance deleted; removing dynamically loaded localization strings
01:17:50: Terminating 0x1ab0
 
Last edited:

kolenka

New Member
Hi, I got the EXACT same problem. BTW I'm using Virtual Audio to redirect output to desktop. There is a delay of ~500ms which is a real problem in my case... :(. Anyone got a fix ???
 

EDGAR_SEC

Member
Hi, I got the EXACT same problem. BTW I'm using Virtual Audio to redirect output to desktop. There is a delay of ~500ms which is a real problem in my case... :(. Anyone got a fix ???

Yup, found a solution to it and was able to verify the sync by local recording and then opening up the clip in Sony Vegas to verify the sound source was in sync with the video.

I had a detailed post somewhere on the Twitch subreddit on how to fix it, but I can't find it now since they kindly banned me over there. If I have time later this week, I'll try to create a detailed response here.
 
Top