Draw text overlay using OnVideoFrameBuffer event

Sample code

If video effect API to draw text overlay is not enough, you can draw overlay manually in OnVideoFrameBuffer, using ImageHelper API.
        private void SDK_OnVideoFrameBuffer(object sender, VideoFrameBufferEventArgs e)
            if (!logoInitiated)
                logoInitiated = true;


            MFP.AddTextLogo(null, e.Frame.Data, e.Frame.Width, e.Frame.Height, ref textLogo, e.Timestamp, 0);

        private bool logoInitiated = false;

        private VideoEffectTextLogo textLogo = null;

        private void InitTextLogo()
            textLogo = new VideoEffectTextLogo(true);
            textLogo.Text = "Hello world!";
            textLogo.Left = 50;
            textLogo.Top = 50;
Please contact support to get help with this tutorial. Visit our GitHub page to get more code samples.
abstract 2abstract 1abstract 3
VisioForge © 2006 - 2022