Compiling ffmpeg with VS2013

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.