Page 1 of 1

Audio and video capture timestamps drift apart

PostPosted: Fri Jan 20, 2017 10:51 pm
by Christophe Massiot

I have a customer complaining of audio/video drift when capturing HD-SDI with a Duo 2 (but I suspect other customers experience it with other DeckLink cards). The drift happens when there is a discontinuity on the SDI link : probably a video frame goes missing, and there are extra audio samples. At first it is not noticeable, but if you have one discontinuity a day for several weeks, the audio is delayed by several seconds.

In that state, VideoFrame->GetStreamTime returns timestamp t, and in the same callback AudioFrame->GetPacketTime returns timestamp t + 4 seconds. Should I assume that within the same callback, VideoFrame and AudioFrame should have the same presentation timestamp?

Best regards,

Re: Audio and video capture timestamps drift apart

PostPosted: Mon Mar 19, 2018 5:57 pm
by nicodato
Hello there,
I'm having the same issue. In my case I'm using DeckLink Mini Recorder capturing 2 HDMI inputs.

Adding more information to the original post.
In my case I see a discontinuity (flag bmdFrameHasNoInputSource) and the difference sometimes is positive and sometimes is negative. If I continue getting bmdFrameHasNoInputSource, this differences can get bigger or smaller.

I tried calling IDeckLinkInput->FlushStreams when I have a new frame after bmdFrameHasNoInputSource but it didn't restored the difference. I called FlushStreams from outside the callback (from an external thread)

Any thoughts?


Re: Audio and video capture timestamps drift apart

PostPosted: Wed Mar 21, 2018 2:43 pm
by nicodato
I found a workarround

Code: Select all

The timestamps difference restores to 0 (or near 0) and the synchronization is kept.

I do it after the signal comes back, when receiving a valid frame after a bmdFrameHasNoInputSource. Perhaps this could be done during the signal cut. And I'm not sure FlushStreams() is needed.

Anyway, I'll wait for an answer from Blackmagic and I'll keep this topic updated if I found something new.


Re: Audio and video capture timestamps drift apart

PostPosted: Mon Apr 09, 2018 1:09 pm
by nicodato
I contacted bmd's developer support and this was the reply:

This is a pre-existing issue to be addressed in a future release.
In the meantime, the recommended workaround is to do as you are doing currently (i.e. stop streams(), flush streams() and startstreams()) in the event of signal interruption/discontinuity.

Re: Audio and video capture timestamps drift apart

PostPosted: Wed May 16, 2018 11:50 pm
by nicodato
I have been contacted by Blackmagic informing me that this issue has been fixed on version 10.10 (which has been released today).

Thanks to blackmagic developers for fixing this and keep me up to date!