ios编译ffmpeg
来源:互联网 发布:滴滴有抢单软件吗 编辑:程序博客网 时间:2024/06/11 21:49
编译模拟器版本
1 到https://github.com/yuvi/gas-preprocessor下载gas-preprocessor.p并拷贝到/usr/sbin目录中
2 下载ffmpeg源码。
http://ffmpeg.org/download.html
https://github.com/FFmpeg/FFmpeg
3 解压源码,cd到源码目录下
4 创建文件config_i386.sh,其内容如下
#!/bin/tcsh -fset targetDir="../ffmpeg-libs/i386"if (! -d $targetDir ) mkdir $targetDirrm -f $targetDir/*.amake clean#./configure --arch=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386' --disable-encoders --disable-debug --disable-mmx./configure \--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc \--as='gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' \--nm="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/nm" \--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk \--target-os=darwin \--arch=i386 \--cpu=i386 \--extra-cflags='-arch i386 -miphoneos-version-min=4.3 -mdynamic-no-pic' \--extra-ldflags='-arch i386 -miphoneos-version-min=4.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk' \--prefix=compiled/i386 \--enable-cross-compile \--enable-nonfree \--enable-gpl \--disable-armv5te \--disable-swscale-alpha \--disable-doc \--disable-ffmpeg \--disable-ffplay \--disable-ffprobe \--disable-ffserver \--disable-asm \--disable-debugmakemv libavcodec/libavcodec.a $targetDirmv libavdevice/libavdevice.a $targetDirmv libavformat/libavformat.a $targetDirmv libavutil/libavutil.a $targetDirmv libswscale/libswscale.a $targetDir
5 执行config_i386.sh进行配置和编译
编译完成后,可以在$targetDir找到相应的静态库文件
编译真机版
前3步同上
第4步:创建文件config_armv7,其内容如下
#!/bin/tcsh -fset targetDir="../ffmpeg-libs/armv7"if (! -d $targetDir ) mkdir $targetDirrm -f $targetDir/*.amake clean./configure \--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \--as='gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \--nm="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/nm" \--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk \--target-os=darwin \--arch=arm \--cpu=cortex-a8 \--extra-cflags='-arch armv7 -miphoneos-version-min=4.3 -mdynamic-no-pic' \--extra-ldflags='-arch armv7 -miphoneos-version-min=4.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk' \--prefix=compiled/armv7 \--enable-cross-compile \--enable-nonfree \--enable-gpl \--disable-armv5te \--disable-swscale-alpha \--disable-doc \--disable-ffmpeg \--disable-ffplay \--disable-ffprobe \--disable-ffserver \--disable-asm \--disable-debugmakemv libavcodec/libavcodec.a $targetDirmv libavformat/libavformat.a $targetDirmv libavutil/libavutil.a $targetDirmv libswscale/libswscale.a $targetDir
第5步:
执行config_armv7进行配置和编译,编译完成后可以在$targetDir找到相应的静态库文件
- iOS ffmpeg 之编译ffmpeg
- 编译ffmpeg for ios
- ios ffmpeg编译总结
- 编译ffmpeg for iOS
- ios开发编译ffmpeg
- ios编译ffmpeg
- iOS编译ffmpeg
- 编译ffmpeg for iOS
- ios xcode5编译ffmpeg
- iphone ios编译ffmpeg
- IOS下编译ffmpeg
- FFmpeg iOS 编译
- ffmpeg编译 for ios
- ffmpeg ios 编译
- ffmpeg + x264 + ios 编译
- ios编译ffmpeg
- 编译ffmpeg for iOS
- FFMPeg-ios编译
- keycode
- 【Hibernate学习杂记】最简单的Hibernate配置实用
- 最快线程间数据交换算法,有效避免锁竞争 -- TwoQueues
- hdu 2546 饭卡解题报告
- OutputDebugString
- ios编译ffmpeg
- android控件--Spinner
- 对三层架构和设计模式的理解
- 用GHOST一键恢复之后,电脑只剩C盘了
- 在coldfusion9下用round和numberformat做四舍五入不可靠
- jquery弹出提示框右下角显示
- ios本地化
- C#中null和""的区别
- Android java调试又一好工具