How to add video effects?
C# sample code for lightness effect in Media Player SDK .Net.
The same API is available for Video Edit SDK .Net and Video Capture SDK .Net.
Define effect interface:
Get interface instance from SDK control. If the effect is not added before, you'll receive a null value. Each effect must have a unique name.
var effect = MediaPlayer1.Video_Effects_Get("Lightness");
If the effect does not exist, we'll add it.
if (effect == null)
lightness = new VideoEffectLightness(true, 100);
Or, we need to apply a new value to effect.
lightness = effect as IVideoEffectLightness;
if (lightness != null)
lightness.Value = 100;
You must set the Video_Effects_Enable property to true before the Play() or Start() method call to use video effects.
- SDK redist
Visit our GitHub page to get more code samples.