What is A/V sync and why it matters for streaming
A/V sync refers to the timing alignment between the audio and video tracks
in a recording or live stream. When the two tracks are misaligned, viewers
hear your voice before or after your lips move. Offsets around 80 to 150
ms are usually noticeable in live speech or streaming workflows and can
make a broadcast feel unpolished regardless of how good the content is.1
The offset is caused by different processing pipelines for video and audio
inside the browser and the operating system. Your webcam's USB driver, the
browser's video codec, and the JavaScript event loop all add latency to
the video path. Your microphone's audio driver and the Web Audio API add a
different amount to the audio path. The two rarely match.
How the clap detection algorithm works
The tool runs two independent detection loops simultaneously. The video
loop draws each webcam frame to a hidden 320×240 canvas and samples
the mean luminance of an 80×80 pixel region in the centre. When the
frame-to-frame luminance delta exceeds a fixed threshold, the tool records a
video timestamp using performance.now().2 The brightness change that pushes the signal over the
threshold is the flash of your hands completing the clap, so the timestamp lands
close to the visible impact rather than the start of the hand motion.
The audio loop polls an AnalyserNode every 4 ms to read the peak amplitude deviation from silence. During the first
800 ms after you click Start Test, the tool calibrates a noise floor from ambient
room sound. A transient is detected when the peak exceeds the noise floor by
a factor of 3.5, and an audio timestamp is recorded using the same
performance.now()
clock so both measurements share a single time base.3
How the timestamps are paired and averaged
The two timestamps are paired only when they fall within a 500 ms correlation window,
which is wide enough to absorb the real-world offset between a camera frame and its
matching audio transient while still rejecting unrelated background events. The
delta is audioTs − videoTs: a
positive value means audio arrived after video, and a negative value means audio
arrived first. After five valid pairs, the tool averages the deltas and reports the
result, which smooths out any single frame that arrived late or any clap that landed
closer to one detector than the other.
TIP
Clap sharply once every 2–3 seconds so each clap is a distinct, well-separated
event for both detectors. Rapid successive claps can fall within the 600 ms
debounce window and will be ignored to prevent echo re-triggering, which is why the
tool waits for a clean gap before accepting the next measurement.
Reading your result and entering it in OBS
The result is shown as a signed millisecond value with a direction label: Audio Delay means audio arrives after video, so the sound trails the picture; Audio Leads means audio arrives before video, so the sound jumps ahead of the picture; and In Sync means the offset is within ±5 ms and no correction is needed because the two
tracks are already close enough to appear simultaneous to viewers.
Applying the value in OBS Studio
In OBS Studio, open Edit → Advanced Audio Properties and find your microphone source in the list. Enter the OBS Audio Offset value from this tool in the Sync Offset (ms) column: a positive offset pushes the audio track forward in time so it lines up with later-arriving video frames, while a negative offset delays the audio to wait for the picture. Click Close, then verify the fix by clapping once more with your stream preview open; the visual slap and the sound should now reach the viewer at the same instant.
A concrete example makes the direction easier to remember. If your five-clap test
reports Audio Delay: +80 ms, your
microphone's signal is arriving 80 milliseconds behind the camera's, which sits inside
the 80 to 150 ms range viewers start to notice in live speech. Enter 80 in
OBS Studio's Sync Offset field for that microphone source, then clap once more with the
stream preview open. A corrected setup lands within the small window this tool treats as
in sync, so the visual slap and the sound should now reach the viewer together.
Browser support
The tool requires navigator.mediaDevices.getUserMedia with both video and audio constraints, plus the Web Audio API. All major browsers
support this: Chrome 53+, Firefox 36+, Edge 12+, and Safari 11+. Because getUserMedia is a
privacy-sensitive API, the page must be loaded over HTTPS, from localhost, or from a
file:// URL before the browser will even expose the media devices, and the browser will
then prompt for camera and microphone permissions on first use.4
Where the media data goes during a test
No audio or video data is sent to a server at any point during the test. The camera and
microphone streams exist only inside your browser tab's memory, where the video loop reads
each frame from a canvas and the audio loop reads amplitude from a local AnalyserNode, so
the raw media never touches the network stack or a remote endpoint. The stream is released
and the device handles are freed when you close the tab or navigate away from the page, which
means you can run the measurement and walk away without leaving any recorded file behind.
What changes your measured A/V offset
Your measured offset depends on the exact hardware and software stack in
use at the time of measurement. Changing webcam, microphone, driver
version, browser, or operating system can shift the reading by tens of
milliseconds between sessions.5 A USB audio interface contributes additional buffer and driver latency, and
larger buffers increase the delay.4 Bluetooth
audio devices introduce the most variability: standard Bluetooth codecs can
add substantial delay, while aptX Low Latency reduces this to about 40 ms and
AAC still adds more delay than a wired USB microphone.67
Remeasure your offset whenever your hardware setup changes or after a major browser or operating system update. A new browser version may change the internal processing pipeline for camera capture or audio routing, shifting the reading from its previous value. The five-clap test completes in under a minute and ensures the value you enter in OBS or your conferencing app remains accurate for your current exact configuration, rather than carrying a stale reading from a different setup. CapyToolkit runs the entire analysis in browser memory and never stores or uploads any audio or video data.
Webcam A/V Sync & Latency Meter Reference
- In Sync Within ±5 ms
- Noticeable offset 80–150 ms
Run the five-clap test above and compare your own Audio Delay/Audio Leads result against this scale.
- 1.
CapyToolkit, "What Is Audio Latency? Definition and Round-Trip Measurement," capytoolkit.com, accessed June 2026. https://capytoolkit.com/tools/audio/mic-test/reference/#what-is-audio-latency
- 2.
Thomas Steiner, "Perform efficient per-video-frame operations," web.dev, January 2023. https://web.dev/articles/requestvideoframecallback-rvfc
- 3.
Mozilla Developer Network, "AnalyserNode," developer.mozilla.org, October 2024. https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode
- 4.
Mozilla Developer Network, "MediaDevices: getUserMedia() method," developer.mozilla.org, accessed June 2026. https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
- 5.
Ableton, "How Latency Works," help.ableton.com, accessed June 2026. https://help.ableton.com/hc/en-us/articles/360010545559-How-Latency-Works
- 6.
Qualcomm aptX, "Qualcomm® aptX™ Low Latency Synchronised Audio Technology," aptx.com, accessed June 2026. https://www.aptx.com/aptx-low-latency
- 7.
Vanessa McCuaig, "Bluetooth Connectivity Score and Tests: Headphones," rtings.com, November 2023. https://www.rtings.com/headphones/tests/connectivity/bluetooth-connection