如何编译 WebM vp8
google 编译 webM
The WebM project is dedicated to developing a high-quality, open video format for the web that is freely available to everyone.
google放出来了这个不错的东西,现在就来编译一下,其实很简单,因为它的readme说的很详细了。
我是用vs2005编译的。下面简单说一下过程。
下载的源代码是:http://code.google.com/p/webm/downloads/list 中的vpx-vp8-debug-src-x86-win32mt-vs8-v0.9.0.zip
1. Prerequisites
* All x86 targets require the Yasm[1] assembler be installed.
* All Windows builds require that Cygwin[2] be installed.
* Building the documentation requires PHP[3] and Doxygen[4]. If you do not
have these packages, you must pass --disable-install-docs to the
configure script.
[1]: http://www.tortall.net/projects/yasm
[2]: http://www.cygwin.com/
[3]: http://php.net/
[4]: http://www.doxygen.org/
2. Out-of-tree builds
Out of tree builds are a supported method of building the application. For
an out of tree build, the source tree is kept separate from the object
files produced during compilation. For instance:
$ mkdir build
$ cd build
$ ../libvpx/configure <options>
$ make
因为我不打算编译文档,所以就只做了第1步的[1]、[2]。
我直接到http://www.tortall.net/projects/yasm下载了yasm,名称是yasm-1.0.1-win32.exe,我后来修改为yasm.exe,然后把这个放到C:\Program Files\Microsoft Visual Studio 8\VC\bin中。
另外还需要yasm.rules,这个在yasm的源代码中有,复制到C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults目录下。
[2]的话,我早就装了cygwin。就不用下载了,如果这个没有装的话,可以去下载的。两种方法,一种是下载别人做好的local文件,另外一种就是自己网上安装,网上安装要看你的网速了,需要一个等待的过程。
[1]]、[2]都好了之后就可以编译了。
把代码解压到c盘,文件名为vp8
$ cd /cygdrive/c/
$ cd vp8/
$ ls
CHANGELOG README bin build docs include lib libvpx md5sums.txt src
$ cd build/
$ ../src/configure --target=x86-win32-vs8 --enable-static-msvcrt --disable-install-docs
--disable-install-docs
因为我不安装文档了,所以添加了这个参数。
稍等片刻就可以了。
显示如下:
Configuring selected codecs
enabling vp8_encoder
enabling vp8_decoder
Configuring for target 'x86-win32-vs8'
enabling x86
enabling runtime_cpu_detect
enabling mmx
enabling sse
enabling sse2
enabling sse3
enabling ssse3
disabling ccache
enabling postproc
Bypassing toolchain for environment detection.
Creating makefiles for x86-win32-vs8 libs
Creating makefiles for x86-win32-vs8 examples
Creating makefiles for x86-win32-vs8 solution
$ make
[CREATE] vpx_config.asm
[CREATE] vpx.vcproj
../src/build/make/gen_msvs_proj.sh\
--lib\
--target=x86-win32-vs8\
--static-crt \
--name=vpx\
--proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74\
--module-def=vpx.def\
--ver=8\
……………………
即可生成vpx.sln等相关文件。
再用你的vs2005打开编译吧。
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步