Render dynamic text onto CVPixelBufferRef while recording video

前端 未结 4 2177
暗喜
暗喜 2021-02-09 16:56

I\'m recording video and audio using AVCaptureVideoDataOutput and AVCaptureAudioDataOutput and in the captureOutput:didOutputSampleBuffer:fromCon

4条回答
  •  粉色の甜心
    2021-02-09 17:46

    Do you want to as below? enter image description here

    Instead of using CIBlendWithMask, you should use CISourceOverCompositing, try this:

    //4.
    CIFilter *filter = [CIFilter filterWithName:@"CISourceOverCompositing"];
    [filter setValue:maskImage forKey:kCIInputImageKey];
    [filter setValue:inputImage forKey:kCIInputBackgroundImageKey];
    CIImage *outputImage = [filter outputImage];
    

提交回复
热议问题