Introduction
When you watch a movie or join a video call, the picture and the sound usually appear to arrive together. Achieving that smooth match—often called lip-sync or audio-video synchronization—requires hardware and software working together to manage timing, buffering, and playback. This article explains how computers keep sound and video in sync, why sync can fail, and what techniques and standards are used to fix it.
- What does “in sync” mean?
- Basic sources of audio-video timing
- Clocks and reference timing
- How playback scheduling works on a computer
- Common synchronization techniques
- Synchronization in different scenarios
- Standards and protocols that help
- Why synchronization can fail
- How users and apps fix sync problems
- Practical examples to illustrate sync
- Measuring and testing sync
- Trends and future directions
- Conclusion
What does “in sync” mean?
Audio-video synchronization means that audio events (like speech or sound effects) match the corresponding visual events (like lip movements or on-screen actions) within a small timing window so the viewer perceives them as simultaneous.
Humans are sensitive to timing differences. Small audio leads (sound arriving before the picture) are usually less noticeable than audio lags. Perceptual studies show that delays of tens of milliseconds can be detectable, so systems aim to keep audiovisual offset generally within ±40 to ±100 milliseconds depending on the context.
Basic sources of audio-video timing
To synchronize A/V, a system needs timing information for both streams. Video is typically a sequence of frames at a certain rate (for example 24, 30, or 60 frames per second). Each frame represents an image at a specific time. Audio is a continuous waveform sampled at a rate (for example 44.1 kHz or 48 kHz) and divided into small buffers for processing.
Both audio and video streams carry time markers called timestamps. These timestamps indicate the intended presentation time of each audio buffer or video frame relative to a shared clock. Synchronization depends on comparing those timestamps and scheduling playback so presentation matches the timestamps.
Clocks and reference timing
A key concept is the reference clock: a single, consistent time source that both audio and video can be aligned to. On a single computer, that might be the operating system’s high-resolution clock. In distributed systems (video conferencing, streaming across a network, or connecting external devices) clocks can differ, so protocols include ways to estimate and correct clock offsets and drift.
Clock drift is the gradual change in the rate of one clock relative to another. Even tiny differences in crystal oscillators cause audio and video devices to run slightly faster or slower over time. Synchronization systems compensate for drift by measuring differences and adjusting playback timing or resampling rates.
How playback scheduling works on a computer
When a media player receives decoded audio and video frames, it does not present them immediately. Instead it places them into queues or buffers and schedules presentation according to their timestamps.
Video scheduling: The player decides which video frame to show at each display refresh (vertical blanking interval or VSync). It computes which frame’s timestamp matches the current reference time and sends that frame to the GPU. Modern display systems refresh at regular intervals, so the player typically aligns frame updates to those intervals to avoid tearing and to maintain steady timing.
Audio scheduling: Audio hardware outputs continuous sound and typically uses an audio buffer that the software fills. The player writes audio samples ahead of time so the hardware can play without underflow. The hardware provides a position indicator (how many samples have played) so the software can map audio playback time to the reference clock.
Bringing them together: The player maps both audio sample positions and video frame timestamps to the same reference clock. For example, if an audio sample at playback time t corresponds to a video frame with timestamp t, the player will show that frame when the audio is producing those samples. Small adjustments are made continuously to keep both to the same clock.
Common synchronization techniques
Here are the main techniques used to keep audio and video in sync.
1. Timestamps: Each frame or audio block is tagged with a presentation timestamp (PTS). Players use PTS values to schedule when to play each unit.
2. Master clock selection: The system picks one stream as the master clock. Often audio is chosen because sound hardware plays continuously and is less tolerant of interruptions; video timing is adjusted relative to audio. In some scenarios, video or an external clock may be the master.
3. Buffering and jitter smoothing: Network or decoding jitter can cause irregular arrival times. Players use buffers to smooth jitter so playback is steady. Too small buffers risk underflow (stuttering); too large buffers increase latency.
4. Drift correction and resampling: If audio and video clocks drift apart, the player can adjust playback speed slightly. For audio this often uses resampling—changing the sample clock by parts per million so audio runs a bit faster or slower and realigns with video without changing pitch noticeably. For video, frame repetition or frame dropping might be used to catch up or slow down.
5. Time stretching (for audio) and frame interpolation (for video): In special cases, small amounts of audio time stretching (changing duration without changing pitch) or video frame interpolation can smooth synchronization errors. These techniques are more CPU-intensive and are used carefully to avoid artifacts.
Synchronization in different scenarios
Local playback (files and local apps): The media player, operating system, audio driver, and display driver all run on the same machine. Synchronization is simpler here because the system clock can be shared and audio hardware reporting is reliable. Players like VLC, Windows Media Player, or browser-based players rely on timestamps and local clocks to maintain sync.
Streaming (on-demand video): Video and audio packets arrive over the network and may be cached in a playback buffer. The player fills the buffer and begins playback using timestamps. Adaptive streaming protocols such as HLS or DASH provide manifest files and segmented media with timing so the player knows presentation times and can switch quality levels without losing sync.
Live streaming and broadcasting: Live streams impose stricter latency constraints. Systems may use larger buffers or timed delivery (e.g., RTP over UDP) with synchronization markers to align streams. Professional broadcast uses timecode formats (SMPTE timecode) and genlock (hardware clock synchronization) to keep multiple devices locked together precisely.
Video conferencing: Here both capture and network delay vary. Systems use protocols like RTP (Real-time Transport Protocol) with RTCP (RTP Control Protocol) to exchange timing and clock information. Clients estimate network delay and jitter and sync remote audio and video by mapping timestamps to a common clock or by privileging local audio as the master to keep speech natural.
Standards and protocols that help
Several widely used standards exist to manage timestamps, clocks, and synchronization across devices and networks:
1. SMPTE timecode: A frame-accurate timecode used in film and broadcast to label frames with hours:minutes:seconds:frames. Helpful in professional editing and multi-camera shoots.
2. NTP (Network Time Protocol): Used to synchronize clocks across computers over a network. NTP helps keep system clocks close enough for media timestamping to be consistent across devices.
3. RTCP (RTP Control Protocol): Used with RTP for real-time media; RTCP reports contain timing info (sender and receiver reports) to estimate round-trip time and clock offsets between endpoints.
4. PTS/DTS in container formats: Media containers like MP4, MKV, MPEG-TS include presentation timestamps (PTS) and decoding timestamps (DTS) that media players use to schedule decoding and display.
Why synchronization can fail
Even with robust techniques, synchronization can break. Typical causes include:
1. Network jitter and packet loss: Variable network delay causes uneven arrival times and packet loss that can delay or interrupt playback.
2. Clock mismatch and drift: If devices don’t share a reliable time reference, their clocks will drift apart unless corrected.
3. Buffer underflow or overflow: If buffers are emptied too fast because decoding or disk I/O is slow, audio or video will stutter. Conversely, excessive buffering adds latency.
4. Processing delays: Slow decoders, busy CPUs, or overloaded GPUs can delay rendering, making video lag behind audio or vice versa.
5. Hardware limitations and drivers: Some sound cards or graphics drivers add unpredictable latency. Inconsistent reporting of playback position can confuse the sync logic.
How users and apps fix sync problems
Applications expose controls and strategies to correct sync issues:
1. Manual audio delay/advance: Players and streaming apps sometimes let users nudge audio forward or backward a specified number of milliseconds to correct portable discrepancies.
2. Increasing buffer size: More buffering reduces risk of underflow at the cost of higher latency—useful for streaming playback but not for interactive calls.
3. Updating drivers and using quality hardware: Better audio interfaces and display drivers reduce variability and latency.
4. Choosing the correct master clock: Some advanced media systems allow selection of audio or video as the master or permit external hardware clocking for professional setups.
Practical examples to illustrate sync
Example 1 — Watching a movie file locally: The media file contains timestamps for audio and video. The player decodes both streams, uses the system clock as reference, fills audio buffers ahead of playback, and updates the video framebuffer at display refreshes so frames match the audio’s current sample position.
Example 2 — Video call: Your microphone and camera capture streams at local clocks; those streams are sent over the network to another participant. RTP/RTCP messages help the remote endpoint estimate clock differences and jitter. The remote client buffers and schedules playback so the incoming audio and video line up despite network variability.
Example 3 — Live concert broadcast: Cameras and audio mixers are genlocked to a common reference so all devices share timing. Timecode labels frames and audio blocks so editors and playout systems align media precisely for broadcasting.
Measuring and testing sync
Professionals use objective tests to measure sync. One simple test is a clapperboard: a visible clap produces an audio spike and a visual event; measuring the time difference between the audio spike and the frame containing the clap yields the offset. Software tools can analyze waveforms and video frames to compute delays more accurately.
Consumers can use test videos that contain visual markers and click sounds at known intervals. Watching such tests reveals whether audio leads or lags and by how much, guiding manual adjustments.
Trends and future directions
As resolutions and sampling rates increase, so does the demand for precise synchronization. Newer technologies focus on lower-latency networks, better clock synchronization (e.g., Precision Time Protocol for professional networks), and smarter adaptive algorithms that reduce artifacts when compensating for drift. For immersive experiences like VR, sub-millisecond synchronization becomes important because timing errors can cause discomfort or break the sense of presence.
Conclusion
Keeping sound and video in sync is the result of timestamps, clocks, buffering, and continuous small adjustments. A media player or device maps audio and video to a common reference clock, uses buffers to smooth jitter, and corrects drift through resampling or frame rate adjustments. Problems arise from network variability, clock drift, processing delays, and hardware limits, but standards and tools—ranging from RTP/RTCP to SMPTE timecode—help systems maintain tight synchronization across a wide range of applications.

