为iOS 5编译x264

art*_*r97 1 ffmpeg x264

我正在尝试将最新版本的libx264编译为iOS 5 arm.

在2010年中期,加布里埃尔的建筑脚本工作.

它不再了.

它说"找不到工作的C编译器".

任何人都可以给我直接答案吗?它是2012年,谷歌似乎没有人编译它.

rod*_*red 5

更新: 我已将所需文件添加到下面的github存储库中. https://github.com/rodisbored/ffmpeg_x264_iOS5_build

我拿了加布里埃尔的剧本并对其进行了修改.我一直想在网上发布完整的脚本,但这里是你需要的部分.将它放入加布里埃尔的剧本中.这适用于XCode 4.2.我没有更新到4.3来测试路径名是否仍然有效,但我认为你可以从下面找出更新的位置.

对于armv6

CC =/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host = arm-apple-darwin --sysroot =/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5 .0.sdk --prefix ='dist'--extra-cflags =' - arch armv6'-extra-ldflags =' - L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv6' - enable-pic --disable-asm --enable-static

对于armv7

CC =/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host = arm-apple-darwin --sysroot =/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5 .0.sdk --prefix ='dist' - extra-cflags =' - arch armv7'-extra-ldflags =' - L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv7' - enable-pic --enable-static

要将这些链接到ffmpeg,请确保将库和标头的路径放入--extra-cflags和--extra-ldflags.如果你不这样做,它会抱怨找不到libx264库.以下是您需要完全打开的内容.

--enable-libx264 \
--enable-encoder=libx264 \
--enable-encoder=libx264rgb \
--enable-gpl
Run Code Online (Sandbox Code Playgroud)