Render dynamic text onto CVPixelBufferRef while recording video

前端 未结 4 2169
暗喜
暗喜 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:51

    You can also use CoreGraphics and CoreText to draw directly on top of the existing CVPixelBufferRef if it's RGBA (or on a copy if it's YUV). I have some sample code in this answer: https://stackoverflow.com/a/46524831/48125

提交回复
热议问题