View Full Version : FrameSync unreliable in situations like going from 25 to 50fps

11-10-2018, 06:56 AM
I am trying to incorporate FrameSync in a C++ application and I came across some obstacles.

Problem #1
FrameSync related functions are not present in NDIlib_v3 structure for dynamic loading. Not a big deal (I use GetProcAddress to get all of them) but it would be nice if the dynamic loading headers got updated.

Problem #2
Maybe that is not a very common scenario to mix framerates, but I want the app to handle playing back 25fps sources on a 50fps receiver with a precise internal clock (and playing 50fps sources on a 25fps receiver etc.).
Results I'm getting are the following:

Matching framerates (50->50fps etc.) - silky smooth, frames go like 0:1:2:3:4:5...
Doubling the framerate (25->50fps) - instead of receiving each frame exactly twice, some I'm getting three times and some only once, so instead of going like 0:0:1:1:2:2:3:3:4:4:5:5..., they go like 0:0:1:2:2:2:3:3:4:5:5:5... what results in a jerky playback.
Halving the framerate (50->25fps) - here I would expect even(or odd) frames to be dropped resulting in something like 0:2:4:6... but what I'm getting is stuttering with many frames randomly duplicated.

Question to NDI Developers: Have such situations been foreseen and tested for? Maybe some explicit way to tell the FrameSync that it should adjust not only for clock fluctuations but also for a drastically different pull frequency? I see even an example when syncing a wider variety of framerates would be handy - imagine a big multiviewer that gathers feeds from all over the world and has to deal with multiple PAL and NTSC standards and sync to a screen at 60Hz. Assuming that frame resampling is not required here, having this sorted out in a predictable way in the FrameSync would be great :)

Thanks in advance for any help