Compile FFMPEG in mingw

Source: Internet
Author: User

The latest FFMPEG library and execution file must be compiled.Code. In order to be able to compile and translate into Windows native for executionProgram(This execution program needs to be called in. Net). Here we use mingw.

1. Install mingw

Download mingw and double-click Install. The current version is 20110316.

 

Add Windows environment variables:

 

BTW: For friends who use cygwin, in order not to affect the Home Directory of cygwin, you can add the following code at the beginning of the [c: \ mingw \ msys \ 1.0 \ msys. Bat] file.

Set "home = c: \ mingw \ bin"

To generate the native lib under Win32 for use, add the following code at the beginning of the file.

Call "C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ Vc \ bin \ vcvars32.bat"

Reference: http://www.ffmpeg.org/general.html#SEC24

Http://www.cnblogs.com/bruceleeliya/archive/2010/11/16/1878424.html

2. Download FFMPEG Source code

On the FFMPEG official website, download the FFMPEG source code package. The version I downloaded is, which is now available for me. If you need to update the code, you can use:

$ Git clone git: // git.videolan.org/ffmpeg.git FFMPEG

Download the source code of the latest version.

 

3. Compile FFMPEG

3.1 understand compilation options

Put the FFMPEG source code under the/var directory. The directory is random. Here is just an example. Then./configure-help> config-options.txt

After that, you can use config-options.txt to understand available options.

 

3.2 compile FFMPEG Based on Options

$./Configure -- enable-memalign-hack -- enable-static -- enable-shared -- enable-avfilter-lavf

$ Make

$ Make install

 

After compilation, find the EXE and Lib files in the default path/local/bin. the header file is located in/local/include.

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.