Bug Report Video and audio out of sync!

SquareMonocle

New Member
So yesterday I was streaming just fine but then when I got home today and tried to stream I notice when watching my own stream to make sure everything is good my cam shows me saying the things I say first then 2~ seconds later my voice plays.

Just for sake of it I tested XSplit and it isnt out of sync but it drops frames like no other.

Code:
12:11:33: Open Broadcaster Software v0.522b - 64bit ( ^ω^)
12:11:33: -------------------------------
12:11:33: CPU Name: AMD Phenom(tm) II X6 1045T Processor
12:11:33: CPU Speed: 2700MHz
12:11:33: Physical Memory:  8191MB Total, 4472MB Free
12:11:33: stepping id: 0, model 10, family 15, type 0, extmodel 8, extfamily 0, HTT 1, logical cores 6, total cores 6
12:11:33: monitor 1: pos={0, 0}, size={1920, 1080}
12:11:33: monitor 2: pos={1920, 0}, size={1280, 1024}
12:11:33: Windows Version: 6.2 Build 9200 
12:11:33: Aero is Enabled
12:11:33: -------------------------------
12:11:33: OBS Modules:
12:11:33: Base Address     Module
12:11:33: 00000000431A0000 OBS.exe
12:11:33: 00000000191E0000 OBSApi.dll
12:11:33: 00000000275B0000 DShowPlugin.dll
12:11:33: 0000000027580000 GraphicsCapture.dll
12:11:33: 0000000027410000 NoiseGate.dll
12:11:33: 00000000273F0000 scenesw.dll
12:11:33: 0000000027240000 WebSocketAPIPlugin.dll
12:11:33: ------------------------------------------
12:11:33: Adapter 1
12:11:33:   Video Adapter: NVIDIA GeForce GTX 550 Ti
12:11:33:   Video Adapter Dedicated Video Memory: 1012596736
12:11:33:   Video Adapter Shared System Memory: 3220779008
12:11:33: Using fixed low latency mode, factor 20
12:11:33: =====Stream Start: 2013-06-18, 12:11:33===============================================
12:11:33:   Multithreaded optimizations: On
12:11:33:   Base resolution: 1920x1080
12:11:33:   Output resolution: 1920x1080
12:11:33: ------------------------------------------
12:11:33: Loading up D3D10...
12:11:33: Playback device {0.0.0.00000000}.{6100150b-119a-4a8a-8b13-07b7bdfe3201}
12:11:33: ------------------------------------------
12:11:33: Using desktop audio input: Headphones (Realtek High Definition Audio)
12:11:33: ------------------------------------------
12:11:33: Using auxilary audio input: Microphone (Realtek High Definition Audio)
12:11:33: ------------------------------------------
12:11:33: Audio Encoding: AAC
12:11:33:     bitrate: 128
12:11:33: Using Monitor Capture
12:11:33: ------------------------------------------
12:11:33: Video Encoding: x264
12:11:33:     fps: 48
12:11:33:     width: 1920, height: 1080
12:11:33:     preset: superfast
12:11:33:     CBR: yes
12:11:33:     CFR: no
12:11:33:     max bitrate: 3300
12:11:33: ------------------------------------------
12:11:34: Using RTMP service: Twitch / Justin.tv
12:11:34:   Server selection: rtmp://live-ord.justin.tv/app
12:11:35: SO_SNDBUF was at 65536
12:11:35: SO_SNDBUF is now 65536
12:11:56: Using bitmap image
12:11:58: ------------------------------------------
12:11:58:     device: AVerMedia BDA Analog Capture,
12:11:58:     device id \\?\pci#ven_1a0a&dev_6202&subsys_62021461&rev_01#4&28d222ac&0&0048#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6},
12:11:58:     chosen type: YUY2, usingFourCC: false, res: 160x120 - 720x480, frameIntervals: 166833-333667, fourCC: 'YUY2'
12:11:58:     audio device: Disable,
12:11:58:     audio device id Disabled,
12:11:58: 
12:11:58: Using directshow input
12:11:59: Using Monitor Capture
12:12:00: ------------------------------------------
12:12:00:     device: AVerMedia BDA Analog Capture,
12:12:00:     device id \\?\pci#ven_1a0a&dev_6202&subsys_62021461&rev_01#4&28d222ac&0&0048#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6},
12:12:00:     chosen type: YUY2, usingFourCC: false, res: 160x120 - 720x480, frameIntervals: 166833-333667, fourCC: 'YUY2'
12:12:00:     audio device: Disable,
12:12:00:     audio device id Disabled,
12:12:00: 
12:12:00: Using directshow input
12:16:04: Total frames rendered: 12958, number of frames that lagged: 17 (0.13%) (it's okay for some frames to lag)
12:16:04: RTMPPublisher::SocketLoop: Aborting due to loop exit
12:16:04: Number of times waited to send: 0, Waited for a total of 0 bytes
12:16:04: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
12:16:04: =====Stream End: 2013-06-18, 12:16:04=================================================
12:16:40: Using fixed low latency mode, factor 20
12:16:40: =====Stream Start: 2013-06-18, 12:16:40===============================================
12:16:40:   Multithreaded optimizations: On
12:16:40:   Base resolution: 1920x1080
12:16:40:   Output resolution: 1280x720
12:16:40: ------------------------------------------
12:16:40: Loading up D3D10...
12:16:40: Playback device {0.0.0.00000000}.{6100150b-119a-4a8a-8b13-07b7bdfe3201}
12:16:40: ------------------------------------------
12:16:40: Using desktop audio input: Headphones (Realtek High Definition Audio)
12:16:40: ------------------------------------------
12:16:40: Using auxilary audio input: Microphone (Realtek High Definition Audio)
12:16:40: ------------------------------------------
12:16:40: Audio Encoding: AAC
12:16:40:     bitrate: 128
12:16:40: Using Monitor Capture
12:16:41: Using bitmap image
12:16:41: ------------------------------------------
12:16:41:     device: AVerMedia BDA Analog Capture,
12:16:41:     device id \\?\pci#ven_1a0a&dev_6202&subsys_62021461&rev_01#4&28d222ac&0&0048#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6},
12:16:41:     chosen type: YUY2, usingFourCC: false, res: 160x120 - 720x480, frameIntervals: 166833-333667, fourCC: 'YUY2'
12:16:41:     audio device: Disable,
12:16:41:     audio device id Disabled,
12:16:41: 
12:16:41: Using directshow input
12:16:41: Using Monitor Capture
12:16:41: ------------------------------------------
12:16:41: Video Encoding: x264
12:16:41:     fps: 48
12:16:41:     width: 1280, height: 720
12:16:41:     preset: superfast
12:16:41:     CBR: no
12:16:41:     CFR: no
12:16:41:     max bitrate: 3300
12:16:41:     buffer size: 3300
12:16:41:     quality: 10
12:16:41: ------------------------------------------
12:16:42: Using RTMP service: Twitch / Justin.tv
12:16:42:   Server selection: rtmp://live-ord.justin.tv/app
12:16:43: SO_SNDBUF was at 65536
12:16:43: SO_SNDBUF is now 65536
12:17:54: Total frames rendered: 3504, number of frames that lagged: 6 (0.17%) (it's okay for some frames to lag)
12:17:54: RTMPPublisher::SocketLoop: Aborting due to loop exit
12:17:54: Number of times waited to send: 0, Waited for a total of 0 bytes
12:17:54: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
12:17:54: =====Stream End: 2013-06-18, 12:17:54=================================================
12:18:05: Using fixed low latency mode, factor 20
12:18:05: =====Stream Start: 2013-06-18, 12:18:05===============================================
12:18:05:   Multithreaded optimizations: On
12:18:05:   Base resolution: 1920x1080
12:18:05:   Output resolution: 1280x720
12:18:05: ------------------------------------------
12:18:05: Loading up D3D10...
12:18:05: Playback device {0.0.0.00000000}.{6100150b-119a-4a8a-8b13-07b7bdfe3201}
12:18:05: ------------------------------------------
12:18:05: Using desktop audio input: Headphones (Realtek High Definition Audio)
12:18:05: ------------------------------------------
12:18:05: Using auxilary audio input: Microphone (Realtek High Definition Audio)
12:18:05: ------------------------------------------
12:18:05: Audio Encoding: AAC
12:18:05:     bitrate: 128
12:18:05: Using Monitor Capture
12:18:05: Using bitmap image
12:18:05: ------------------------------------------
12:18:05:     device: AVerMedia BDA Analog Capture,
12:18:05:     device id \\?\pci#ven_1a0a&dev_6202&subsys_62021461&rev_01#4&28d222ac&0&0048#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6},
12:18:05:     chosen type: YUY2, usingFourCC: false, res: 160x120 - 720x480, frameIntervals: 166833-333667, fourCC: 'YUY2'
12:18:05:     audio device: Disable,
12:18:05:     audio device id Disabled,
12:18:05: 
12:18:06: Using directshow input
12:18:06: Using Monitor Capture
12:18:06: ------------------------------------------
12:18:06: Video Encoding: x264
12:18:06:     fps: 48
12:18:06:     width: 1280, height: 720
12:18:06:     preset: superfast
12:18:06:     CBR: yes
12:18:06:     CFR: no
12:18:06:     max bitrate: 3300
12:18:06: ------------------------------------------
12:18:07: Using RTMP service: Twitch / Justin.tv
12:18:07:   Server selection: rtmp://live-ord.justin.tv/app
12:18:08: SO_SNDBUF was at 65536
12:18:08: SO_SNDBUF is now 65536
12:37:02: Total frames rendered: 54556, number of frames that lagged: 29 (0.05%) (it's okay for some frames to lag)
12:37:02: RTMPPublisher::SocketLoop: Aborting due to loop exit
12:37:02: Number of times waited to send: 5, Waited for a total of 20513 bytes
12:37:02: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
12:37:03: =====Stream End: 2013-06-18, 12:37:03=================================================
12:37:14: 
12:37:14: Profiler results:
12:37:14: 
12:37:14: ==============================================================
12:37:14: frame - [100%] [avg time: 3.925 ms] [avg calls per frame: 1] [children: 91.2%] [unaccounted: 8.82%]
12:37:14: | scene->Preprocess - [18.3%] [avg time: 0.718 ms] [avg calls per frame: 1]
12:37:14: | video encoding and uploading - [72.9%] [avg time: 2.861 ms] [avg calls per frame: 1] [children: 69.7%] [unaccounted: 3.16%]
12:37:14: | | CopyResource - [0.561%] [avg time: 0.022 ms] [avg calls per frame: 0]
12:37:14: | | conversion to 4:2:0 - [2.11%] [avg time: 0.083 ms] [avg calls per frame: 0]
12:37:14: | | call to encoder - [66.2%] [avg time: 2.597 ms] [avg calls per frame: 0]
12:37:14: | | sending stuff out - [0.892%] [avg time: 0.035 ms] [avg calls per frame: 0]
12:37:14: ==============================================================
12:37:14:
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
If your base desktop is out of sync with the built-in capture methods use the "Force desktop audio to use video timestamps as a base for audio time" in advanced (and -only- in that situation), if your capture device is out of sync and it has audio built in to the device then you should enable "use buffering" in the device source properties, otherwise I'm not entirely sure.

Looks like you're using a device to capture something. Devices aren't guaranteed to always be perfectly in sync with things like desktop, though typically internal cards don't have that problem. You're not using the audio on your device so if the video on that device is off then that general rule applies.

If your desktop audio is actually out of sync with monitor capture then that sounds like a fairly rare audio bug that can only be fixed by the option in advanced. Either that or you have a improperly overclocked CPU.

If you're a partnered streamer, enable "Use CFR" in advanced if you're having any problems with transcoder sync, as twitch's transcoders don't seem to like variable framerate at all.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I actually disocvered a workaround in code for this which will be in the next test build and next version. It'll be an option in advanced settings.
 
Top