Question / Help Audio Sync Issues even with Forced Audio Sync turned on

Aphox

New Member
Hi All,

I am experiencing audio sync issues, at the start of the stream its fine and it starts lagging behind more and more after a few minutes am already 5 seconds or more behind in audio. Would be really cool if there was a way to fix this.

I tried to shut down all programs in the background that I dont need for streaming as well, however that didnt seem to fix the issue.

Thanks in advance,
Aphox

----------------------------------------------------------------------------------------------------------------------------

Code:
Open Broadcaster Software v0.466a - 32bit (´・ω・`)
-------------------------------
CPU Name: Intel(R) Core(TM) i7 CPU         950  @ 3.07GHz
CPU Speed: 3105MHz
Physical Memory:  4095MB Total, 3048MB Free
stepping id: 5, model 10, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
Windows Version: 6.1 Build 7601 S
Aero is Disabled
------------------------------------------
Adapter 1
  Video Adapter: NVIDIA GeForce GTX 570
  Video Adapter Dedicated Video Memory: 1293352960
  Video Adapter Shared System Memory: 2948132864
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 640x360
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 96
Using Window Capture
Using text output
Using graphics capture
------------------------------------------
Video Encoding: x264
    fps: 25
    width: 640, height: 360
    preset: veryfast
    CBR: no
    max bitrate: 550
    buffer size: 1200
    quality: 7
------------------------------------------
SharedTexCapture hooked
Total frames rendered: 50, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 640x360
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 96
Using Window Capture
Using text output
Using graphics capture
------------------------------------------
Video Encoding: x264
    fps: 25
    width: 640, height: 360
    preset: veryfast
    CBR: no
    max bitrate: 550
    buffer size: 1200
    quality: 7
------------------------------------------
SharedTexCapture hooked
Using RTMP service: Twitch / Justin.tv
  Server selection: rtmp://live-fra.justin.tv/app
bufferTime: 2101, outputRateWindowTime: 1000, dropThreshold: 2601
Total frames rendered: 41832, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
RTMPPublisher::SocketLoop: Aborting due to bStopping
Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 640x360
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: MP3
    bitrate: 96
Using Window Capture
Using text output
Using graphics capture
------------------------------------------
Video Encoding: x264
    fps: 25
    width: 640, height: 360
    preset: veryfast
    CBR: no
    max bitrate: 550
    buffer size: 1200
    quality: 7
------------------------------------------
SharedTexCapture hooked
Using RTMP service: Twitch / Justin.tv
  Server selection: rtmp://live-fra.justin.tv/app
bufferTime: 2147, outputRateWindowTime: 1000, dropThreshold: 2647
Total frames rendered: 92981, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
RTMPPublisher::SocketLoop: Aborting due to bStopping
Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 3.139 ms] [avg calls per frame: 1] [children: 69.9%] [unaccounted: 30.1%]
| scene->Preprocess - [45.6%] [avg time: 1.432 ms] [avg calls per frame: 1]
| video encoding and uploading - [24.3%] [avg time: 0.763 ms] [avg calls per frame: 1] [children: 18.7%] [unaccounted: 5.61%]
| | CopyResource - [0.446%] [avg time: 0.014 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [1.12%] [avg time: 0.035 ms] [avg calls per frame: 0]
| | call to encoder - [16%] [avg time: 0.501 ms] [avg calls per frame: 0]
| | sending stuff out - [1.18%] [avg time: 0.037 ms] [avg calls per frame: 0]
==============================================================
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
your log there is from 0.466, which didn't have that option.
 

Aphox

New Member
Very sorry I switched back later to that version to test if it fixes it, and just grabbed the last log to post :x here is one of the 0.47 ones

Code:
Open Broadcaster Software v0.47a - 32bit (´・ω・`)
-------------------------------
CPU Name: Intel(R) Core(TM) i7 CPU         950  @ 3.07GHz
CPU Speed: 3105MHz
Physical Memory:  4095MB Total, 2983MB Free
stepping id: 5, model 10, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
Windows Version: 6.1 Build 7601 S
Aero is Disabled
------------------------------------------
Adapter 1
  Video Adapter: NVIDIA GeForce GTX 570
  Video Adapter Dedicated Video Memory: 1293352960
  Video Adapter Shared System Memory: 2948132864
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 852x480
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 96
Using Window Capture
Using text output
Using text output
Using Monitor Capture
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 25
    width: 852, height: 480
    preset: veryfast
    CBR: no
    CFR: no
    max bitrate: 550
    buffer size: 1200
    quality: 7
------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using Window Capture
Using text output
Using graphics capture
SharedTexCapture hooked
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using graphics capture
SharedTexCapture hooked
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using Window Capture
Using text output
Using graphics capture
SharedTexCapture hooked
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using Window Capture
Using text output
Using text output
Using Monitor Capture
Using Window Capture
++++++++++++++++++++++++++++++++++++++++++++++++++++++
  New Scene
Using Window Capture
Using text output
Using graphics capture
SharedTexCapture hooked
Total frames rendered: 2802, number of frames that lagged: 1 (0.04%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 640x360
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 96
Using Window Capture
Using text output
Using graphics capture
------------------------------------------
Video Encoding: x264
    fps: 25
    width: 640, height: 360
    preset: veryfast
    CBR: no
    CFR: no
    max bitrate: 550
    buffer size: 1200
    quality: 7
------------------------------------------
SharedTexCapture hooked
Total frames rendered: 35885, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1280x720
  Output resolution: 640x360
------------------------------------------
Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (2- Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (2- Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 96
Using Window Capture
Using text output
Using graphics capture
------------------------------------------
Video Encoding: x264
    fps: 25
    width: 640, height: 360
    preset: veryfast
    CBR: no
    CFR: no
    max bitrate: 550
    buffer size: 1200
    quality: 7
------------------------------------------
SharedTexCapture hooked
Using RTMP service: Twitch / Justin.tv
  Server selection: rtmp://live-fra.justin.tv/app
bufferTime: 2142, outputRateWindowTime: 1000, dropThreshold: 2642
Warning -- Capture BitBlt failed..  just so you know
SharedTexCapture hooked
RTMPPublisher::BufferedSend: Socket buffer is full (81502 / 81920 bytes), waiting to send 2919 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (81502 / 81920 bytes), waiting to send 2919 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (81180 / 81920 bytes), waiting to send 2884 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (81670 / 81920 bytes), waiting to send 315 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (78233 / 81920 bytes), waiting to send 3721 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (81677 / 81920 bytes), waiting to send 301 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (79388 / 81920 bytes), waiting to send 4104 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (79388 / 81920 bytes), waiting to send 4104 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (80996 / 81920 bytes), waiting to send 1639 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (80996 / 81920 bytes), waiting to send 1639 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (79996 / 81920 bytes), waiting to send 3617 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (79996 / 81920 bytes), waiting to send 3617 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (80937 / 81920 bytes), waiting to send 4104 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (79920 / 81920 bytes), waiting to send 4104 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (80788 / 81920 bytes), waiting to send 4104 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (80535 / 81920 bytes), waiting to send 3170 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (80092 / 81920 bytes), waiting to send 3659 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (81540 / 81920 bytes), waiting to send 864 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (81274 / 81920 bytes), waiting to send 2906 bytes
RTMPPublisher::BufferedSend: Socket buffer is full (79415 / 81920 bytes), waiting to send 2999 bytes
Total frames rendered: 97899, number of frames that lagged: 3 (0.00%) (it's okay for some frames to lag)
RTMPPublisher::SocketLoop: Aborting due to bStopping
Number of b-frames dropped: 99 (0.037%), Number of p-frames dropped: 115 (0.043%), Total 214 (0.081%)
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 2.846 ms] [avg calls per frame: 1] [children: 81.5%] [unaccounted: 18.5%]
| scene->Preprocess - [45.5%] [avg time: 1.296 ms] [avg calls per frame: 1]
| video encoding and uploading - [36%] [avg time: 1.024 ms] [avg calls per frame: 1] [children: 20.5%] [unaccounted: 15.5%]
| | CopyResource - [0.457%] [avg time: 0.013 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [1.12%] [avg time: 0.032 ms] [avg calls per frame: 0]
| | call to encoder - [17.9%] [avg time: 0.509 ms] [avg calls per frame: 0]
| | sending stuff out - [1.02%] [avg time: 0.029 ms] [avg calls per frame: 0]
==============================================================
 

GretSeat

New Member
I'm having the same issue, but it's not after a few seconds. It's just automatically a second or millisecond behind.

All of my other sounds and stuff are in sync, but then my camera and mic are not together :/
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
The camera and mic thing can be fixed by either adjusting the camera output type in the properties of it, or by adjusting your mic time offset in audio settings
 

GretSeat

New Member
I've tried the mic offset, and every single time I try putting it up or down it is ALWAYS off. Its like there haha is no sweet spot. I can do it up 2 milliseconds, or down -10 it will always be off somehow
 

Aphox

New Member
So I think I found the solution.

I noticed in the Logs that my CPU Speed was incorrect, it showed it ran on 3.1Ghz

CPU Name: Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
CPU Speed: 3105MHz

However the speed it would actually run under was 3.2Ghz. The thing that most likely caused the wrong calculation is the Intel Turbo which you can turn on/off in the bios, which would lower CPU speed during periods of low useage and overclocks it a little during periods of high useage.

The CPU speed calculated might be the average or something the like, didnt check the code how this is actually programmed if it uses cpu cycles or whatever, but since I changed it in the bios this has never happend again.

Hope this helps other people with the same problem.
 
Is there a reason why the force audio sync option is disabled by default? i mean is there a drawback or any reason why not everyone should have this enabled permanently?
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
The reason is because it could theoretically be less accurate than proper desktop time. It should really never be needed, it's more of a very rare scenario. If things go out of sync it's usually due to something screwy in the device drivers for whatever device. It's a hack that gets calculated audio timing rather than exact audio timing.
 
Top