2008年12月8日星期一

Ffmpeg构建和编译 续

在ffmpeg构建和编译的过程中我也遇到了一些问题,单凭网上的帮助还是不够的,我把我的解决方案记下来,希望能帮助后来人。
当完成了我上一篇文章的所有步骤后,在MSYS中输入./configure --enable-memalign-hack,若遇到这个错误:“./configure: line 221: pr: command not foundss”
The standard MSys install doesn't come with pr. You need to get it from the coreutils package. 下载coreutils-5.97-MSYS-1.0.11-snapshot.tar并解压,将bin里的文档拷贝到C:\msys\1.0\bin里,这样这个问题就可以解决。
若我们的MSYS的make.exe 的版本例如是make3.79.exe,有在./configure后进行make可能会遇到不能运行的问题,解决这个问题的方法是升级MSYS的make.exe的版本。我这里是升级到make-3.81-MSYS-1.0.11-2版本。
如果输入./configure --enable-memalign-hack后输入make,会生成.a文档,也就是“静态库”,例如: avformat.a \ avcodec.a \ avutil.a
以下转自:http://donaldtc.blogspot.com/2007/05/ffmpeg_22.html
如果希望使用FFmpeg包含的libavcodec库开发多媒体文件处理程序,还需要编译libavcodec的dll动态链接库,编译过程和上述过程稍有差别,如下所述: 首先切换到FFmpeg的源代码目录,在开始编译前先使用"make distclean"清理上一次留下的中间文件,然后向configure脚本多传递两个参数./configure --enable-shared --disable-static --enable-memalign-hack 最后执行"make"命令就可以了。
我因为需要swscale-0.dll,所以我的configure为:
./configure --enable-shared --enable-gpl --enable-swscale --enable-memalign-hack
这个已经可以满足一般的使用。
./configure --help 后你也可以根据自己的需要调整./configure
如果你需要Building FFplay,可以参考以下说明:http://ffmpeg.arrozcru.org/wiki/index.php?title=Building_FFplay

没有评论: