Main Page

From FFmpeg on Windows

Jump to: navigation, search

FFmpeg on Windows

The purpose of this wiki is to provide help on everything that involves building FFmpeg for Windows, and using FFmpeg's libraries in your projects. It originated as a step-by-step guide for building under a MSys+MinGW system, but the focus has now shifted to cross-compiling, since that is faster and easier.

Before you start, please note the following:

FFMPEG DOES NOT BUILD UNDER MSVC++, AND WILL NOT, EVER, BUILD UNDER MSVC++.
MSVC++ still does not adhere to the C99 standard, and FFmpeg relies on it, because its developers chose to rely on it.
This means the entire build process of FFmpeg must be done with MinGW.
The libraries created by FFmpeg with MinGW are usable just like any other library (either static or shared), with a C99 compiler. This again means that MSVC++ is not supported. You can, however, modify your build system to behave more closely like a C99 system, and then you will be able to use FFmpeg's libraries with MSVC++.

If you have any problems with this guide, please ask in the FFmpeg Windows Help Forum before asking in the ffmpeg-user mailinglist.


Introduction

If you kind of know your way around compiling general open-source programs, you might want to try reading FFmpeg General Documentation under Windows. It's much smaller and works with just a few tweaks.

The most usual way of compiling things using MinGW in Windows is through the use of MSYS. Unfortunately, it is a pain to use MSYS since it lacks a lot of functionality and many packages must be installed manually. Therefore, using MSYS is unsupported in this wiki. If you really insist in using MSYS, you may try following this site and get build instructions from the apt repository. It will require hacking many Makefiles because of issues inherent to MSYS.

This wiki is primarily focused on cross-compiling FFmpeg through Ubuntu Linux. If you do not want to have to reboot to Linux every time you need to compile FFmpeg, I suggest you install Ubuntu under VirtualBox. In fact, this is the recommended setup.

A repository for 64-bit Ubuntu 9.04 is ready with all the build tools and libraries necessary to build FFmpeg. I have made it available at http://apt.arrozcru.org and it is the exact same repository I use to make the autobuilds at http://ffmpeg.arrozcru.org/autobuilds .

  • If you are using 64-bit Ubuntu 9.04 and just want to use the pre-built packages, read here.
  • If you are using another Ubuntu version (for example 32-bit Ubuntu) or for some other reason just want to re-compile all packages, read here.
  • If you are using another Linux distribution, or even Cygwin, or just want to learn a bit more about the build instructions and the patches needed for each package, read here.


The actual compilation

Now that you finally have a cross-compilation environment ready, follow on to cross-compiling.

Personal tools