ffmpeg Windows下编译遇到的问题

编译工具:MinGW+msys+vs2012

编译就三个步骤:

1.  配置  (这里可以配置一些第三方依赖库)   ./configure --enable-yasm --enable-shared --disable-static --enable-memalign-hack --enable-libfreetype --enable-avfilter --enable-libx264 --enable-gpl --enable-avresample --enable-error-resilience --prefix=c:/ffmpeg-dll

2.make

3.make install


出现的问题:

gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.


If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

1. 配置./configure的时候 出现gcc无法找到, 我是连接上了我vs2012的,肯定是有gcc编译器的,我第一时间想到的是防火墙,后来看了下电脑管家和杀毒软件一直开着,关了就好了,还不行的话卸载了,因为有些软件是很霸道的。

2. 集成yasm 和 x264的时候遇到问题,这需要下载源码自行编译和安装

3. 编译出来的dll,我在调用添加水印那块的时候,发现这个一直返回-22,网上说的是参数错误,我的情况不是,而是因为我编译配置的时候没加字体引擎

//将一串通过字符串描述的Graph添加到FilterGraph中。
if ((ret = avfilter_graph_parse_ptr(filter_graph, myPlayer->filter_descr,
&inputs, &outputs, NULL)) < 0)
{
getchar();
return -1;
}

字体引擎(--enable-libfreetype),这个东西可以去下载一个,当然我的是自己编译出来的,然后放在解码dll同一目录

猜你喜欢

转载自blog.csdn.net/hpymiss/article/details/78834953