随笔 - 3  文章 - 21  评论 - 3  阅读 - 67439

如何编译 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

详细的是:http://code.google.com/p/webm/downloads/detail?name=vpx-vp8-debug-src-x86-win32mt-vs8-v0.9.0.zip&can=2&q=

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打开编译吧。

posted on   Hevcer  阅读(2736)  评论(1编辑  收藏  举报
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示