1. Get FFmpeg Source Code

It’s recommended to download the release source package of FFmpeg from the official site.

2. Compiling FFmpeg

FFmpeg is developed under Linux, but it can be compiled under most Operating Systems.

For Windows, FFmpeg can be compiled with MSYS and MinGW. If you have setup MSYS and MinGW systems correctly, you can compile FFmpeg under its folder.

MinGW MSYS’s work folder is under the installation path (You can also reconfigure MSYS parameters), on my computer is

C:\MinGW\msys\1.0

Just extract the FFmpeg source code to the home folder under MSYS root path.

First, Cleanup former build results.

make distclean

Second, Setup build parameters.

./configure –enable-shared –disable-yasm –enable-memalign-hack

If there is no error, and config.mak & config.h were generated, you can build the library, and then, if you want, you can install them into the MSYS environment.

make make install

The compile operation will take a long time.

After installation, you can find the libs and dlls under local folder in MSYS folder, which is

C:\MinGW\msys\1.0\local

on my computer. In MSYS, you can jump into the installation folder by following path:

/usr/local/include /usr/local/lib

This is the same as on Linux machine.

3. Write FFmpeg test code

There are some example code under /doc/examples, we can use them for test.