In windows, cygwin/mingw compiles ffmpeg library and mingwffmpeg

Source: Internet
Author: User

In windows, cygwin/mingw compiles ffmpeg library and mingwffmpeg

Ffmpeg compilation in Linux is quite simple. You only need to configure and make it again.

If you need a dynamic library, add the -- enable-shared option after configure.


However, in windows, it is not very easy. I searched the internet for various methods compiled in windows. Most of them are the same, and the steps are cumbersome. Some of them need to rely on many libraries. I just want to compile several libraries in ffmpeg as easily as in Linux. Is there a simple method?


Download cygwin,: https://cygwin.com/

What I download is setup-x86_64.exe.

Then install, installation steps can refer to this, write more detailed: http://jingyan.baidu.com/article/6b97984d83dfe51ca2b0bf0e.html

Remember to install the gcc and make packages. Otherwise, there may be no gcc or make commands;

If you really don't know how to install the make command, after cygwin is installed, install the make tool manually as follows:

Download make-3.8.1.tar.bz2: http://gnu-make.soft32.com/


Open cygwin, similar to a Linux terminal, cd/cygdriver, you can see the various disks on your computer, go to the places where you download make-3.8.1.tar.bz2, unzip and install make

Tar xvf make-3.8.1.tar.bz2

Cd make-3.8.1

./Configure

./Build. sh

Make.exe is generated.

Cp make.exe/bin/

Now you can use the make command.


Everything is ready and we will go back to compiling ffmpeg. In cygwin, the compilation steps are almost the same as in linux.

I here to compile the ffmpeg-2.1.8 as an example, extract;

./Configure -- enable-shared -- disable-static

Here I will prompt:


So I installed cygwin again from the beginning, checked the yasm package, and then re-performed this step.

It is said that the library in windows must contain a parameter -- enable-memalign-hack.

$./Configure -- enable-shared -- disable-static -- enable-memalign-hack

Then make

You can find the library file you need in the ffmpeg-2.1.8/directory.





Another method: MingGW


MinGW: http://download.csdn.net/source/2988856

Mingw32_gcc441_20100504 this version of mingw with yasm sdl and other related libraries, no need to configure.

./Configure -- enable-shared -- disable-static -- enable-memalign-hack

Make

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.