如何使用AVFoundation在Objective-C中创建cinemagraphs

har*_*sad 11 objective-c animated-gif avfoundation ios

有没有办法使用AVFoundation或objective-c中的任何其他Image SDK 创建自己的Cinemagraph?我无法找到正确的sdk或实现此方法.

我检查了文档,但没有找到任何关于此的内容.

任何帮助将不胜感激.

Max*_*Max 0

AVFoundation 框架提供了用于从不同资产(视频、图像等)创建新作品的工具。您很可能可以使用 AVMutableComposition 来达到您想要的效果。https://developer.apple.com/library/ios//documentation/AVFoundation/Reference/AVMutableComposition_Class/index.html

您可以从苹果文档中阅读有关使用 AVFoundation 编辑音频/视频的更多信息https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/03_Editing.html