GitHub - noppefoxwolf/Kitsunebi: Overlay alpha channel video animation player vi...
source link: https://github.com/noppefoxwolf/Kitsunebi
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Overlay alpha channel video animation player view using OpenGLES.
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]
License
Kitsunebi is available under the MIT license. See the LICENSE file for more info.
Sample video file
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK