The following packages are required for the development of all WebM projects:
- Git version 1.5.4 or newer
VP8 Codec SDK (libvpx)
The VP8 SDK supports a large variety of targets and build
environments. These are generally identified by a isa-os-compiler
triplet. This is the instruction set architecture, the operating
system, and compiler used to compile for the target. A full list of
these targets can be seen by running ./configure --help in the root
of your source tree. (Windows users will need to set up MSYS
before being able to run this command.) Certain targets require special
setup be completed. Please see if one of the sections on this page
applies to you before trying to build the codec library.
Building For x86 (32- and 64-bit)
The Yasm assembler is required to build optimized libraries for x86 platforms. Version 0.8.0 or newer is required. Version 1.0.0 is known to have bugs affecting libvpx, but subsequent versions (1.1.0) should work.
For Unix-like platforms, binary distributions are likely to be included in your package manager, or you can easily build from source. Windows users are advised to download the pre-built binary.
Building For Windows
There are two methods of building for Windows.
Using Visual Studio
Visual Studio project files are available in each release
snapshot, but are not
present in code checked out from the Git repository. To build a
release snapshot on Windows, you only need to install Yasm, as
described above. The project files are located in the build/
subdirectory.
These files are generated using our Makefile build system, so if you wish to work on the latest code from Git on Windows, you'll have to install a Unix-workalike environment like MSYS or Cygwin. Instructions for installing MSYS can be found below. When creating the Visual Studio projects from source, you'll have to do some additional setup:
Decide on "in-tree" or "out-of-tree" build method.
The "build root" is not necessarily the same directory as the "source root" with this build system. This allows you to keep your source tree pristine and not clutter it with object files, temporary files, output runs, etc. You can wipe out your whole build root at any time without worrying too much about it. We first must choose the build root we want to use:
-
In-tree build root means that your build root is a subdirectory of the source root. The advantage of this approach is that the Git Extensions plug-in for Visual Studio can be used. Create the following directory (use vs7 for VS 2003): libvpx/build/x86-win32-vs8 Note that git has been configured to ignore this directory -- we don't want the generated files to be checked in.
-
Out-of-tree build root means that the build root is not a child of the source root. This is the most common configuration used. Typically you create a build directory in the same location that the libvpx tree is checked out.
Configure The Build Root
The first thing that must be done to a new build root is to configure it for the configuration of the SDK that you want to build.
Start a Cygwin or MSYS shell, and navigate to your build directory.
Here we'll assume that you want to do an out-of-tree build, you've
cloned libvpx to /cygdrive/c/libvpx and you've created the build
directory /cygdrive/c/build.
$ cd /cygdrive/c/build
$ ../libvpx/configure --target=x86-win32-vs8 --enable-static-msvcrt
-
--enable-static-msvcrtto switch all vs8 projects to use static for Runtime library option, i.e./MTand/MTd, instead of/MDand/MDdby default. -
vs9is for Visual Studio 2008,vs8is for Visual Studio 2005, andvs7is for Visual Studio .NET 2003 -
../libvpx/configure --helphas interesting output.
Build The VS Projects
If configuration succeeded (it should) you can now execute the scripts that create the visual studio solutions and projects:
$ make
That's It!
You typically will not need to rerun the configuration scripts, but it
doesn't hurt to do so. You will need to rerun them if you pull in
changes to any file named configure or .mk, or if any files are
added, removed, or renamed (even by others). You should be aware that
your changes will be overwritten any time you modify the project
settings through the properties page. The Makefiles and associated
scripts are the authoritative location for all build related
information. This means if you add, remove, or rename a file, you
must do so in the Makefiles first, and then regenerate the project
files from them.
Using MSYS
If you're already familiar with MSYS, there's likely nothing here that will surprise you. If this is your first time installing MSYS, read on ...
Download depot_tools
The depot_tools are used to download the tools and patches needed to
build the VP8 library on Windows. They facilitate a one-step
dependencies download, and allow you to avoid the hassle of
downloading individual MSYS archives.
- Download
depot_tools
and add the
depot_toolsdirectory to yourPATH.
Get the Chromium MinGW dependencies
Now we use the depot_tools installation to grab MSYS, and a subset of
MSYS tools needed for building VP8.
-
Create a very simple .gclient in an empty directory, and insert the following text:
solutions = [ { "name" : "mingw", "url" : "http://src.chromium.org/svn/trunk/deps/third_party/mingw" } ]- Tip: A text editor like Notepad++ will be useful here since
Windows doesn't want to allow you to name a file
.gclient. Note that any text editor will do, provided that it will allow you to name a file.gclient-- Notepad++ is not required.
- Tip: A text editor like Notepad++ will be useful here since
Windows doesn't want to allow you to name a file
-
Open a
cmd.exewindow,cdto the directory where you saved your.gclient, and execute the command:D:\src\chromium_mingw_deps>gclient syncIt will return output similar to the following.
__ running 'svn checkout http://src.chromium.org/svn/trunk/deps/third_party/mingw D:\src\chromium_mingw_deps\mingw ' in 'D:\src\chromium_mingw_deps' A D:\srcchromium_mingw_deps\mingw\README.chromium A D:\src\chromium_mingw_deps\mingw\mingwrt-3.15.2-mingw32-dev.tar.gz A D:\src\chromium_mingw_deps\mingw\pthreads-w32.patch.txt A D:\src\chromium_mingw_deps\mingw\msysCORE-1.0.11-20080826-src.tar.gz A D:\src\chromium_mingw_deps\mingw\coreutils-5.97-MSYS-1.0.11-snapshot-src.tar.bz2 A D:\src\chromium_mingw_deps\mingw\gcc-4.2.1-2-src.tar.gz A D:\src\chromium_mingw_deps\mingw\w32api-3.13-mingw32-src.tar.gz A D:\src\chromium_mingw_deps\mingw\gcc-core-4.2.1-sjlj-2.tar.gz A D:\src\chromium_mingw_deps\mingw\binutils-2.17.50-20060824-1.tar.gz A D:\src\chromium_mingw_deps\mingw\pthreads-w32-2-8-0-release.tar.gz A D:\src\chromium_mingw_deps\mingw\MSYS-1.0.11.exe A D:\src\chromium_mingw_deps\mingw\mingwrt-3.15.2-mingw32-src.tar.gz A D:\src\chromium_mingw_deps\mingw\binutils-2.17.50-20060824-1-src.tar.gz A D:\src\chromium_mingw_deps\mingw\w32api-3.13-mingw32-dev.tar.gz A D:\src\chromium_mingw_deps\mingw\coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2- Tip: If subversion is not installed,
depot_toolswill install it for you! No need to stop here to install it yourself.
- Tip: If subversion is not installed,



