ios编译ffmpeg
2015-04-17 17:22
309 查看
参考1:iMac下:http://blog.csdn.net/templar1000/article/details/8490838
参考2:linux下:http://www.oschina.net/question/54100_36528
参考3:iMac下:http://yarin.blog.51cto.com/1130898/862591
教你一招,一般下载的源码里面的configure文件很重要,但是经常会出现末尾都是 ^M,这样的,而且每行都是这样,只有用 vi -b configure 打开时可以看到,删掉就行,但是configure文件往往有上千行,不可能一行一行的删掉吧,那怎么办,用下面的办法: sed
-e 's/\r//' yourfile
相关文件:
下载 gas-preprocessor.pl
下载 ffmpeg2.2.6 点击打开链接
ffmpeg-build :
编译步骤:
1、 编译配置
1) 安装Xcode4 以上版本,并安装iPhoneOS SDK
2) 将gas-preprocessor.pl 复制到/usr/bin/下,并修改权限:sudo chmod a+rwx gas-preprocessor.pl
3) 修改ffmpeg-build文件。打开ffmpeg-build,检查PLATFORM_ROOT变量,修改其变量让它指向iPhoneOS sdk的目录。然后,将这个文件复制到代码源目录中
2、 编译
1) 将源代码复制到MAC OS中,进入目录,执行: ./ffmpeg-build 等待完成
2) 完成后,可以看到target/install目录,即编译成功。
使用例子:点击打开链接
参考2:linux下:http://www.oschina.net/question/54100_36528
参考3:iMac下:http://yarin.blog.51cto.com/1130898/862591
教你一招,一般下载的源码里面的configure文件很重要,但是经常会出现末尾都是 ^M,这样的,而且每行都是这样,只有用 vi -b configure 打开时可以看到,删掉就行,但是configure文件往往有上千行,不可能一行一行的删掉吧,那怎么办,用下面的办法: sed
-e 's/\r//' yourfile
相关文件:
下载 gas-preprocessor.pl
下载 ffmpeg2.2.6 点击打开链接
ffmpeg-build :
#!/bin/bash rm -rf target mkdir target mkdir target/install if [ $? -eq 0 ]; then echo "creat target dir ok" else exit 0 fi SOURCE_DIR=. BUILD_DIR=$(pwd)/target PLATFORM_ROOT="/Applications/Xcode.app/Contents/Developer" echo "source dir is $SOURCE_DIR" echo "build dir is $BUILD_DIR" echo "cross platform root is $PLATFORM_ROOT" #cp ${SOURCE_DIR}/configure ${BUILD_DIR}/ #./configure ${SOURCE_DIR}/configure --disable-debug --enable-static --enable-version3 --enable-libx264 --enable-gpl --extra-cflags=-I./libx264 --extra-ldflags=-L./libx264 --enable-pthreads --enable-memalign-hack --enable-cross-compile --disable-network --enable-runtime-cpudetect --disable-doc --disable-asm --enable-decoder=h264 --enable-encoder=libx264 --cc=${PLATFORM_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --as='gas-preprocessor/gas-preprocessor.pl ${PLATFORM_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' --sysroot=${PLATFORM_ROOT}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk --extra-ldflags=-L${PLATFORM_ROOT}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/lib/system --target-os=darwin --arch=arm --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7' --target-path=${BUILD_DIR} --prefix=${BUILD_DIR} --tempprefix=${BUILD_DIR}/ if [ $? -eq 0 ]; then echo "configure ok" else exit 0 fi # make fat (universal) libs make clean make if [ $? -eq 0 ]; then echo "build success" else exit 0 fi cp -f INSTALL.md INSTALL make install if [ $? -eq 0 ]; then echo "build install success" else exit 0 fi echo "Done."把这个复制到脚本文件里去。如果运行失败,提示/bin/bash ^M :no such file. 可以这样运行:vi -a ffmpeg-build,把里面的 ^M去掉,重新保存。
编译步骤:
1、 编译配置
1) 安装Xcode4 以上版本,并安装iPhoneOS SDK
2) 将gas-preprocessor.pl 复制到/usr/bin/下,并修改权限:sudo chmod a+rwx gas-preprocessor.pl
3) 修改ffmpeg-build文件。打开ffmpeg-build,检查PLATFORM_ROOT变量,修改其变量让它指向iPhoneOS sdk的目录。然后,将这个文件复制到代码源目录中
2、 编译
1) 将源代码复制到MAC OS中,进入目录,执行: ./ffmpeg-build 等待完成
2) 完成后,可以看到target/install目录,即编译成功。
使用例子:点击打开链接
相关文章推荐
- ios ffmpeg 3.0 编译安装
- mac系统编译 ffmpeg ios 静态库
- ios FFmpeg 适配编译
- 实战FFmpeg--编译iOS平台使用的FFmpeg库(支持arm64的FFmpeg2.6.2)
- 编译ffmpeg for iOS,并调试iFrameExtractor demo
- ios一步一步编译ffmpeg,x264实现h264编码
- iOS: FFmpeg编译和使用问题总结
- 编译ffmpeg-ios
- FFmpeg框架在iOS平台上的编译和使用
- iOS--kxmovie之FFmpeg编译和使用
- ios一步一步编译ffmpeg,x264实现h264编码
- mac上编译FFmpeg跑ios
- iOS: FFmpeg编译和使用问题总结
- iOS编译FFmpeg、kxmovie实现视频播放 (转载)
- [绍棠] iOS编译FFmpeg、kxmovie实现视频播放
- 转:ffmpeg编译iOS 静态库教程
- iOS开发 FFmpeg 编译及使用
- FFmpeg iOS库编译与集成
- IOS 编译ffmpeg For SDK6.1,模拟器、armv7、armv7s均可使用
- iOS: FFMpeg编译和使用问题总结