iOS視頻流協議html
//參考git
http://www.cnblogs.com/smileEvday/p/ffmpeg.htmlgithub
歷史版本詳見http://www.ffmpeg.org/releases/shell
build-ffmpeg.sh腳本地址: https://gist.github.com/m1entus/6983547app
gas-preprocessor.pl腳本地址: https://github.com/mansr/gas-preprocessor。ide
所需腳本文件http://download.csdn.net/detail/u013873967/7019907ui
1、拷貝gas-preprocessor.pl文件到 /usr/bin目錄下。spa
2、修改gas-preprocessor.pl文件的權限 (可讀 可寫).net
//執行終端命令code
一、cd /usr/bin
2、chmod a+rwx gas-preprocessor.pl
3、切換build-ffmpeg.sh腳本的目錄下,使用命令sh build-ffmpeg.sh 運行該腳本便可。
//執行終端命令
一、cd /build-ffmpeg.sh 腳本的目錄下
二、sh build-ffmpeg.sh
iOS Xh64編譯
首先到http://www.videolan.org/developers/x264.html下載x264的庫,而後解壓。
打開shell,進入x264的目錄,執行以下語句
CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --prefix='dist' --extra-cflags='-arch armv7s' --extra-ldflags='-arch armv7s -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system' --enable-pic
而後make,libx264.a就出來啦。若是沒法執行,請將語句中的6.1.sdk替換成你電腦裏面有的sdk。