FFmpegはフリーなマルチメディアライブラリ群です。
http://ffmpeg.org/ 公式サイト
2009年3月10日に0.5というバージョンがリリースされたのでWindowsでコンパイルしてみました。
次のサイトは必須です。
http://ffmpeg.arrozcru.org/wiki/index.php?title=Main_Page FFmpeg on Windows
最初の一言は重要なメッセージです。
------------------------------------------------------------------------------------
FFMPEG DOES NOT BUILD UNDER MSVC++, AND WILL NOT, EVER, BUILD UNDER MSVC++.
MSVC++ still does not adhere to the C99 standard, and FFmpeg relies on it, because its developers chose to rely on it.
That means the entire build process of FFmpeg must be done with MSys+MinGW.
The libraries created by FFmpeg with MinGW are usable just like any other library (either static or shared), with a C99 compiler. This again means that MSVC++ is not supported. You can, however, modify your build system to behave more closely like a C99 system, and then you will be able to use FFmpeg's libraries with MSVC++.
------------------------------------------------------------------------------------
つまり、FFmpegはMSVCのプロジェクトでコンパイルするのではなくて、MSys+MinGWのgccでコンパイルしないといけません。
①
MSys+MinGWはFFmpeg on Windowsに書いてある通りに用意します。
makeのバージョンは要注意です。
>make must be MSYS make version => 3.81
>Preferably version 3.81-2.
>Also do not get MinGW make. Get MSYS make.
②
gccは4.2.1を使いました。
③
msys-1.0.dllのバージョンにも要注意です。
私は、.configureする際に、次のメッセージに遭遇して、どうしようもなかったのですが、MSYS-1.0.11-20090120-dll.tar.gz におきかえると動作するようになりました。
>open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
③
MSysのコマンドプロンプトより
$ ./configure --target-os=mingw32 --cc=gcc-sjlj --disable-mmx --disable-debug --disable-static --enable-shared --enable-memalign-hack --disable-ffmpeg --disable-ffserver --disable-ffplay --extra-cflags=-fomit-frame-pointer
少し時間がかかりますが、エラーがなければOKです。
④
$ make
エラーがなければOKです。