Page 1 of 1
Output schedule frame delay increasing

Posted:
Tue Jan 31, 2023 9:55 pm
by panderson2
In a live production using a Decklink 8k, we've observed playback latency increasing steadily at a rate of around 1ms per minute. We've narrowed down the delay to frame scheduling. Specifically, the latency from
- Code: Select all
ScheduleVideoFrame
to
- Code: Select all
ScheduledFrameCompleted
starts at 50ms and climbs up to over 300ms after a few hours. This eventually leads to media queue backup and manifests as stuttering video/audio in the final output.
This happens no matter the mode, though we are mostly focused on Hp59 and Hi59 outputs. This is on SDK version 11.5.1. Is there anything we can do to pinpoint and resolve the issue?
Thanks.
Re: Output schedule frame delay increasing

Posted:
Thu Feb 02, 2023 8:39 pm
by panderson2
Using GetFrameCompletionReferenceTimestamp we're seeing the difference by frame of the frameCompletionTimestamp as 60061 in timescale 60000. As far as I can tell that means the Decklink device takes 60061/60000~=1.00102 frame durations per frame which would lead to our increasing latency. How can this be explained?
Re: Output schedule frame delay increasing

Posted:
Wed Mar 08, 2023 5:29 am
by Cameron Nichols
Hi Phillip,
Please be aware that the system and output frames are based on different clocks. The output clock will be based on a local clock with frame timing locked to genlock reference, or full-duplex input, or free running. In either case it won't be locked to system clock.
As such there will be some long term drift between output clock and system clock, however I would not expect it to be as high as 60061/60000 ~= 1000ppm.
If your frame output is free-running you can perform fine clock adjustment with the configuration item bmdDeckLinkConfigClockTimingAdjustment with integer range -127ppm to +127ppm. Support for this configuration item was added for the DeckLink 8K Pro in Desktop Video 12.3, but you can check support in other products by querying attribute flag BMDDeckLinkSupportsClockTimingAdjustment.
Regards
Cameron
Re: Output schedule frame delay increasing

Posted:
Fri Mar 24, 2023 10:38 pm
by panderson2
What we're trying to achieve is long term stability between capture and augmented playback without external genlock reference, on two subdevices. Using BMDDeckLinkSupportsClockTimingAdjustment works for input generated by the system clock i.e. ffmpeg to the device. However it becomes unusable when working off an SDI capture. I would think this would be relative simple as we're attempting to drive the playback timing from the capture timing. Can this be done?
Re: Output schedule frame delay increasing

Posted:
Wed Apr 12, 2023 5:31 am
by Cameron Nichols
Hi Phillip,
In full-duplex mode (and absence of genlock reference), the output frame timing will be locked to the timing of an active capture.
If you a looking to output independently of input frame timing, change the profile of the DeckLink 8K Pro to 4 sub-device full-duplex. When in half-duplex mode, all output connectors will operate independent of input capture.
Regards
Cameron