欢迎光临
我们一直在努力

模仿iOS视频相册可截取视频任意一帧生成图片作为视频封面

建站超值云服务器,限时71元/月

模仿iOS视频相册可截取视频任意一帧生成图片作为视频封面

项目介绍:

KeyframePicker

模仿iOS视频相册可截取视频任意一帧生成图片作为视频封面

https://github.com/zzltjnh/KeyframePicker

Keyframe image generateor and picker from a video like iPhone photo library written in Swift.

Example

To run the example project, clone the repo, open KeyframePicker.xcworkspace from root directory.

  • Requirements

  • Installation

  • Usage

  • Author

  • License

Requirements

  • iOS 8.0+

  • Xcode 8.0

  • Swift 3.0

Installation

KeyframePicker is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'KeyframePicker'

Usage

import KeyframePicker
//create
let keyframePicker = KeyframePickerViewController.create()

// set `asset` if your video from photolibrary or camera
// set `videoPath` if your video from sand box or remote
keyframePicker.asset = yourAvAsset

// set handler
keyframePicker.generatedKeyframeImageHandler = { [weak self] image in
    if let image = image {
        print("generate image success")
        //do something with image
    } else {
        print("generate image failed")
    }
}

// show
navigationController?.pushViewController(keyframePicker, animated: true)

Author

Zhilong Zhang,Tianjin China, zzltjnh@gmail.com

License

KeyframePicker is available under the MIT license. See the LICENSE file for more info.

code4app

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 模仿iOS视频相册可截取视频任意一帧生成图片作为视频封面
分享到: 更多 (0)