Specifying Frame Rates

The kOfxImageEffectPropSetableFrameRate host property indicates if a plugin is able to change the frame rate of the output clip from the default.

The default value of the output clip's frame rate is host dependant, but in general, it will be based on the input clips frame rates.

If the host allows a plugin to specify the frame rate of the output clip, then a plugin may do so during the kOfxImageEffectActionGetClipPreferences . For example a deinterlace plugin that separates both fields from fielded footage will want to do double the frame rate of the output clip.

If a plugin changes the frame rate, it is effectively changing the number of frames in the output clip. If our hypothetical deinterlace plugin doubles the frame rate of the output clip, it will be doubling the number of frames in that clip. The timing diagram below should help, showing how our fielded input has been turned into twice the number of frames on output.

   FIELDED SOURCE      0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 ....
   DEINTELACED OUTPUT  0   1   2   3   4   5   6   7   8   9 

The maping of the number of output frames is...

	nFrames' = nFrames * FPS' / FPS 

  • nFrames is the default number of frames,
  • nFrames' is the new number of output frames,
  • FPS is the default frame rate,
  • FPS' is the new frame rate specified by a plugin.