Skip to main content

Custom video effects using OnVideoFrameBitmap or OnVideoFrameBuffer events

Products: Video Capture SDK .Net, Video Edit SDK .Net, Media Player SDK .Net

You can add custom video effects using OnVideoFrameBitmap and OnVideoFrameBuffer events.

Sample code

private void VideoCapture1_OnVideoFrameBitmap(object sender, VideoFrameBitmapEventArgs e)
{
Graphics grf = Graphics.FromImage(e.Frame);

grf.DrawString("Hello!", new Font(FontFamily.GenericSansSerif, 20), new SolidBrush(Color.White), 20, 20);
grf.Dispose();

e.UpdateData = true;
}

Using the OnVideoFrameBuffer event, you must update data in the RGB24 image buffer. Fast but not so easy way. You can use Intel IPP or other image-processing libraries.

Required redists

  • SDK redist

Visit our GitHub page to get more code samples.