为 iFrameExtractor 编译 ffmpeg 时出现问题

2024-01-08

我正在尝试使用 make 和 build 文件来编译 ffmpegiFrameExtractor 示例 https://github.com/lajos/iFrameExtractor。首先我尝试遵循 github 上的自述文件,该文件只说运行./build_universal在 ffmpeg 文件夹中。它不起作用

然后我尝试按照安装中的信息进行操作,但没有成功。然后我尝试执行 INSTALL 中的操作,然后执行./build_universal这不起作用。导入到项目中的所有 *.a 文件都存在,直到构建序列结束。当。。。的时候lipo运行 build_universal 中的命令,我猜它连接了不同架构的 .a 文件(?)。无论如何,这些都会留下以下错误:

lipo: specifed architecture type (armv6) for file (armv6/libavcodec.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
lipo: specifed architecture type (armv6) for file (armv6/libavdevice.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
lipo: specifed architecture type (armv6) for file (armv6/libavformat.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
lipo: specifed architecture type (armv6) for file (armv6/libavutil.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
lipo: specifed architecture type (armv6) for file (armv6/libswscale.a) does not match it's cputype (16777223) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))

如果我只使用,我可以让项目编译模拟器./build_armv7但如果我运行通用程序,.a 文件最终会被删除。并且仅使用无法为 iphone 4 构建。


经过一周的反复试验,我终于能够创建 ffmpeg 通用库,并成功为设备和模拟器编译和运行 iFrameExtractor。

要在 iPhone 设备或模拟器上编译并运行该项目:

1)打开终端

2)克隆存储库: git clone git://github.com/lajos/iFrameExtractor.git

3)进入项目中的ffmpeg文件夹:cd iFrameExtractor/ffmpeg

4)运行:./configure

5) 编辑构建脚本(build_armv6、build_armv7、build_i386)如下:

这些脚本假设您在 Xcode 4.2 上使用 iOS SDK 5.0。

构建_armv6:

#!/bin/tcsh -f

if (! -d armv6) mkdir armv6
if (! -d lib) mkdir lib

rm armv6/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--enable-cross-compile --target-os=darwin \
--arch=arm --cpu=arm1176jzf-s \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \
--extra-ldflags="-arch armv6 -L//Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system" \
--extra-cflags="-arch armv6"

make

mv libavcodec/libavcodec.a armv6/
mv libavdevice/libavdevice.a armv6/
mv libavformat/libavformat.a armv6/
mv libavutil/libavutil.a armv6/
mv libswscale/libswscale.a armv6/

rm lib/*.a

cp armv6/*.a lib/

构建_armv7:

#!/bin/tcsh -f

if (! -d armv7) mkdir armv7
if (! -d lib) mkdir lib

rm armv7/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--enable-cross-compile --target-os=darwin \
--arch=arm --cpu=cortex-a8 --enable-pic \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \
--extra-ldflags="-arch armv7 -    L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system" \
--extra-cflags="-arch armv7"

make

mv libavcodec/libavcodec.a armv7/
mv libavdevice/libavdevice.a armv7/
mv libavformat/libavformat.a armv7/
mv libavutil/libavutil.a armv7/
mv libswscale/libswscale.a armv7/

rm lib/*.a

cp armv7/*.a lib/

构建_i386:

#!/bin/tcsh -f

if (! -d i386) mkdir i386
if (! -d lib) mkdir lib

rm i386/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl     /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk \
--extra-ldflags="-arch i386 -L//Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/lib/system" \
--extra-cflags="-arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -O0 -fasm-blocks -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2"

make

mv libavcodec/libavcodec.a i386/
mv libavdevice/libavdevice.a i386/
mv libavformat/libavformat.a i386/
mv libavutil/libavutil.a i386/
mv libswscale/libswscale.a i386/

rm lib/*.a

cp i386/*.a lib/

6) 构建 ffmpeg 库:./build_universal

7)打开xcode项目并在你的iPhone设备或模拟器上运行它

这些步骤非常适合我。我希望这能帮助其他努力让 ffmpeg 库在 iOS 上工作的人。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为 iFrameExtractor 编译 ffmpeg 时出现问题 的相关文章

随机推荐

  • .NET 中“调试”和“发布”构建之间的主要区别是什么? [复制]

    这个问题在这里已经有答案了 重复 NET 中的调试与发布 https stackoverflow com questions 90871 debug vs release in net 为什么 NET 应用程序的构建有 调试 和 发布 模式
  • 如何检测手机后退按钮是否被按下

    Please how can I detect if the back button is been pressed in a mobile phone as shown in the image below 我尝试使用在桌面上完成的正常方
  • 使用 Python 的 P2P RDP

    我想用 Python 编写一个简单的 P2P RDP 客户端和服务器 这就是我绘制草图的方式 短时间截屏 压缩它们并发送到服务器应用程序 从服务器应用程序获取键盘 鼠标事件 将它们序列化并发送给客户端 客户端将反序列化它们并使用 SendI
  • Android - Java 使用带有 DefaultHapiContext 的 HAPI v 2.2 解析 HL7 消息

    我在尝试解析 HL7 消息时收到此错误 我不知道为什么以及如何解决它 我正在使用 hapi v2 2 所以请帮助我 提前致谢 这是目录 08 28 15 03 28 552 E dalvikvm 642 Could not find cla
  • vue cli 项目中的 Favicon 未更改

  • 如果调用 http.Get(url) 时发生错误,我们是否需要关闭响应对象?

    在以下代码中 是否还需要在错误情况下关闭响应正文 res err http Get url if err nil log Printf Error s n err defer res Body Close 一般概念是 当一个函数 或方法 有
  • 无法实例化服务:ClassNotFoundException

    我读过大约一百个同一类别的问题 但没有一个有帮助 我有一个工作应用程序 然后重构了包名称 然后编译并运行 一周后 我回来处理它 并在启动时收到 ClassNotFoundException 更糟糕的是 如果我从存储库中签出之前的提交 在任何
  • Ember.js 中的“动态段”?

    在整个 Ember js 文档中 人们发现了这样一个概念 动态段提及在几个地方 https www google de search q site 3Aemberjs com 22dynamic segment 22 这是什么意思 使用适当
  • Swift 3 声音播放

    好吧 我已经研究过这个问题 并尝试了许多不同的方法来在单击按钮时播放声音 在 swift 3 中单击按钮时如何播放声音 我的声音位于名为 Sounds 的文件夹中 名称为 ClickSound mp3 该功能下的用户 MARK PLAY S
  • 在php中的目录中查找特定的文件类型,并在转换后将其发送到不同的目录

    我有一个目录 其中有一个mp4 file 也包括其他文件 我想转换成mp3然后将其发送到不同的目录 我用过以下命令行命令转换成mp3 它工作得很好 ffmpeg i 36031P mp4 map 0 2 ac 1 floor english
  • ICS 不更新组织者日历

    我正在编写一个应用程序 它将发送主要由 Outlook 解释的 ics 文件 当我的应用程序发送更新时 它将成功更新除组织者日历之外的每个人的日历 我使用相同的 UID 并且每次都会递增 SEQUENCE 我的 ICS 文件中是否还缺少其他
  • Oracle + JPA - 使用 INTERVAL 进行查询

    我的数据库表中有一个时间戳列 LASTUPDATED 我通过轮询来决定是否应更新某行 如果记录在过去 10 分钟内没有更新 我会更新它 我想将日期处理委托给数据库 但以下方法均无效 这个说 意外的标记 靠近 Query query enti
  • 如何在选择选项中使用复选框

    客户给了我一个设计 其中有一个选择选项菜单 其中包含一个复选框以及作为列表中单独项目的项目名称 是否可以在 选择选项 菜单中添加一个复选框 注意 开发人员需要添加自己的 id 才能使菜单生效 如果可能的话 我只需要 HTML CSS 代码
  • 为特定密码启用 TLS 1.2

    我们有一个 NET 应用程序调用仅允许 TLS 版本 1 2 的 API 服务器 2008 SP2 我们在服务器上运行以下脚本 Copyright 2016 Alexander Hass http www hass de content s
  • Google PHP 客户端不会验证代码,invalid_request

    我正在使用 Google PHP 客户端 4ae272683e18888362e1f935b813e345b99e23b8 该客户端于 8 月 9 日从 github 中提取 我觉得我的代码太简单了 不会出错 require once Go
  • Set 如何检查重复项? Java哈希集

    对于下面的代码 它输出 1 第二个代码输出 2 我不明白为什么会发生这种情况 是因为我添加了相同的对象吗 我应该如何实现所需的输出2 import java util public class maptest public static v
  • 自定义检查器将值恢复为 Unity 中 Play 上之前的值

    所以在我的游戏中我有一个需要平滑移动的对象Vector3 fromPosition to Vector3 toPosition高速float speed 然后返回到开始的地方 一切都非常简单 但是为了在设置关卡时尝试让生活变得更轻松 我决定
  • 如何使用 Python 3.6 发送电子邮件附件

    你介意帮我一下吗 我使用此页面中的所有代码如何使用Python发送电子邮件附件 https stackoverflow com questions 3362600 how to send email attachments with pyt
  • 如何使用http header发送http请求

    提前致谢 我使用此代码在 http 请求中设置 http 标头来验证 url 但我认为缺少一些东西 这就是为什么我无法得到回复 回应仍然是 需要授权 httpParameters new BasicHttpParams String aut
  • 为 iFrameExtractor 编译 ffmpeg 时出现问题

    我正在尝试使用 make 和 build 文件来编译 ffmpegiFrameExtractor 示例 https github com lajos iFrameExtractor 首先我尝试遵循 github 上的自述文件 该文件只说运行