0

そこで、純粋なCにするffmpeg構成ファイルを作成しました(プラットフォームに依存しませんが、理論的にのみ)

したがって、私の設定は単純です (0.6.1,0.6.3 テスト済み):

./configure  --disable-doc  --disable-ffplay --disable-ffprobe  --disable-ffserver    --disable-avdevice   --disable-avfilter   --disable-pthreads  --disable-everything --enable-muxer=flv --enable-encoder=flv --enable-encoder=h263  --disable-mmx  --disable-shared   --prefix=bin/  --disable-protocols --disable-network --disable-optimizations --disable-debug  --disable-asm --disable-stripping

これを Linux でコンパイルすると、合計サイズが 1 MB の 4 つのライブラリに解決されます。

しかし、ffmpeg をカスタム コンパイラでコンパイルする必要があります ( Adobe Alchemyと呼ばれるオープンソースの gcc アナログでは、C/c++ を Flash にコンパイルできます)。

標準の Make 中にほぼすべてのファイルでエラーが発生します。

Array @ARGV missing the @ in argument 1 of shift() at /home/rupert/Downloads/alchemy-ubuntu-v0.5a/achacks/gcc line 218.
cc1: error: unrecognized command line option "-Wtype-limits"
cc1: error: unrecognized command line option "-fno-signed-zeros"

錬金術を介してffmpeg(少なくともその最小部分)をコンパイルするにはどうすればよいですか?

更新 そのエラーを手動で修正すると (configure.mak で 2 つ、alchemy gcc で 1 つ)、次のような非常に面倒で長い出力が得られます。

> $ make -w install

make: Entering directory `/home/rupert/Downloads/ffmpeg-0.6.1'
AR  libavformat/libavformat.a
llvm-ld: error opening 'avformat/libavformat.l.bc' for writing!
llvm-ranlib: Archive file does not exist
INSTALL libavformat/libavformat.a
install: cannot stat `libavformat/libavformat.a': No such file or directory
llvm-ranlib: Archive file does not exist
AR  libavcodec/libavcodec.a
llvm-ld: error opening 'avcodec/libavcodec.l.bc' for writing!
llvm-ranlib: Archive file does not exist
INSTALL libavcodec/libavcodec.a
install: cannot stat `libavcodec/libavcodec.a': No such file or directory
llvm-ranlib: Archive file does not exist
AR  libswscale/libswscale.a
llvm-ld: error opening 'swscale/libswscale.l.bc' for writing!
llvm-ranlib: Archive file does not exist
INSTALL libswscale/libswscale.a
install: cannot stat `libswscale/libswscale.a': No such file or directory
llvm-ranlib: Archive file does not exist
AR  libavutil/libavutil.a
llvm-ld: error opening 'avutil/libavutil.l.bc' for writing!
llvm-ranlib: Archive file does not exist
INSTALL libavutil/libavutil.a
install: cannot stat `libavutil/libavutil.a': No such file or directory
llvm-ranlib: Archive file does not exist
INSTALL libavformat/avformat.h
INSTALL libavformat/avio.h
INSTALL libavformat/libavformat.pc
INSTALL libavcodec/avcodec.h
INSTALL libavcodec/avfft.h
INSTALL libavcodec/dxva2.h
INSTALL libavcodec/opt.h
INSTALL libavcodec/vaapi.h
INSTALL libavcodec/vdpau.h
INSTALL libavcodec/xvmc.h
INSTALL libavcodec/libavcodec.pc
INSTALL libswscale/swscale.h
INSTALL libswscale/libswscale.pc
INSTALL libavutil/adler32.h
INSTALL libavutil/attributes.h
INSTALL libavutil/avstring.h
INSTALL libavutil/avutil.h
INSTALL libavutil/base64.h
INSTALL libavutil/common.h
INSTALL libavutil/crc.h
INSTALL libavutil/error.h
INSTALL libavutil/fifo.h
INSTALL libavutil/intfloat_readwrite.h
INSTALL libavutil/log.h
INSTALL libavutil/lzo.h
INSTALL libavutil/mathematics.h
INSTALL libavutil/md5.h
INSTALL libavutil/mem.h
INSTALL libavutil/pixdesc.h
INSTALL libavutil/pixfmt.h
INSTALL libavutil/rational.h
INSTALL libavutil/sha1.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/libavutil.pc
LD  ffmpeg_g
WARNING: While resolving call to function 'main' arguments were dropped!
Cannot yet select: 0x8e707e8: i32 = ConstantPool < i64 6881500230622117888> 0
llc[0x86c7dec]
make: *** [ffmpeg_g] Error 6
make: Leaving directory `/home/rupert/Downloads/ffmpeg-0.6.1'
4

3 に答える 3

1

FlasCC(Alchemy 2) は ffmpeg を正常にコンパイルします - 試している人は、基本的に ffmpeg ソースをダウンロードする必要があります。ffmpeg ディレクトリに移動し、

PATH=/cygdrive/c/PATH_TO_FLASCC/sdk/usr/bin:$PATH ./configure --prefix=/cygdrive/c/PATH_TO_FLASCC/sdk/usr

いくつかの制限を付けてconfigureを実行すると、そこにあるすべてのコーデックまたはフィルターが含まれないようになります(時間がかかります)。私のユースケースからの追加の設定パラメータ:

--disable-ffserver --disable-everything --enable-filter=scale --enable-demuxer=flv --enable-muxer=ogg --enable-protocol=file --disable-network --disable-debug --disable-yasm --disable-asm --disable-stripping --enable-memalign-hack --disable-shared --enable-decoder=flashsv --enable-encoder=mpeg1video --enable-encoder=libtheora --enable-encoder=libvorbis --enable-libtheora --enable-libvorbis

重要なのは、--disable-everything必要なものだけを有効にすることです。

次に、(これらのコマンドの前に PATH を付けて) 実行./makeして./makeインストールすると、ffmpeg ライブラリが生成されてインストールされます。

テスト SWF を作成したところ、すべてが機能しているように見えました。25 のダミー mpeg フレームをエンコードする (変更された) サンプルを使用しました。少なくともエンコードの進行状況を追跡しており、フレームがエンコードされていることを確認しています。

ただし、SWCを使用する場合は問題があります。奇妙なエラーが発生します - 最初はコーデックが見つかりませんでした (コーデックの検索機能を使用したときに NULL を取得しました)。名前で指定すると、コーデック コンテキストを割り当てることができません (NULL も取得しました)。次に、純粋なFlexでコンパイルし、これを乗り越えましたが、コーデックを開くことができませんでした(基本的に、それらはすべてav_somethingライブラリ関数です)。なぜ SWC がこれらで動作しないのか、私には本当にわかりません。emit-swf ではすべて完全に正常に動作します。

誰かが SWC / SWF の違いについて教えてくれるかもしれません。

于 2013-03-19T13:33:13.653 に答える
0

新しい flash c コンパイラAdob​​e Flash ccで試してみてください。フラッシュでffmpegをコンパイルするのに役立つことを願っています.

于 2012-11-08T03:06:15.140 に答える
0

これについては、こちらの Adob​​e フォーラムで議論がありました。一部の人々はある程度の進歩を遂げたようですが、それはかなり関与しているようです.

于 2011-06-11T20:43:38.250 に答える