Overlay a PNG on top of video from MediaCapture

197 Views Asked by At

I would like to overlay a graphic, such as a lower 3rd or frame on top of the video layer as an effect in MediaCapture. How would I go about doing this?

I do not simply want to layer it in the UI using a grid, it needs to be in the MediaCapture so the frame/lower 3rd is also captured in video/image recording.

I am using a rather basic implementation for MediaCapture while I test things out;

MediaCapture mediaCapture;

public async void init()
{
    mediaCapture = new MediaCapture();
    await mediaCapture.InitializeAsync();
}

public async void snapPic()
{
    var lowLagCapture = await mediaCapture.PrepareLowLagPhotoCaptureAsync(ImageEncodingProperties.CreateUncompressed(MediaPixelFormat.Bgra8));

    var capturedPhoto = await lowLagCapture.CaptureAsync();
    var softwareBitmap = capturedPhoto.Frame.SoftwareBitmap;

    await lowLagCapture.FinishAsync(); 
}
0

There are 0 best solutions below