• About
    • About WebM
    • FAQ
    • Discuss
    • Supporters
    • VP9 Codec
  • Developer
    • Overview & Code Repos
    • Contribute
    • Submitting Patches
    • Code Reviews
    • Workflow
    • Conventions
    • Continuous Integration
    • Bug Reporting
    • Build Prerequisites
    • Repository Layout
    • Releases
    • Roadmap
    • Hardware
  • Docs
    • Draft VP9 Bitstream Format
    • VP9 Levels and Decoder Testing
    • RFC 6386: VP8 Data Format
    • WebM Container Format
    • WebM Encryption
    • VP8 RTP Proposal (Draft)
    • WebM Codec SDK
    • Encoder Examples
    • Wiki
  • Tools
  • Hardware
  • Home >
  • Code >
  • Build Prerequisites

Build Prerequisites

Show Contents

  • VP8 Codec SDK (libvpx)
  • Building For x86 (32- and 64-bit)
  • Building For Windows
    • Using Visual Studio
      • Decide on “in-tree” or “out-of-tree” build method.
      • Configure The Build Root
      • Build The VS Projects
      • That’s It!
    • Using MSYS
      • Download depot_tools
      • Get the Chromium MinGW dependencies

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.

Important When installing Yasm, disregard instructions for Visual Studio integration and use the “general use” executables instead (yasm-x.x.x-win32.exe or yasm-x.x.x-win64.exe).

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-msvcrt to switch all vs8 projects to use static for Runtime library option, i.e. /MT and /MTd, instead of /MD and /MDd by default.

  • vs9 is for Visual Studio 2008, vs8 is for Visual Studio 2005, and vs7 is for Visual Studio .NET 2003

  • ../libvpx/configure --help has 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_tools directory to your PATH.
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.

  1. 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.
  2. Open a cmd.exe window, cd to the directory where you saved your .gclient, and execute the command:

    D:\src\chromium_mingw_deps>gclient sync

    It 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:\src\chromium_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_tools will install it for you! No need to stop here to install it yourself.
About
  • About WebM
  • FAQ
  • Discuss
  • Supporters
More
  • Tools
  • Hardware
  • Licenses
  • Downloads
  • VP8 Cross-License
Developer
  • Overview
  • Contribute
  • Submitting Patches
  • Code Reviews
  • Workflow
  • Conventions
  • Bug Reporting
  • Build Prerequisites
  • Repository Layout
  • Releases
  • Roadmap
Docs
  • WebM Codec SDK
  • WebM Container Format
  • WebM Encryption
  • VP8 RTP Proposal (Draft)
  • RFC 6386: VP8 Data Format
  • Encoder Examples
  • Wiki
Copyright 2010 - 2016
The WebM Project
HTML5 Powered with CSS3 / Styling, and Semantics
webmaster@webmproject.org