标签:编译安装 视频 brew include hex 5.0 cti terminal view
Xcode 7.0
Terminal
打开终端Terminal
进入下载后的gas-preprocessor
文件夹
将文件夹内的gas-preprocessor.pl
文件拷贝到/usr/sbin/
目录下
修改/usr/sbin/gas-preprocessor.pl
的文件权限为可执行权限
chmod 777 /usr/sbin/gas-preprocessor.pl
执行FFmpeg-iOS-build-script-master
文件夹内的build-ffmpeg.sh
编译所有的版本arm64
、armv7
、x86_64
的静态库
./build-ffmpeg.sh
编译支持arm64
架构的静态库
./build-ffmpeg.sh arm64
编译适用于armv7
和x86_64(64-bit simulator)
的静态库
./build-ffmpeg.sh armv7 x86_64
编译合并的版本
./build-ffmpeg.sh lipo
yasm
没有安装的情况
解决方案1
进入下载后的yasm
文件夹,通过编译安装命令yasm
./configure && make -j 4 && sudo make install
解决方案2
使用Homebrew包管理器,进行安装
brew install yasm
测试是否安装成功
yasm --verision
c test failed
的情况
xcode
环境安装过多,使用xcode-select
选择默认的工具路径/Applications/Xcode-beta.app
sudo xcode-select -s /Applications/Xcode-beta.app
FFmpeg
静态库编译成功后,即可将FFmpeg-iOS文件夹(包含include和lib)引入到Xcode内
加入依赖库libz.lib
加入依赖库libbz2.lib
加入依赖库libiconv.lib
如有编译错误,链接文件不存在
修改Build Setting
Header Search Paths = $(SRCROOT)/LOFFmpegSample/FFmpeg-iOS/include
kxmovie
播放视频 NSString *path = @"";
NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
// increase buffering for .wmv, it solves problem with delaying audio frames
if ([path.pathExtension isEqualToString:@"wmv"])
parameters[KxMovieParameterMinBufferedDuration] = @(5.0);
// disable deinterlacing for iPhone, because it‘s complex operation can cause stuttering
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
parameters[KxMovieParameterDisableDeinterlacing] = @(YES);
KxMovieViewController *vc = [KxMovieViewController movieViewControllerWithContentPath:path
parameters:parameters];
[self presentViewController:vc animated:YES completion:nil];
实例工程:
LOFFmpeg
标签:编译安装 视频 brew include hex 5.0 cti terminal view
原文地址:http://www.cnblogs.com/Ghosgt/p/7090170.html