您的位置:首页 > 其它

MinGW编译ffmpeg [ZZ]

2012-06-04 15:16 387 查看
2009年09月17日 星期四 19:46
http://hi.baidu.com/gongjun0371/blog/item/e465d3024f2610e509fa930e.html

MinGW编译ffmpeg

2009-08-13 15:47
1.下载:

tdm-mingw-1.905.0-4.4.0-2.exe

coreutils-5.97-MSYS-1.0.11-snapshot.tar

MSYS-1.0.11.exe

ffmpeg-0.5.tar.bz2

2.安装

2.1 安装tdm-mingw-1.905.0-4.4.0-2.exe(选项TDM-GCC Recommended,C/C++)到C:\MinGW

2.2 安装MSYS-1.0.11.exe到 C:\msys\1.0,安装过程中:

出现提示:

This is a post install process that will try to normalize between

your MinGW install if any as well as your previous MSYS installs

if any. I don't have any traps as aborts will not hurt anything.

Do you wish to continue with the post install? [yn ]

输入Y按回车

Do you have MinGW installed? [yn ]

输入Y按回车

Please answer the following in the form of c:/foo/bar.

Where is your MinGW installation?

输入C:/MinGW按回车

Creating /etc/fstab with mingw mount bindings.

Normalizing your MSYS environment.

You have script /bin/awk

You have script /bin/cmd

You have script /bin/echo

You have script /bin/egrep

You have script /bin/fgrep

You have script /bin/printf

You have script /bin/pwd

Oh joy, you do not have c:/mingw/bin/make.exe. Keep it that way.

C:\msys\postinstall>pause

Press any key to continue . . .

2.4 解压coreutils-5.97-MSYS-1.0.11-snapshot.tar. 拷贝coreutils-5.97\bin\pr.exe到 C:\msys\1.0\bin\.

2.5 解压ffmpeg-0.5.tar.bz2 到 C:

3. 编译

3.1 $ cd /C/ffmpeg-0.5 进入ffmpeg工程目录.

3.2 $ ./configure --enable-shared --enable-memalign-hack --disable-debug --enable-small

3.3 $ make

ffmpeg的编译指令通常为:

1、配置:

configuration: --enable-gpl --enable-shared --enable-mp3lame --enable-amr_nb --enable-amr_wb --enable-amr_if2 --enable-libogg --enable-vorbis --enable-xvid --enable-a52 --enable-a52bin --enable-faadbin --enable-dts --enable-pp --enable-faad --enable-faac --enable-x264
--enable-pthreads --disable-ffserver --disable-ffplay --prefix=/usr --extra-cflags=-I/local/include --extra-ldflags=-L/local/lib

(注意,其中有很多选项是可选择的,如:--enable-amr_wb,是编译对3GP支持所需要的库,如果你不需要对3GP的支持,或是没有下载amr_wb的库,就不要加该选项了)

2、编译:

make

3、安装:

make install (注意,安装通常是指将编译的库拷贝到/local/lib目录下,将所需要的头文件拷贝到/local/include目录下,如果 你是通过MSYS+MinGW编译的话,假如你的MSYS是安装在d:\msys\1.0目录下,则make install之后就将生成的库文件拷贝到了d:\msys\1.0\local\lib目录下了)

其它库(如x264、xvid等)的编译指令通常为:

1、配置:

configure --prefix=/usr --enable-shared

2、编译:

make

3、安装:

make install

参考链接

http://ffmpeg.arrozcru.org/wiki/index.php?title=Main_Page

http://ffmpeg.org/index.html

4. 编译ffdshow版ffmpeg(版本:ffdshow-tryout_beta6)

4.1 下载

gcc-4.3.3-tdm-1-core(使用GCC-4.3.3编译)

yasm-0.7.2-win32.exe

4.2 配置:

1)解压gcc-4.3.3-tdm-1-core到C:\MinGW

2)将yasm-0.7.2-win32.exe改名为yasm.exe,拷贝到C:\MinGW\bin

3)不需2.4步骤

4.3 编译

4.3.1 $ cd /E/beta6/src/ffmpeg // 进入ffmpeg工程目录.

4.3.2 $ make CC=gcc

相关链接
http://www.tdragon.net/recentgcc/ http://ffdshow-tryout.sourceforge.net/wiki/devel:building
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: