PoporFFmpeg 0.0.08

PoporFFmpeg 0.0.08

Maintained by popor.




  • By
  • popor

MyBox

PoporFFmpeg

CI Status Version License Platform

Example

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

Requirements

Installation

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

pod 'PoporFFmpeg'

因为cocoapod对c++的依赖不完善,所以将FFmpeg做了静态包处理,静态包仓库位于 PoporFFmpeg   , 原始文件位于 PoporFFmpegLib  , 原始的FFmpeg pod仓库位于 FFMpegCompress

放弃对mac的支持,文件太大了,请选择使用FFmpeg官网的dmg文件,应该比这个小很多,而且还可以使用最新版本.

放弃对iPhone32CPU,iPhone5的支持,文件太大了,github不支持超过100MB文件.

使用方法
#import <PoporFFmpeg/PoporFFmpegCompress.h>

@property (nonatomic, strong) PoporFFmpegCompress * ffmpegCmd;

NSString *videoPath;
NSString *resultPath;

if (!self.ffmpegCmd) {
    self.ffmpegCmd = [PoporFFmpegCompress new];
}
[self.ffmpegCmd compressVideoUrl:videoPath size:CGSizeMake(540, 960) tPath:resultPath finish:^(BOOL finished, NSString *info) {
    
    if (finished) {
        if (IsDebugVersion) {
            NSData * data = [NSData dataWithContentsOfFile:resultPath];
            NSLog(@"FFMpeg video size : %02fMB", data.length/1024.0f/1024.0f);
        }
    }else{
        
    }
}];

Author

popor, [email protected]

License

PoporFFmpeg is available under the MIT license. See the LICENSE file for more info.