To run the example project, clone the repo, and run pod install from the Example directory first.
PoporFFmpegCompress is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'PoporFFmpegCompress'因为cocoapod对c++的依赖不完善,所以将FFmpeg做了静态包处理,静态包仓库位于 PoporFFmpeg , 原始文件位于 PoporFFmpegLib , 原始的FFmpeg pod仓库位于 FFMpegCompress
使用方法
#import <PoporFFmpegCompress/PoporFFmpegCompress.h>
@property (nonatomic, strong) PoporFFmpegCompress * ffmpegCmd;
NSString *videoPath;
NSString *resultPath;
if (!self.fCompress) {
self.fCompress = [PoporFFmpegCompress new];
}
[self.fCompress compressVideoUrl:videoUrlPath size:size tPath:tPath finish:^(BOOL finished, NSString *info) {
if (finished) {
NSLog(@"PoporFFmpeg finish");
}else{
NSLog(@"PoporFFmpeg error: %@", info);
}
}];
popor, 908891024@qq.com
PoporFFmpegCompress is available under the MIT license. See the LICENSE file for more info.
