In Windows, FFMPEG can be compiled using cygwin or msys + mingw. I personally prefer msys + mingw, because it is possible to build a Unix-like operating system in windows, configuration is easier than cygwin, so this is to describe how to build the msys + mingw environment.
Build an FFMPEG compiling environment in windows on the InternetArticleA lot, the most detailed possible is this article: http://ffmpeg.arrozcru.org/wiki/index.php? Title = main_page. However, due to version issues, the above description is not acceptable.
-
- Go to http://sourceforge.net/projects/mingw/files/download the latest version of mingwinstallationProgramMy name is mingw-5.1.6.exe.
- To begin
-
- To http://prdownloads.sourceforge.net/mingw/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2? Downloaddownload coreutils-5.97-msys-1.0.11-snapshot.tar.bz2
- Run mingw-5.1.6.exe. Install g ++ and make and specify the installation directory to C: \ msys \ mingw. This program will automatically download and install the mingw system, note that the GCC version is 3.4.5.
-
- Run msys-1.0.11.exe to install msys to the C: \ msys directory.
-
- Decompress and copy coreutils-5.97-msys-1.0.11-snapshot.tar.bz2 to the C: \ msys directory, select the merge directory, and retain two copies when a file conflict occurs.
- At this time, the basic system should have been built, and a test. c Hello World program should be compiled and run properly.
- Install tool software:
-
- Wget.exe: copy to the C: \ msys \ bin directory.
-
- To begin
- To begin
-
- Install msysgit to the C: \ Software Directory
-
- Download the x264 program:/C/software/git/bin/git clone git: // git.videolan.org/x264.git
- Compile the x264 program:./configure -- prefix =/home/Yantao/CIC/static, and then run make and make install
-
- Download AMR support: http://sourceforge.net/projects/opencore-amr/files/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz/download
-
- Compile:./configue -- prefix =/home/Yantao/CIC/static -- enable-static, and then make and make install
- Download SDL: http://www.libsdl.org/download-1.2.php
-
- Compile:./configure -- prefix =/home/Yantao/CIC/static -- enable-static -- disable-shared
- This proves that the current GCC 3.4.5 environment configuration is basically correct, but FFMPEG must be compiled above GCC 4 to solve the DLL file connection and abnormal exit in VC and other bugs, therefore, you need to upgrade GCC to the latest system to SourceForge.
-
- Upgrade msys Bash: from the slave
- Upgrade msys coreutil: From slave
-
- Upgrade mingw binutils
-
- Upgrade mingw runtime Dev
- Update mingw runtime DLL
-
- Upgrade mingw Win32 API
-
- Upgrade GCC: Download all GCC-related download items, especially DLL items, and decompress and copy them to the C: \ msys \ mingw directory.
- Download libgmp-5.0.1-1-mingw32-dll-10.tar.tar from the mingw proposeddirectory of http://sourceforge.net/projects/mingw/files/and install
-
- Download libmpc-0.8.1-1-mingw32-dll-2.tar from the mingw proposeddirectory of http://sourceforge.net/projects/mingw/files/and install
-
- Download libmp fr-2.4.1-1-mingw32-dll-1.tar from the mingw proposeddirectory of http://sourceforge.net/projects/mingw/files/and install
- Download pthreadssupports libpthread-2.8.0-3-mingw32-dll-2.tar.tar
-
- To verify the correctness of the upgrade, first determine that test. C can be correctly compiled, and then re-compile x264, opencore-Amr, SDL
-
- Copy the compiled External library to the C: \ msys \ mingw \ include and c: \ msys \ mingw \ Lib directories, and modify the directories in each pkconfig file, copy the SDL-config in the build4_5_0/bin directory to the mingw/bin directory, and change the path to/mingw.
- slave
- Compile FFMPEG: first create the FFMPEG directory, and then use tortoisesvn to download the latest from SVN: // SVN. mplayerhq. hu/FFMPEG/trunk.Code, Run. /configure -- prefix =/home/Yantao/CIC/static -- enable-static -- disable-shared -- enable-GPL -- enable-libx264 -- enable-pthreads -- enable-nonfree -- enable-opencore- amrnb -- enable-opencore-amrwb -- enable-version3 -- enable-memalign-hack
-
- Modify row 1699 of libavformat/RTSP. C, change etime to etimedout, modify mingw/include/errno. h file, and add # define etimedout 60 Definition
- Add typedef long pid_t before row 152 of mingw/include/sched. h;
-
- Run make and make install
-
- Test ffplay.exe using a 3gpfile with amr-nb.
-
- Test video capture