How to add video effect and set effect parameters?

C# sample code for lightness effect in Media Player SDK .Net.

Same API available for Video Edit SDK .Net and Video Capture SDK .Net.

Define effect interface:

IVFVideoEffectLightness lightness;
Get interface instance from SDK control. If effect not added before you'll receive null value. Each effect must have unique name.
var effect = MediaPlayer1.Video_Effects_Get("Lightness");
If effect not exists we'll add it.
if (effect == null) 
    lightness = new VFVideoEffectLightness(true, 100);
Or we need to apply new value to effect.
   lightness = effect as IVFVideoEffectLightness;
   if (lightness != null)
      lightness.Value = 100;
To use video effects you must set Video_Effects_Enable property to true before Play() or Start() method call.
Please contact support to get help with this tutorial. Visit our GitHub page to get more code samples.
VisioForge © 2006 - 2021