Reprint: http://blog.csdn.net/finewind/article/details/38854517
If it's just for use, there's a ready-made SDK on the web. But I want to go deep into the FFmpeg code, not familiar with the Linux development environment, so need to compile a windos platform can use vs single-step debugging FFmpeg, most of the existing online data is based on the very old version, constantly groping, and finally succeeded.
VS2013 is chosen because VS2013 supports most C99 features, does not require code changes, and does not require the use of C99 to C89 tools.
MinGW and yasm are not around, because MinGW is needed to generate config.h, and FFmpeg's assembler syntax is not the same as VS, so yasm is needed.
Specific steps:
1. Download FFmpeg source code,: http://ffmpeg.zeranoe.com/builds/;
2. Download MinGW installer,: http://www.mingw.org/; Install after download is complete, click Run after installation, mark the following items:
Then click Apply Changes under the installation menu;
3. Download yasm,: http://yasm.tortall.net/; Rename to Yasm.exe after download, copy to C:/mingw/msys/1.0/bin directory;
4. Configure C:/mingw/msys/1.0/msys.bat to add a line to the front of the file (after @echo off) as follows:
Call "D:\Program Files (x86) \microsoft Visual Studio 12.0\vc\bin\vcvars32.bat" (Modify the path according to the actual installation path);
5. Rename C:/mingw/msys/1.0/bin/link.exe to Link_renamed.exe (select path according to actual installation), This step is to prevent the Link.exe and VC link.exe conflict, after the completion of the compilation can be modified back;
6. Configure the compilation, double-click Msys.bat, go to ffmpeg source code root directory, can run./configure--help View the compile configuration options, I use the options:
Static library:./configure--enable-static--prefix=./vs2013_build--enable-debug--toolchain=msvc
Dynamic Library:./configure--enable-shared--prefix=./vs2013_build--enable-debug--toolchain=msvc
wait for configuration to complete the return;
7. Enter make to compile;
8. Enter the make install installation.
complete, the generated header files and libraries are already in the FFmpeg source code under the Vs2013_build directory, using this library, you can step into the FFmpeg function.
References:
http://ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows
http://www.cnblogs.com/xylc/p/3683203.html
Compiling ffmpeg with VS2013