Kitsunebi

Overlay alpha channel video animation player view using OpenGLES.

Kitsunebi

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

At the top of your file, make sure to import Kitsunebi

import Kitsunebi

Then, instantiate KBAnimationView in your view controller:

private lazy var playerView: KBAnimationView = KBAnimationView(frame: view.bounds)!

override func viewDidLoad() {
    super.viewDidLoad()
    view.addSubview(playerView)
}

You can play transparency video any framerate. mainVideo is colornize video, alphaVideo is alpha channel monotone video. please see example video files.:

playerView.play(mainVideoURL: Bundle.main.url(forResource: "main", withExtension: "mp4")!,
                    alphaVideoURL: Bundle.main.url(forResource: "alpha", withExtension: "mp4")!,
                    fps: 30)

customize video quality

If video playing are slow, change quality.

playerView.quality = .low

Installation

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

pod 'Kitsunebi'

Author

Tomoya Hirano, [email protected]

GitHub