iOS视频拍摄和播放工具SKVideoManager
来源:互联网 发布:mysql下载安装版本 编辑:程序博客网 时间:2024/04/29 07:08
SKVideoManager
自定义的一个以AVFoundation框架类为基础的iOS视频拍摄和播放管理者 – github地址
包含一个拍摄和一个播放的工具,工具只提供API处理视频的各类事件,不提供UI,使用者可以自由的定制UI。此工具提供了Block回调,一次性提供所有需要的时机,只需要在Block中处理逻辑即可。
A video manager with SKVideoCapture and SKVideoPlayer.
The 2 tools just support APIs, UI is not supported.
Demo Screen shoot
Demo截图
SKVideoCapture
摄录工具默认抓去960x540尺寸的视频,相当于拍摄的视频宽度不变,高度以16:9的比例截取中间部分得到的视频。
capture a video with default size 960x540.
USE 使用
#import "SKVideoCapture.h"capture = [SKVideoCapture videoCaptureWithPreviewLayerView:recordView videoGravity:AVLayerVideoGravityResizeAspect];[capture videoCaptureDidStartRecording:^{ NSLog(@"——————startRecording"); } finishRecording:^{ NSLog(@"——————endRecording"); } recordingFailed:^{ NSLog(@"——————recordingFailed"); }]; // destory [capture destroy]; capture = nil;
更多细节请查看.m文件,APIs请查看.h了解
more details check SKVideoCapture.h/.m file
SKVideoPlayer
视频播放工具
a video player
USE
#import "SKVideoPlayer.h"player = [SKVideoPlayer videoPlayerWithView:recordView videoURL:outputURL];[player videoPlayerDidReadyToPlay:^(BOOL loadVideoSucceed, float duration, NSString *durationFormatStr) { NSLog(@"----loadVideoSucceed:%d----duration:%.2f---Str:%@", loadVideoSucceed, duration, durationFormatStr); } play:^{ NSLog(@"----play----"); } pause:^{ NSLog(@"----pause----"); } playbackBufferEmpty:^{ NSLog(@"----playbackBufferEmpty----"); } playbackLikelyToKeepUp:^{ NSLog(@"----playbackLikelyToKeepUp----"); } bufferingProgress:^(float totoalBuffer) { NSLog(@"----bufferingProgress----totalBuffer:%.2f", totoalBuffer); } playProgress:^(float currentTime, float duration) { NSLog(@"----playProgress----currentTime:%.2f----duration:%.2f", currentTime, duration); } playDidEnd:^{ NSLog(@"----playDidEnd----"); }]; // destory [player destroy]; player = nil;
更多细节请查看.m文件,APIs请查看.h了解
more details check SKVideoCapture.h/.m file
issue
如发现BUG或者有新需求,请告知我,谢谢!
Any bugs please issue me !
3KS !
1 0
- iOS视频拍摄和播放工具SKVideoManager
- iOS视频拍摄压缩上传和播放
- iOS 之视频拍摄和压缩
- 拍摄照片和视频
- iphone ios 视频拍摄旋转
- iOS视频拍摄与压缩
- iOS视频拍摄与压缩
- iOS视频拍摄与压缩
- iOS 视频拍摄与压缩
- iOS视频拍摄与压缩
- iOS视频拍摄与压缩
- ios仿微信短视频拍摄类库WechatShortVideo
- iOS 拍摄视频方向不正确问题
- 视频拍摄
- IOS开发—iOS视频拍摄与压缩
- Capturing Video on iOS iOS拍摄视频的方法总结
- 拍摄视频和从相册中选本地视频
- iOS拍摄视频,自定义拍摄界面,高清压缩,添加水印
- HDU 4393 Throw nails
- Android Studio 高级配置
- 程序放后台运行
- cug1692 构造字符串
- poj 1050 dp
- iOS视频拍摄和播放工具SKVideoManager
- 学习使用的PL/0编译器增强版PL/0plusplusCompiler(二)加入支持命令行参数
- Java锁之可重入锁介绍
- win7下Eclipse开发Hadoop应用程序环境搭建
- 89C51单片机做示波器,读取波形代码
- Dockerfile文件那些事(一)
- Android Broadcast 广播
- 二项式系数递归
- redis学习笔记(15)---redis数据库