IFVideoPicker 1.0.3

IFVideoPicker 1.0.3

测试已测试
Lang语言 Obj-CObjective C
许可 MIT
发布上次发布2014年12月

Min Kim维护。



  • Min Kim

使用 AVCapturexxxx 库的 iOS 视频选择库

特性

  • 264 / AAC 视频和音频硬件加速编码
  • 返回 mp4 框架
  • 包括 flv 分包器

入门指南

安装先行需求

  • 所有 iOS 开发都需要 OS X
  • XCODE,可以从 App Store 获取。
  • GIT 是必需的。
  • CocoaPods 是 iOS 依赖管理必需的。在安装 CocoaPods 之前,您的机器上应该安装了 ruby

安装库

SDK 的源代码可以在 GitHub 上找到。

$ git clone [email protected]:ifactorylab/IFVideoPicker.git

将 IFVideoPicker 添加到您的项目中

如果不存在,创建 Podfile,并添加以下行

pod 'IFVideoPicker',   '~> 1.0.2'

示例

IFVideoPickerDemo 展示了库的工作方式。

捕获视频

#import "IFVideoPicker.h"
#import "MP4Reader.h"

// Create Audio AAC codec with 64kbps and samplerate 44100
IFAudioEncoder *ae = 
  [IFAudioEncoder createAACAudioWithBitRate:64000 sampleRate:44100];

// Create Video H264 codec with 500kbps and 512x288
CMVideoDimensions dimensions;
dimensions.width = 512;
dimensions.height = 288;

IFVideoEncoder *ve =
  [IFVideoEncoder createH264VideoWithDimensions:dimensions
                                        bitRate:500000
                                    maxKeyFrame:200];

[videoPicker_ startCaptureWithEncoder:ve
                                audio:ae
                         captureBlock:^(NSArray *frames, NSData *buffer) {
                        // Captured MP4 frames are coming
                        NSLog(@"buffer: %d bytes, with %d frames", [buffer length], [frames count]);
                    } metaHeaderBlock:^(MP4Reader *reader) {}
                        // MP4 moov header coming
                       } failureBlock:^(NSError *error) {
                        // Failed to capture video / audio chunk
                    }];

联系方式

Email