iOS AVFoundation - Show a time display over a video and export

后端 未结 2 807
一生所求
一生所求 2021-01-31 23:37

I want to show a display overlay over a video and export that video including this display. I had a look into the AVFoundation Framework, AVCompositions, AVAssets etc. but I sti

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-31 23:51

    I think you can use AVCaptureVideoDataOutput to process each frame and use AVAssetWriter to record the processed frame.You can refer to this answer

    https://stackoverflow.com/a/4944594/379941 .

    use AVAssetWriterPixelBufferAdaptor's appendPixelBuffer:withPresentationTime: method to export
    And I strongly suggest using OpenCV to process frame. this is a nice tutorial

    http://aptogo.co.uk/2011/09/opencv-framework-for-ios/.

    OpenCV library is very great.

提交回复
热议问题