为iOS编译ffmpeg和gas-preprocessor.pl

时间:2013-12-23 19:05:11

标签: ios ffmpeg gas

我想为iOS编译ffmpeg。我以前做过几次。但现在我在干净的新小牛队,并且在配置上我总是得到

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
GNU assembler not found, install gas-preprocessor

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

我安装了当前的Xcode。还酿造。 gas-preprocessor.pl以及usr/bin中的当前usr/local/binhttps://github.com/yuvi/gas-preprocessor)。


perl /usr/bin/gas-preprocessor.pl gcc我正在Unrecognized input filetype at /usr/bin/gas-preprocessor.pl line 33.


此配置有效:

./configure \
--extra-cflags='-arch arm64 -mios-version-min=7.0 -mthumb' \
--extra-ldflags='-arch arm64 -mios-version-min=7.0' \
--enable-cross-compile \
--arch=arm64 \
--target-os=darwin \
--cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk \
--prefix=arm64 \
--disable-doc \
--disable-shared \
--disable-everything \
--enable-static \
--enable-pic \
--disable-muxers \
--enable-muxer=flv \
--disable-demuxers \
--enable-demuxer=h264 \
--enable-demuxer=pcm_s16le \
--disable-devices \
--disable-parsers \
--enable-parser=h264 \
--disable-encoders \
--enable-encoder=aac \
--disable-decoders \
--enable-decoder=h264 \
--enable-decoder=pcm_s16le \
--disable-protocols \
--enable-protocol=rtmp \
--disable-filters \
--disable-bsfs

此配置抛出上述错误(未找到GNU汇编程序,安装gas-preprocessor):

./configure \
--cpu=cortex-a8 \
--extra-cflags='-arch armv7 -mios-version-min=7.0 -mthumb' \
--extra-ldflags='-arch armv7 -mios-version-min=7.0' \
--enable-cross-compile \
--arch=armv7 \
--target-os=darwin \
--cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk \
--prefix=armv7 \
--disable-doc \
--disable-shared \
--disable-everything \
--enable-static \
--enable-pic \
--disable-muxers \
--enable-muxer=flv \
--disable-demuxers \
--enable-demuxer=h264 \
--enable-demuxer=pcm_s16le \
--disable-devices \
--disable-parsers \
--enable-parser=h264 \
--disable-encoders \
--enable-encoder=aac \
--disable-decoders \
--enable-decoder=h264 \
--enable-decoder=pcm_s16le \
--disable-protocols \
--enable-protocol=rtmp \
--disable-filters \
--disable-bsfs

4 个答案:

答案 0 :(得分:1)

chmod +x gas-preprocessor.pl做到了!

答案 1 :(得分:1)

  1. https://github.com/mansr/gas-preprocessor

  2. 下载gas-preprocessor.pl
  3. gas-preprocessor.pl复制到/usr/local/bin

  4. 修改文件权限:chmod 777 /usr/local/bin/gas-preprocessor.pl

答案 2 :(得分:0)

https://github.com/yuvi/gas-preprocessor获取gas-preprocessor.pl,并确保在运行configure时它位于您的路径上。

例如,将gas-preprocessor.pl复制到/usr/bin或使用

运行配置
PATH=$PATH:/path/to/gas-preprocessor configure ...

其中/path/to/gas-preprocessorgas-preprocessor.pl所在的目录。

答案 3 :(得分:0)

您必须使用特殊版本的gas-preprocessor.pl进行ffmpeg编译:https://github.com/google/grafika/blob/master/src/com/android/grafika/RecordFBOActivity.java

来自yuvi(git://git.libav.org/gas-preprocessor.git)的版本已过时(3年未经更改)且无法使用现代ffmpeg版本