Question / Help Random Desync Webcam and Microphone depends on live time :/

Vojtaz

New Member
Hello Everybody.
I have annoying issues with my webcam and microphone sync.

I have using - streaming with Logitech C270 (webcam) and Samson G-Track (microphone).
When i'm starting livestream, everything is ok but for longer more the webcam and microphone are desync i see on OBS the delay between saying something to microphone and moving the "microphone volume bar" (receiving my voice in obs).
The delay depends on how longer i'm streaming. At all the maximum delay (between webcame and mic) what i've noticed is 3 seconds after 10-15 minutes livestreaming :/

It can be Procesor fault or USB (2.0 or something)?
Anyone can help me and fix it when it's possible?
I've tried to set delay on webcam (buffer time on webcam) but it's not working ;/
The delay it's only between webcam and microphone, game and video(from game) are sync.

Here's my log:
Code:
20:32:30: Open Broadcaster Software v0.542b - 64bit ( ^ω^)
20:32:30: -------------------------------
20:32:30: CPU Name: AMD Athlon(tm) II X4 640 Processor
20:32:30: CPU Speed: 3021MHz
20:32:30: Physical Memory:  4092MB Total, 1030MB Free
20:32:30: stepping id: 3, model 5, family 15, type 0, extmodel 8, extfamily 0, HTT 1, logical cores 4, total cores 4
20:32:30: monitor 1: pos={0, 0}, size={1920, 1080}
20:32:30: monitor 2: pos={-1280, 10}, size={1280, 1024}
20:32:30: Windows Version: 6.1 Build 7601 S
20:32:30: Aero is Disabled
20:32:30: -------------------------------
20:32:30: OBS Modules:
20:32:30: Base Address     Module
20:32:30: 000000003F810000 OBS.exe
20:32:30: 00000000EF380000 OBSApi.dll
20:32:30: 00000000F77F0000 DShowPlugin.dll
20:32:30: 00000000F5860000 GraphicsCapture.dll
20:32:30: 00000000F77D0000 NoiseGate.dll
20:32:30: 00000000F5520000 PSVPlugin.dll
20:32:30: ------------------------------------------
20:32:30: Adapter 1
20:32:30:   Video Adapter: NVIDIA GeForce GTS 250
20:32:30:   Video Adapter Dedicated Video Memory: 1054408704
20:32:30:   Video Adapter Shared System Memory: 1877032960
20:32:30: =====Stream Start: 2013-07-22, 20:32:30===============================================
20:32:30:   Multithreaded optimizations: Off
20:32:30:   Base resolution: 1920x1080
20:32:30:   Output resolution: 1280x720
20:32:30: ------------------------------------------
20:32:30: Loading up D3D10...
20:32:31: Playback device {0.0.0.00000000}.{0d0427d3-3b8b-4bf5-b58a-e11d6ee1f449}
20:32:31: ------------------------------------------
20:32:31: Using desktop audio input: Głośniki (4 — USB Audio CODEC )
20:32:31: ------------------------------------------
20:32:31: Audio Encoding: AAC
20:32:31:     bitrate: 192
20:32:31: Using text output
20:32:31: Using bitmap image
20:32:31: ------------------------------------------
20:32:31:     device: Logitech HD Webcam C270,
20:32:31:     device id \\?\usb#vid_046d&pid_0825&mi_00#6&1b2b84d7&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
20:32:31:     chosen type: I420, usingFourCC: false, res: 1280x720 - 1280x720, frameIntervals: 333333-2000000, fourCC: 'I420'
20:32:31:     audio device: Mikrofon (4 — USB Audio CODEC ),
20:32:31:     audio device id (null),
20:32:31:
20:32:31:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
20:32:31: Using directshow input
20:32:31: Using graphics capture
20:32:32: ------------------------------------------
20:32:32: Video Encoding: x264
20:32:32:     fps: 45
20:32:32:     width: 1280, height: 720
20:32:32:     preset: veryfast
20:32:32:     CBR: no
20:32:32:     CFR: no
20:32:32:     max bitrate: 3000
20:32:32:     buffer size: 6000
20:32:32:     quality: 8
20:32:32: ------------------------------------------
20:32:32: Syncing audio to video time (WARNING: you should not be doing this if you are just having webcam desync, that's a separate issue)
20:32:33: Using RTMP service: Twitch / Justin.tv
20:32:33:   Server selection: rtmp://live-fra.justin.tv/app
20:32:34: SharedTexCapture hooked
20:32:36: SO_SNDBUF was at 8192
20:32:36: SO_SNDBUF is now 65536
20:42:41: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
20:42:41:   New Scene
20:42:41: Using text output
20:42:41: Using bitmap image
20:42:41: Using Window Capture
20:42:41: ------------------------------------------
20:42:41:     device: Logitech HD Webcam C270,
20:42:41:     device id \\?\usb#vid_046d&pid_0825&mi_00#6&1b2b84d7&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
20:42:41:     chosen type: I420, usingFourCC: false, res: 1280x720 - 1280x720, frameIntervals: 333333-2000000, fourCC: 'I420'
20:42:41:     audio device: Mikrofon (4 — USB Audio CODEC ),
20:42:41:     audio device id (null),
20:42:41:
20:42:41:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
20:42:41: Using directshow input
20:42:48: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
20:42:48:   New Scene
20:42:48: Using text output
20:42:48: Using bitmap image
20:42:49: ------------------------------------------
20:42:49:     device: Logitech HD Webcam C270,
20:42:49:     device id \\?\usb#vid_046d&pid_0825&mi_00#6&1b2b84d7&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
20:42:49:     chosen type: I420, usingFourCC: false, res: 1280x720 - 1280x720, frameIntervals: 333333-2000000, fourCC: 'I420'
20:42:49:     audio device: Mikrofon (4 — USB Audio CODEC ),
20:42:49:     audio device id (null),
20:42:49:
20:42:49:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
20:42:49: Using directshow input
20:42:49: Using graphics capture
20:42:50: SharedTexCapture hooked
20:46:52: Exit signal received, terminating capture
20:46:53: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
20:46:53:   New Scene
20:46:53: Using text output
20:46:53: Using bitmap image
20:46:53: Using Window Capture
20:46:53: ------------------------------------------
20:46:53:     device: Logitech HD Webcam C270,
20:46:53:     device id \\?\usb#vid_046d&pid_0825&mi_00#6&1b2b84d7&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
20:46:53:     chosen type: I420, usingFourCC: false, res: 1280x720 - 1280x720, frameIntervals: 333333-2000000, fourCC: 'I420'
20:46:53:     audio device: Mikrofon (4 — USB Audio CODEC ),
20:46:53:     audio device id (null),
20:46:53:
20:46:53:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
20:46:53: Using directshow input
20:57:28: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
20:57:28:   New Scene
20:57:28: Using text output
20:57:28: Using bitmap image
20:57:28: ------------------------------------------
20:57:28:     device: Logitech HD Webcam C270,
20:57:28:     device id \\?\usb#vid_046d&pid_0825&mi_00#6&1b2b84d7&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
20:57:28:     chosen type: I420, usingFourCC: false, res: 1280x720 - 1280x720, frameIntervals: 333333-2000000, fourCC: 'I420'
20:57:28:     audio device: Mikrofon (4 — USB Audio CODEC ),
20:57:28:     audio device id (null),
20:57:28:
20:57:28:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
20:57:28: Using directshow input
20:57:28: Using graphics capture
20:57:29: SharedTexCapture hooked
21:27:48: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
21:27:48:   New Scene
21:27:48: Using text output
21:27:48: Using bitmap image
21:27:48: Using Window Capture
21:27:48: ------------------------------------------
21:27:48:     device: Logitech HD Webcam C270,
21:27:48:     device id \\?\usb#vid_046d&pid_0825&mi_00#6&1b2b84d7&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083},
21:27:48:     chosen type: I420, usingFourCC: false, res: 1280x720 - 1280x720, frameIntervals: 333333-2000000, fourCC: 'I420'
21:27:48:     audio device: Mikrofon (4 — USB Audio CODEC ),
21:27:48:     audio device id (null),
21:27:48:
21:27:48:     device audio info - bits per sample: 16, channels: 2, samples per sec: 44100, block size: 4
21:27:48: Using directshow input
21:28:10: Total frames rendered: 149638, number of frames that lagged: 1807 (1.21%) (it's okay for some frames to lag)
21:28:10: RTMPPublisher::SocketLoop: Aborting due to bStopping
21:28:10: Number of times waited to send: 0, Waited for a total of 0 bytes
21:28:10: Number of b-frames dropped: 27 (0.018%), Number of p-frames dropped: 30 (0.02%), Total 57 (0.038%)
21:28:10: =====Stream End: 2013-07-22, 21:28:10=================================================
21:28:11:
21:28:11: Profiler results:
21:28:11:
21:28:11: ==============================================================
21:28:11: frame - [100%] [avg time: 11.902 ms (cpu time: avg 8.02 ms, total 1.2001e+006 ms)] [avg calls per frame: 1] [children: 99.9%] [unaccounted: 0.0504%]
21:28:11: | frame preprocessing and rendering - [24%] [avg time: 2.853 ms (cpu time: avg 2.415 ms, total 361470 ms)] [avg calls per frame: 1] [children: 20.4%] [unaccounted: 3.57%]
21:28:11: | | scene->Preprocess - [20.4%] [avg time: 2.428 ms (cpu time: avg 2.065 ms, total 309100 ms)] [avg calls per frame: 1]
21:28:11: | video encoding and uploading - [76%] [avg time: 9.043 ms (cpu time: avg 5.601 ms, total 838240 ms)] [avg calls per frame: 1] [children: 75.8%] [unaccounted: 0.185%]
21:28:11: | | flush - [0.857%] [avg time: 0.102 ms (cpu time: avg 0.093 ms, total 13930.9 ms)] [avg calls per frame: 1]
21:28:11: | | CopyResource - [48.6%] [avg time: 5.787 ms (cpu time: avg 2.449 ms, total 366540 ms)] [avg calls per frame: 0]
21:28:11: | | conversion to 4:2:0 - [11.5%] [avg time: 1.366 ms (cpu time: avg 1.338 ms, total 200290 ms)] [avg calls per frame: 0]
21:28:11: | | call to encoder - [14.7%] [avg time: 1.745 ms (cpu time: avg 1.689 ms, total 252768 ms)] [avg calls per frame: 0]
21:28:11: | | sending stuff out - [0.176%] [avg time: 0.021 ms (cpu time: avg 0.018 ms, total 2808.03 ms)] [avg calls per frame: 0]
21:28:11: ==============================================================
21:28:11:
 

Krazy

Town drunk
Re: Random Desync Webcam and Microphone depends on live time

You can try "Use Mic QPC timestamps" in Advanced, and then turn the Scene Buffering time up to 700 or higher, also in Advanced.
 

Vojtaz

New Member
Re: Random Desync Webcam and Microphone depends on live time

I'll check it. If it won't work i will respond in this thread.
 

Vojtaz

New Member
Re: Random Desync Webcam and Microphone depends on live time

If i set Use Mic Timestamps my microphone is turning off on OBS after 5 minutes from start streaming.
My mic: Samson G-Track

But if i have this mic timestamps on i feel sync with my webcam and microphone = good but my microphone is turning off in OBS as I said - after 5 minutes from start streaming.

Anyone can handle this ? :(
 

Krazy

Town drunk
Re: Random Desync Webcam and Microphone depends on live time

Did you raise the scene buffering time as well? If you don't raise it to at least 700, it will mute your mic after a while. You may need to turn it up even higher than 700
 

Vojtaz

New Member
Re: Random Desync Webcam and Microphone depends on live time

Yep i've tried increasing the buffer time to 700/1200 and 2000, after few minutes my Microphone is going off automatically :/

And i'm noticed the Mic QMP Timestamps are perfect way to sync my mic and webcam but the f*cking mic mute is annoying :/


Screen:
OeNKfM.png
 

Krazy

Town drunk
Re: Random Desync Webcam and Microphone depends on live time

Oh, you enabled "Force desktop audio to use video timestamps" for some reason. You shouldn't have done that. Disable that option and things should start working better.
 
Top