Add GIF watermark on a video in iOS

前端 未结 2 1665
我寻月下人不归
我寻月下人不归 2021-02-02 04:33

I need to accomplish this function: There is a GIF overlay on a video, hoping to composition this video and GIF to a new video. I\'m using the following code, but result is only

相关标签:
2条回答
  • 2021-02-02 04:37

    Just in case here's the example on swift3 how to do the same - insert animated frames/images into the video (not exactly the gif but array of Images). It uses AVAssetExportSession and AVMutableVideoComposition together with AVMutableVideoCompositionInstruction, and CAKeyframeAnimation to animate the frames.

    0 讨论(0)
  • 2021-02-02 05:00

    You should adjust your animation settings for CoreAnimation:

    animation.beginTime = AVCoreAnimationBeginTimeAtZero;
    animation.removedOnCompletion = NO;
    
    0 讨论(0)
提交回复
热议问题