Question / Help Audio Mic Lags behind as stream goes on.

gamerprox

Member
Once I start my stream, everything is perfect, maybe an hour into the broadcast, a lag between my mic and cam begins to appear, and gets way worse as the stream goes on. All this is gaming stream, the game never lags behind and is always on point, however, once in awhile people will complain of an "echo" from the game, that goes away after restarting OBS, also once I reset OBS, my Mic and Web Cam are sync back up, at least until an hour into the broadcast.

My Log:

Code:
22:10:07: Open Broadcaster Software v0.554b - 32bit (´・ω・`)
22:10:07: -------------------------------
22:10:07: CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
22:10:07: CPU Speed: 3411MHz
22:10:07: Physical Memory:  4095MB Total, 3762MB Free
22:10:07: stepping id: 7, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
22:10:07: monitor 1: pos={0, 0}, size={1920, 1080}
22:10:07: Windows Version: 6.1 Build 7601 S
22:10:07: Aero is Disabled
22:10:07: -------------------------------
22:10:07: OBS Modules:
22:10:07: Base Address     Module
22:10:07: 010A0000         OBS.exe
22:10:07: 5F790000         OBSApi.dll
22:10:07: 68080000         DShowPlugin.dll
22:10:07: 68060000         GraphicsCapture.dll
22:10:07: 68040000         NoiseGate.dll
22:10:07: 61CE0000         PSVPlugin.dll
22:10:07: ------------------------------------------
22:10:07: Adapter 1
22:10:07:   Video Adapter: NVIDIA GeForce GTX 570 
22:10:07:   Video Adapter Dedicated Video Memory: 1293352960
22:10:07:   Video Adapter Shared System Memory: 2952671232
22:10:07: =====Stream Start: 2013-09-14, 22:10:07===============================================
22:10:07:   Multithreaded optimizations: On
22:10:07:   Base resolution: 1920x1080
22:10:07:   Output resolution: 1280x720
22:10:07: ------------------------------------------
22:10:07: Loading up D3D10 on NVIDIA GeForce GTX 570...
22:10:07: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DrawTexture.pShader.blob
22:10:07: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DrawSolid.pShader.blob
22:10:07: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DownscaleBilinear1YUV.pShader.blob
22:10:07: Playback device Default
22:10:07: ------------------------------------------
22:10:07: Using desktop audio input: Speakers (SB Recon3D PCIe)
22:10:07: Using 5.1 speaker setup
22:10:07: ------------------------------------------
22:10:07: Using auxilary audio input: Microphone (SB Recon3D PCIe)
22:10:07: ------------------------------------------
22:10:07: Audio Encoding: AAC
22:10:07:     bitrate: 128
22:10:07: ------------------------------------------
22:10:07:     device: Logitech HD Pro Webcam C920,
22:10:07:     device id \\?\usb#vid_046d&pid_082d&mi_00#7&1b7dc182&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
22:10:07:     chosen type: I420, usingFourCC: false, res: 320x240 - 320x240, frameIntervals: 333333-2000000, fourCC: 'I420'
22:10:07:     audio device: Microphone (2- C-Media USB Audi,
22:10:07:     audio device id (null),
22:10:07: 
22:10:07: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/plugins/DShowPlugin/shaders/YUVToRGB.pShader.blob
22:10:07:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
22:10:07: Using directshow input
22:10:07: Using graphics capture
22:10:07: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DrawTexture_ColorAdjust.pShader.blob
22:10:07: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DrawTexture_ColorAdjust.pShader.blob
22:10:08: ------------------------------------------
22:10:08: Video Encoding: x264
22:10:08:     fps: 60
22:10:08:     width: 1280, height: 720
22:10:08:     preset: fast
22:10:08:     CBR: no
22:10:08:     CFR: no
22:10:08:     max bitrate: 2800
22:10:08:     buffer size: 2800
22:10:08:     quality: 8
22:10:08: ------------------------------------------
22:10:08: MMDeviceAudioSource: Frequency for device 'Speakers (SB Recon3D PCIe)' is 1152000, samples per sec is 48000
22:10:08: MMDeviceAudioSource: Frequency for device 'Microphone (SB Recon3D PCIe)' is 384000, samples per sec is 48000
22:10:08: Syncing audio to video time (WARNING: you should not be doing this if you are just having webcam desync, that's a separate issue)
22:10:08: SharedTexCapture hooked
22:10:09: Using RTMP service: Twitch / Justin.tv
22:10:09:   Server selection: rtmp://live-ord.justin.tv/app
22:10:09:   Interface: Realtek PCIe GBE Family Controller (ethernet, 1000 mbps)
22:10:10: SO_SNDBUF was at 8192
22:10:10: SO_SNDBUF is now 65536
01:01:13: Capture window 0x0004083A invalid or changing, terminating capture
01:01:40: SharedTexCapture hooked
01:08:20: RTMPPublisher::Socketloop: Increasing send buffer to ISB 131072 (buffer: 0 / 374784)
02:06:35: Capture window 0x00030BCE invalid or changing, terminating capture
02:07:08: SharedTexCapture hooked
03:23:07: Total frames rendered: 1109097, number of late frames: 10520 (0.95%) (it's okay for some frames to be late)
03:23:08: RTMPPublisher::SocketLoop: Graceful loop exit
03:23:08: Number of times waited to send: 28, Waited for a total of 101902 bytes
03:23:08: Number of b-frames dropped: 3 (0.00027%), Number of p-frames dropped: 0 (0%), Total 3 (0.00027%)
03:23:08: 
03:23:08: Profiler results:
03:23:08: 
03:23:08: ==============================================================
03:23:08: frame - [100%] [avg time: 2.564 ms (cpu time: avg 1.743 ms, total 1.93357e+006 ms)] [avg calls per frame: 1] [children: 99.8%] [unaccounted: 0.234%]
03:23:08: | frame preprocessing and rendering - [19%] [avg time: 0.486 ms (cpu time: avg 0.386 ms, total 428254 ms)] [avg calls per frame: 1] [children: 1.21%] [unaccounted: 17.7%]
03:23:08: | | scene->Preprocess - [1.21%] [avg time: 0.031 ms (cpu time: avg 0.027 ms, total 30560.6 ms)] [avg calls per frame: 1]
03:23:08: | video encoding and uploading - [80.8%] [avg time: 2.072 ms (cpu time: avg 1.354 ms, total 1.50257e+006 ms)] [avg calls per frame: 1] [children: 61.1%] [unaccounted: 19.7%]
03:23:08: | | flush - [7.64%] [avg time: 0.196 ms (cpu time: avg 0.053 ms, total 59717.2 ms)] [avg calls per frame: 1]
03:23:08: | | CopyResource - [0.78%] [avg time: 0.02 ms (cpu time: avg 0.01 ms, total 11372.5 ms)] [avg calls per frame: 0]
03:23:08: | | conversion to 4:2:0 - [0.351%] [avg time: 0.009 ms (cpu time: avg 0.005 ms, total 6349.23 ms)] [avg calls per frame: 0]
03:23:08: | | call to encoder - [51.7%] [avg time: 1.325 ms (cpu time: avg 1.252 ms, total 1.38925e+006 ms)] [avg calls per frame: 0]
03:23:08: | | sending stuff out - [0.624%] [avg time: 0.016 ms (cpu time: avg 0.011 ms, total 13026.1 ms)] [avg calls per frame: 0]
03:23:08: | Convert444Threads - [1.32e+003%] [avg time: 33.863 ms (cpu time: avg 1.272 ms, total 1.4112e+006 ms)] [avg calls per frame: 1]
03:23:08: ==============================================================
03:23:08: 
03:23:08: =====Stream End: 2013-09-15, 03:23:08=================================================


Last game capture log:
2013-09-15, 02:06:54: we're booting up: 
02:06:55: D3D9 Present
02:06:55: DXGI Present
02:06:55: NV Capture available
02:06:55: FBO available
02:06:55: GL Present
02:06:55: (half life scientist) everything..  seems to be in order
02:07:08: DXGI: Found D3D 11
02:07:08: setting up d3d11 data
02:07:08: ---------------------- Cleared D3D11 Capture ----------------------
02:07:08: found dxgi format (dx11) of: 28, size: {1920, 1080}, multisampled: false
02:07:08: DoD3D11Hook: success
02:07:08: successfully capturing d3d11 frames via GPU
03:23:08: stop requested, terminating d3d11 capture
03:23:08: ---------------------- Cleared D3D11 Capture ----------------------
03:23:08: DoD3D11Hook: success
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
If you experience mic sync issues, first option is to try "Mic QPC timestamps" option in advanced, along with a high "scene buffering time" of 1000 preferably. That can typically solve most problems in that regard, though not always.

Second option is for a far more rare scenario where that doesn't work, and you need to turn that off and try "Mic sync fix hack" instead, but it has some risks because it's a temporary solution that's only meant for certain situations (I'm trying to fix the code so that the option isn't necessary but it will take time)
 

gamerprox

Member
Ok, did your first option, no change at all. Second option also failed.

Heres a video showing you what happens, at the start, you see im mostly sync'ed, but you can notice a small delay, mid way you see the bigger delay, at the end, its a large delay.

http://www.twitch.tv/burkeblack/b/462203013

At 00:21:00 Minutes, you see a small delay.
At )2:21:00 you see the delay has gotten worse.
At 04:40:00 you can see it is at its worst.

EDIT: I forgot the video link, gah! Now its posted.

Fresh Log File

Code:
23:32:42: Open Broadcaster Software v0.554b - 32bit (´・ω・`)
23:32:42: -------------------------------
23:32:42: CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
23:32:42: CPU Speed: 3411MHz
23:32:42: Physical Memory:  4095MB Total, 3394MB Free
23:32:42: stepping id: 7, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
23:32:42: monitor 1: pos={0, 0}, size={1920, 1080}
23:32:42: Windows Version: 6.1 Build 7601 S
23:32:42: Aero is Disabled
23:32:42: -------------------------------
23:32:42: OBS Modules:
23:32:42: Base Address     Module
23:32:42: 010F0000         OBS.exe
23:32:42: 57790000         OBSApi.dll
23:32:42: 57550000         DShowPlugin.dll
23:32:42: 71980000         GraphicsCapture.dll
23:32:42: 71730000         NoiseGate.dll
23:32:42: 57530000         PSVPlugin.dll
23:32:42: ------------------------------------------
23:32:42: Adapter 1
23:32:42:   Video Adapter: NVIDIA GeForce GTX 570 
23:32:42:   Video Adapter Dedicated Video Memory: 1293352960
23:32:42:   Video Adapter Shared System Memory: 2952671232
23:32:42: =====Stream Start: 2013-09-15, 23:32:42===============================================
23:32:42:   Multithreaded optimizations: On
23:32:42:   Base resolution: 1920x1080
23:32:42:   Output resolution: 1280x720
23:32:42: ------------------------------------------
23:32:42: Loading up D3D10 on NVIDIA GeForce GTX 570...
23:32:42: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DrawTexture.pShader.blob
23:32:42: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DrawSolid.pShader.blob
23:32:42: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DownscaleBilinear1YUV.pShader.blob
23:32:42: Playback device Default
23:32:42: ------------------------------------------
23:32:42: Using desktop audio input: Speakers (SB Recon3D PCIe)
23:32:42: Using 5.1 speaker setup
23:32:42: ------------------------------------------
23:32:42: Using auxilary audio input: Microphone (SB Recon3D PCIe)
23:32:42: Using Mic QPC timestamps
23:32:42: ------------------------------------------
23:32:42: Audio Encoding: AAC
23:32:42:     bitrate: 128
23:32:42: ------------------------------------------
23:32:42:     device: Logitech HD Pro Webcam C920,
23:32:42:     device id \\?\usb#vid_046d&pid_082d&mi_00#7&1b7dc182&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
23:32:42:     chosen type: I420, usingFourCC: false, res: 320x240 - 320x240, frameIntervals: 333333-2000000, fourCC: 'I420'
23:32:42:     audio device: Microphone (2- C-Media USB Audi,
23:32:42:     audio device id (null),
23:32:42: 
23:32:42: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/plugins/DShowPlugin/shaders/YUVToRGB.pShader.blob
23:32:42:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
23:32:42: Using directshow input
23:32:42: Using graphics capture
23:32:42: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DrawTexture_ColorAdjust.pShader.blob
23:32:42: C:/Users/Burke/AppData/Roaming/OBS/shaderCache/shaders/DrawTexture_ColorAdjust.pShader.blob
23:32:42: ------------------------------------------
23:32:42: Video Encoding: x264
23:32:42:     fps: 60
23:32:42:     width: 1280, height: 720
23:32:42:     preset: fast
23:32:42:     CBR: yes
23:32:42:     CFR: no
23:32:42:     max bitrate: 2800
23:32:42:     buffer size: 2800
23:32:42: ------------------------------------------
23:32:42: MMDeviceAudioSource: Frequency for device 'Speakers (SB Recon3D PCIe)' is 1152000, samples per sec is 48000
23:32:42: MMDeviceAudioSource: Frequency for device 'Microphone (SB Recon3D PCIe)' is 384000, samples per sec is 48000
23:32:42: SharedTexCapture hooked
23:32:43: Audio timestamp for device 'Microphone (SB Recon3D PCIe)' was behind target timestamp by 8!  Had to delete audio segment.
23:32:43: 
23:32:45: Using RTMP service: Twitch / Justin.tv
23:32:45:   Server selection: rtmp://live-ord.justin.tv/app
23:32:45:   Interface: Realtek PCIe GBE Family Controller (ethernet, 1000 mbps)
23:32:46: SO_SNDBUF was at 8192
23:32:46: SO_SNDBUF is now 65536
23:32:48: RTMPPublisher::Socketloop: Increasing send buffer to ISB 131072 (buffer: 25452 / 374784)
23:38:02: Capture window 0x00061034 invalid or changing, terminating capture
23:38:30: SharedTexCapture hooked
04:28:25: Total frames rendered: 1042016, number of late frames: 17788 (1.71%) (it's okay for some frames to be late)
04:28:27: RTMPPublisher::SocketLoop: Graceful loop exit
04:28:27: Number of times waited to send: 13546, Waited for a total of 50268768 bytes
04:28:27: Number of b-frames dropped: 31871 (3.1%), Number of p-frames dropped: 20300 (1.9%), Total 52171 (5%)
04:28:27: 
04:28:27: Profiler results:
04:28:27: 
04:28:27: ==============================================================
04:28:27: frame - [100%] [avg time: 2.537 ms (cpu time: avg 1.42 ms, total 1.47993e+006 ms)] [avg calls per frame: 1] [children: 99.8%] [unaccounted: 0.236%]
04:28:27: | frame preprocessing and rendering - [4.85%] [avg time: 0.123 ms (cpu time: avg 0.101 ms, total 105332 ms)] [avg calls per frame: 1] [children: 1.1%] [unaccounted: 3.74%]
04:28:27: | | scene->Preprocess - [1.1%] [avg time: 0.028 ms (cpu time: avg 0.026 ms, total 27113 ms)] [avg calls per frame: 1]
04:28:27: | video encoding and uploading - [94.9%] [avg time: 2.408 ms (cpu time: avg 1.316 ms, total 1.37225e+006 ms)] [avg calls per frame: 1] [children: 62.7%] [unaccounted: 32.2%]
04:28:27: | | flush - [9.38%] [avg time: 0.238 ms (cpu time: avg 0.048 ms, total 50419.5 ms)] [avg calls per frame: 1]
04:28:27: | | CopyResource - [1.06%] [avg time: 0.027 ms (cpu time: avg 0.013 ms, total 13993.3 ms)] [avg calls per frame: 0]
04:28:27: | | conversion to 4:2:0 - [0.512%] [avg time: 0.013 ms (cpu time: avg 0.005 ms, total 6068.44 ms)] [avg calls per frame: 0]
04:28:27: | | call to encoder - [51%] [avg time: 1.295 ms (cpu time: avg 1.211 ms, total 1.26277e+006 ms)] [avg calls per frame: 0]
04:28:27: | | sending stuff out - [0.67%] [avg time: 0.017 ms (cpu time: avg 0.014 ms, total 14632.9 ms)] [avg calls per frame: 0]
04:28:27: | Convert444Threads - [1.34e+003%] [avg time: 34.049 ms (cpu time: avg 1.25 ms, total 1.30342e+006 ms)] [avg calls per frame: 1]
04:28:27: ==============================================================
04:28:27: 
04:28:27: =====Stream End: 2013-09-16, 04:28:27=================================================


Last game capture log:
2013-09-15, 23:38:30: we're booting up: 
23:38:30: D3D9 Present
23:38:30: DXGI Present
23:38:30: DXGI: Found D3D 11
23:38:30: setting up d3d11 data
23:38:30: ---------------------- Cleared D3D11 Capture ----------------------
23:38:30: found dxgi format (dx11) of: 28, size: {1920, 1080}, multisampled: false
23:38:30: DoD3D11Hook: success
23:38:30: successfully capturing d3d11 frames via GPU
23:38:31: NV Capture available
23:38:31: FBO available
23:38:31: GL Present
23:38:31: (half life scientist) everything..  seems to be in order
04:28:26: stop requested, terminating d3d11 capture
04:28:26: ---------------------- Cleared D3D11 Capture ----------------------
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Okay, now try turning off the QPC timestamps and using "Mic sync fix hack" as the last resort option then. (on a side note, I've never seen "SB Recon3D PCIe" before)
 

gamerprox

Member
I have this delay, EVRN if I use OBS just for capturing a video on my computer, I dont even need to stream in twitch to cause it. I clap my hands, you hear the sound delayed.
 

gamerprox

Member
Update: Ok, so just messing around with stuff, let me be more clear about my set up. My sound system is the Tritton Pros, this uses a box for true 5.1 sound, the Mic connect from my head set to the box, and into a usb into my pc, if I use the mic from my web cam, the delay goes away, I thought it delayed too because I never disabled the headset mic.

So im fine using the webcam mic, however, I would like to use the headset mic for vent, but when I run OBS and set my webcam mic as the main one for OBS, OBS still picks up both mics, any way to stop this, and still use the headset mic for vent?
 
Top