audio dropout

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message

Jonas Geduldig

  • Posts: 35
  • Joined: Tue Jun 17, 2014 7:04 pm

audio dropout

PostThu May 16, 2019 6:27 pm

I'm capturing 720p and playing out the same video all in the same Duo 2 card. All is good except the audio in the output has what sounds like flecks of dropout in a random, slowly pulsating pattern.

I'm buffering 10 frames of video with 32032 bytes of audio. I've verified I'm getting 800 or 801 samples of audio with each frame captured. (32032 bytes = 10 video frames x 2 channels x 2 bytes per sample x 800.8 samples per frame.)

If I instead play sound in Windows and capture that, and then play that out the Duo 2, the audio sounds good.

I'm mystified because in both cases I am buffering the same 10 frames worth of video and audio bytes. The only difference is that Windows audio comes in 19200 byte chunks, which is more than one video frame's worth. And Windows audio samples are floats which I convert to 16-bit integer.

Any suggestions of what to look for to fix the dropout?

Cameron Nichols

Blackmagic Design

  • Posts: 198
  • Joined: Mon Sep 04, 2017 4:05 am

Re: audio dropout

PostWed May 22, 2019 3:37 am

Hi Jonas,

How are you handling the start of scheduled output (IDeckLinkOutput::StartScheduledPlayback)? Are you waiting until you have prerolled sufficient video + audio samples before calling start of scheduled playback?

I wonder if your video source begins with large number of video frames and few audio samples when prerolling and you are starting scheduled playback with insufficient audio samples in scheduled buffer?

Ideally during preroll, keep a count of scheduled video frames. Call IDeckLinkOutput::GetBufferedAudioSampleFrameCount within IDeckLinkAudioOutputCallback::RenderAudioSamples callback to get audio sample count. Only commence scheduled playback when video and audio preroll sizes have reached your predefined waterlevels.


Return to Software Developers

Who is online

Users browsing this forum: dosxuk and 3 guests