Zoom Developer Forum

How to keep audio and video in sync with raw data from the Zoom Meeting SDK on Linux

Updated at:
September 21, 2025
Written By:
Maggie Veltri

Question

People commonly ask on the Zoom Developer Forum:

When capturing raw YUV video (onVideoRawDataReceived) and PCM audio (onMixedAudioRawDataReceived) from the Zoom Meeting SDK on Linux, how can I keep audio and video in sync?

Answer

Many times engineers will have already tried FFmpeg filters (setpts, atempo), GStreamer synchronization, forcing fixed frame rates, and even using the GetTimeStamp() method. But still see video starting at a higher speed before settling, constant audio–video drift, and what look like unreliable timestamps.

This behavior happens when playback or processing is tied to arrival time or the system clock rather than the SDK’s raw data timestamps. The video is at startup because the first frames are scheduled without a stable clock. There is audio–video drift because streams start at different “zeros” and slide apart over time. Inconsistent timestamps occur because callbacks don’t always reflect presentation order.

The fix is to make the SDK’s timestamps your single source of truth.

Best Practices for Sync

  • Use SDK timestamps, not wall time

    • Read timing from AudioRawData::GetTimeStamp and the video raw data timestamps.
    • Ignore callback order or system clock arrival times.
  • Add a small jitter buffer (150–300 ms)

    • Buffer a bit of data so you can normalize all streams to start at t=0.

This prevents early misalignment and smooths out variations.

  • Choose audio as the master clock

    • Pace video to match audio. Drop or duplicate frames if necessary.
    • If drift develops, resample audio slightly to keep everything locked.
  • Why FFmpeg/GStreamer didn’t fix it

    • Filters like setpts, atempo, or fps=30 rely on system-time playback. Without SDK-timestamped sync, they can smooth output but won’t stop drift.

Generalization

While this question came from a Linux setup, the principle applies across platforms and pipelines: timestamp-driven sync with a master clock is the only way to keep Zoom raw data aligned over time.


Zoom Developer Forum Examples

Some examples of this question are:

Written By:
Maggie Veltri