Render dynamic text onto CVPixelBufferRef while recording video

前端 未结 4 2105
隐瞒了意图╮
隐瞒了意图╮ 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:52

    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

提交回复
热议问题