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;

                InitTextLogo();
            }

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

        private bool logoInitiated = false;

        private VFVideoEffectTextLogo textLogo = null;

        private void InitTextLogo()
        {
            textLogo = new VFVideoEffectTextLogo(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
logo
VisioForge © 2006 - 2021