13

警告:

別のユーザーから、iOSでFFMPEGを使用することをめぐって法的な問題があると知らされました。リンクは、http://multinc.com/2009/08/24/compatibility-between-the-iphone-app-store-にあります。 and-the-lgpl /

初めて慌てて書いたとき、質問を少し片付けました。これで、少し休憩した後、より明確になりました。

編集:ARMv7、ARMv7s、iOS6.0用にビルドする必要があることを学びました

XCode4.5.1プロジェクトでFFMPEGライブラリを使用しようとしています。そして、私はARMv7用にそれを構築しようとしています。私が探しているのは、正確なプロセスといくつかの説明です。これは十分に文書化された問題ではないことを理解しています。しかし、他のポプルが私と同じ問題を抱えていることを私は知っています。

私ができること。

テスト用のライブラリを構築することができました。

1)ffmpegのクローンを作成できました。初心者の場合、これはffmpegソースでディレクトリを作成することから始めます。(それを書いた人たちへの称賛)

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

2)エラーのない設定ファイルを書くことができました。後でこの部分に戻ります。これは私が./configureに添付するコマンドです

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch = arm --target-os = darwin --cc = / Applications / Xcode .app / Contents / Developer / Platforms / iPhoneOS.platform / Developer / usr / llvm-gcc-4.2 / bin / arm-apple-darwin10-llvm-gcc-4.2

--as ='gas-preprocessor / gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm -gcc-4.2 '

--sysroot = /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk

--cpu = cortex-a8 --extra-ldflags ='-arch = armv7 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk' --enable -pic --disable-bzlib --disable-gpl --disable-shared --enable-static --disable-mmx --disable-debug --disable-neon --extra-cflags ='-pipe -Os -gdwarf -2 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -m $ {thumb_opt:-no-thumb} -mthumb-interwork '

これらは注意すべき点です。

  • / usr / local / binにあるgas-preprocessor.plファイルをダウンロード(https://github.com/yuvi/gas-preprocessor )する必要がありました。読み取り/書き込みのアクセス許可を設定する(777)
  • 適切なGCCコンパイラを使用していることを確認してください:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc- 4.2
  • 適切なSDKを使用していることを確認してください:/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk
  • --extra-cflags = "-arch armv7"の原因:エラー:認識されないコマンドラインオプション「-arch」</ li>

ここに問題があります。

私はそのようにライブラリを含めることができます

libavcodec / avcodec.h

しかし、私がエンコーダーを書き始めたとき。私はこの警告と数え切れないほどのエラーを受け取りました。

ファイル/Users/Jimmy/Development/source.ffmpeg/Library/libavutil.aを無視して、リンクされているアーキテクチャ(armv7s)ではないアーカイブ用にファイルがビルドされました:/Users/Jimmy/Development/source.ffmpeg/Library/libavutil。 a

つまり、正しいバイナリを作成しなかったということです。

私が探しているのは、iOS6.0とARMv7用のFFMPEGを構築するプロセスと、注意すべき大部分のことを私たち全員に説明するために、以前にそれを行った人です。トンありがとう。

4

1 に答える 1

12

これが私の作業中のFFmpegiOS6でのクロスコンパイル用の構成です。ARMv7

注:内部にgas-preprocessor.plが必要です。binディレクトリにgas-preprocessor.pl/usr/local/bin/が存在するまで続行しないでください。

  • ここからFFmpeg1.0"Angel"をダウンロードしてください

  • Desktop解凍して、フォルダなどの場所に配置します

  • ターミナルを開き、unzipped FFmpeg folder

  • 次のコマンドをコピーして貼り付けます(しばらくお待ちください

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch = arm --target-os = darwin --cc = / Applications / Xcode .app / Contents / Developer / Platforms / iPhoneOS.platform / Developer / usr / bin / gcc --as ='gas-preprocessor / gas-preprocessor.pl/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform /Developer/usr/bin/gcc'--sysroot = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk --cpu = cortex-a8 --extra- cflags ='-arch armv7' --extra-ldflags ='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk' --enable- pic --enable-decoder = rawvideo --disable-asm

  • 次に、ターミナルで次のコマンドを入力しますmakeもう少し待ちます

  • 終了したら、ターミナルに入力しますsudo make installもう一度待ちます)

  • /usr/local/lib焼きたてのarmv7ライブラリを探すために移動します

  • 楽しみ!

アレックス


armv7sのサポートが追加されました

このarmv7s構成は完全にテストされておらず、これが機能するかどうかはわかりません。iPhone5を所有していないため、最終的なarmv7sライブラリをテストする人が必要です。

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch = arm --target-os = darwin --cc = / Applications / Xcode .app / Contents / Developer / Platforms / iPhoneOS.platform / Developer / usr / bin / gcc --as ='gas-preprocessor / gas-preprocessor.pl/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform /Developer/usr/bin/gcc'--sysroot = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk --cpu = cortex-a8 --extra- cflags ='-arch armv7s' --extra-ldflags ='-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk' --enable- pic --enable-decoder = rawvideo --disable-asm

于 2012-10-26T04:16:51.263 に答える