obsproject / obsproject/obs-studio

Audio Monitoring Buffer Buildup / Offsync

Open
#4,531 60 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

platform/windows
Dominant language
C
Stars
76.4k
Forks
10.2k
Avg merge
4d 23h
Merged PRs (30d)
12

Description

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

26.1.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

2021-04-15 11-03-34.txt

OBS Studio Crash Log URL

No response

Expected Behavior

When monitoring audio, the monitoring audio buffer should be rebuild in case of buildup to avoid losing sync with the stream/recording audio buffer. It can be done either by evaluating the size of the buffer, comparing it to the bitrate to check if it is too long, or by continually rebuilding the buffer every X seconds.

Current Behavior

When monitoring the audio, only the monitoring audio gets off sync over time, while the streaming / recording audio stays in sync.

Steps to Reproduce
  1. On OBS, add an Microphone as an Input Source.
  2. On the "Edit" menu, select the option "Advanced Audio Properties".
  3. Find the microphone on the list and on the "Audio Monitoring" column, select "Monitor and Output".
  4. Let OBS run for a while. Over time the monitoring of the audio will get off sync with the input, making really hard to speak while monitoring the audio.
Anything else we should know?

To check the buffer buildup hypothesis:

To clean the buffer, you can click on the Eye Icon to disable the microphone, and click again to re-enable it, but will eventually rebuild the delay.

To automatically and continuously clean the buffer, you can use 2 "Move Source" filters on the scene:
Move Source # 1: To disable the microphone source, wait an interval with it disabled (I got good results disabling for 100ms), and at the end enable the Move Souce # 2.
Move Source # 2: To enable the microphone source, wait an interval with it enabled (I got good results with 60000ms / 1 minute), and at the end enable the Move Source # 1.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attached OBS Studio log and reproducing the issue with the listed microphone monitoring steps on Windows 10. Compare the monitoring audio with the stream or recording over time, and verify that the monitoring path no longer accumulates delay or loses synchronization.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.