Render dynamic text onto CVPixelBufferRef while recording video

前端 未结 4 2200
隐瞒了意图╮
隐瞒了意图╮ 2021-02-09 17:15

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

4条回答
  •  温柔的废话
    2021-02-09 17:56

    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];
    

提交回复
热议问题