Download the new version of FFMPEG 0.6.1: http://www.ffmpeg.org/releases/ffmpeg-0.6.1.tar.bz2 to the official website
When I downloaded mingw, it was completely installed online. msys will be installed in the mingw directory.
I have mingw installed in C:/mingw, and msys is in C:/mingw/msys
Compile FFMPEG also requires SDL address: http://www.libsdl.org/release/SDL-1.2.14.tar.gz
Decompress the package;
Copy all files under lib to C:/mingw/LIB;
Copy all files under include to C:/mingw/include;
Copy the i386-mingw32msvc-sdl-config under the bin to C:/mingw/bin and rename it SDL-config;
Copy SDL. dll in BIN to C:/mingw/bin.
Find the source code package of SDL and copy the include file to C:/mingw/include.
(Because the FFMPEG example depends on its header file)
Decompress ffmpeg-0.6.1.tar.bz2, copy to the disk, C:/ffmpeg-0.6.1 (this folder contains files such as configure)
Open the file fstab in msys/1.0/etc and add a line: C:/ffmpeg-0.6.1
Run the msys. BAT file and start the command line interface:
Switch to cd c:/ffmpeg-0.6.1
Run the following command:
./Configure -- enable-memalign-hack
The Configure: Line ***: Pr: Command not found problem may occur.
In this way, we also need to download coreutils: http://ftp.gnu.org/gnu/coreutils/
Install coreutils, open its installation directory, and copy the pr.exe, libintl3.dll, and libiconv2.dll files in its binfolder to mingw/bin. OK
Use msys. BAT to restart the command line interface,
Input:
./Configure -- enable-memalign-hack
Passed,
After,
Make
After
Make install
Finished.
The obtained file is in the msys/1.0/local directory.
The bin contains
Ffmpeg.exe
Ffprobe.exe (the ffmpeg-0.6.1 has 4 executable files)
Include folder contains
Libavcodec
Libavdevice
Libavformat
Libavutil
Libswscale
5 folders
The preceding five. A static library files are in Lib.
A total of 49.5 m
--------------------------------
Generate available DLL and Lib library files in the VC Environment
Add the following statement to msys. BAT:
Call "D:/program files/Microsoft Visual Studio 9.0/VC/bin/vcvars32.bat"
(Provide the corresponding path by yourself)
Start msys. BAT and enter the following command:
./Configure -- enable-shared -- disable-static -- enable-memalign-hack
Make
Make install
The generated DLL, Lib in msys/1.0/local
============================================
The following are their customized support libraries. ./Configure in
Usage: Configure [Options]
Options: [defaults in brackets after descriptions]
Standard options:
-- Help print this message
-- Logfile = file log tests and output to file [config. Err]
-- Disable-logging do not log configure debug information
-- Prefix = prefix install in prefix [$ prefix]
-- Bindir = dir install binaries in dir [prefix/bin]
-- Datadir = dir install data files in dir [prefix/share/FFMPEG]
-- Libdir = dir install libs in dir [prefix/lib]
-- Shlibdir = dir install shared libs in dir [prefix/lib]
-- Incdir = dir install already des in dir [prefix/include]
-- Mandir = dir install man page in dir [prefix/share/Man]
Configuration Options:
-- Disable-static do not build static libraries [No]
-- Enable-shared build shared libraries [No]
-- Enable-GPL allow use of GPL code, the resulting libs
And binaries will be under GPL [No]
-- Enable-version3 upgrade (l) GPL to version 3 [No]
-- Enable-nonfree allow use of nonfree code, the resulting libs
And binaries will be unredistributable [No]
-- Disable-Doc do not build documentation
-- Disable-FFMPEG disable FFMPEG build
-- Disable-ffplay disable ffplay build
-- Disable-ffprobe disable ffprobe build
-- Disable-ffserver disable ffserver build
-- Disable-avdevice disable libavdevice build
-- Disable-avcodec disable libavcodec build
-- Disable-avformat disable libavformat build
-- Disable-swscale disable libswscale build
-- Enable-postproc enable gpled postprocessing support [No]
-- Enable-avfilter video Filter support [No]
-- Enable-avfilter-lavf video filters dependent on avformat [No]
-- Enable-beosthreads use BEOs threads [No]
-- Enable-os2threads use OS/2 threads [No]
-- Enable-pthreads use pthreads [No]
-- Enable-w32threads use Win32 threads [No]
-Enable-x11grab enable X11 grabbing [No]
-- Disable-network disable network support [No]
-- Disable-mpegaudio-HP faster (but less accurate) MPEG audio decoding [No]
-- Enable-gray enable full grayscale support (slower color)
-- Disable-swscale-Alpha disable alpha channel support in swscale
-- Disable-fastdiv disable table-based division
-- Enable-small optimize for size instead of speed
-- Disable-aandct disable aan DCT code
-- Disable-DCT disable DCT code
-- Disable-FFT disable FFT code
-- Disable-golomb disable golomb code
-- Disable-LPC disable LPC code
-- Disable-mdct disable mdct code
-- Disable-RDFT disable RDFT code
-- Disable-vaapi disable vaapi code
-- Disable-vdpau disable vdpau code
-- Disable-dxva2 disable dxva2 code
-- Enable-runtime-cpudetect detect CPU capabilities at runtime (bigger binary)
-- Enable-hardcoded-tables use hardcoded tables instead of runtime generation
-- Enable-memalign-hack emulate memalign, interferes with memory debuggers
-- Enable-BEOs-NETServer enable BEOs NETServer
-- Disable-Everything disable all components listed below
-- Disable-Encoder = Name disable encoder name
-- Enable-Encoder = Name enable encoder name
-- Disable-encoders disable all encoders
-- Disable-decoder = Name disable decoder name
-- Enable-decoder = Name enable decoder name
-- Disable-decoders disable all decoders
-- Disable-hwaccel = Name disable hwaccel name
-- Enable-hwaccel = Name enable hwaccel name
-- Disable-hwaccels disable all hwaccels
-- Disable-muxer = Name disable muxer name
-- Enable-muxer = Name enable muxer name
-- Disable-muxers disable all muxers
-- Disable-demuxer = Name disable demuxer name
-- Enable-demuxer = Name enable demuxer name
-- Disable-demuxers disable all demuxers
-- Enable-parser = Name enable parser name
-- Disable-parser = Name disable parser name
-- Disable-parsers disable all parsers
-- Enable-BSF = Name enable bitstream Filter Name
-- Disable-BSF = Name disable bitstream Filter Name
-- Disable-BSFs disable all bitstream Filters
-- Enable-Protocol = Name enable protocol name
-- Disable-Protocol = Name disable protocol name
-- Disable-protocols disable all protocols
-- Disable-indev = Name disable input device name
-- Disable-outdev = Name disable output device name
-- Disable-indevs disable input devices
-- Disable-outdevs disable output devices
-- Disable-devices disable all devices
-- Enable-filter = Name enable Filter Name
-- Disable-filter = Name disable Filter Name
-- Disable-filters disable all filters
-- List-decoders show all available decoders
-- List-encoders show all available encoders
-- List-hwaccels show all available hardware accelerators
-- List-muxers show all available muxers
-- List-demuxers show all available demuxers
-- List-parsers show all available parsers
-- List-Protocols show all available protocols
-- List-BSFs show all available bitstream Filters
-- List-indevs show all available input devices
-- List-outdevs show all available output devices
-- List-filters show all available filters
External library support:
-- Enable-avisynth enable reading of avisynth script files [No]
-- Enable-bzlib enable bzlib [autodetect]
-- Enable-libopencore-amrnbenable AMR-NB de/encoding via libopencore-amrnb [No]
-- Enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [No]
-- Enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
And libraw1394 [No]
-- Enable-libdirac enable Dirac support via libdirac [No]
-- Enable-libfaac enable faac support via libfaac [No]
-- Enable-libfaad enable faad support via libfaad [No]
-- Enable-libfaadbin open libfaad. so.0 at runtime [No]
-- Enable-libgsm enable GSM support via libgsm [No]
-- Enable-libmp3lame enable MP3 encoding via libmp 3lame [No]
-- Enable-libnut enable nut (de) muxing via libnut,
Native (de) muxer exists [No]
-- Enable-libopenjpeg enable JPEG 2000 decoding via openjpeg [No]
-- Enable-librtmp enable rtmp [e] support via librtmp [No]
-- Enable-libschroedinger enable Dirac support via libschroedinger [No]
-- Enable-libspeex enable speex decoding via libspeex [No]
-- Enable-libtheora enable theora encoding via libtheora [No]
-- Enable-libvorbis enable Vorbis encoding via libvorbis,
Native implementation exists [No]
-- Enable-libvpx enable Vp8 support via libvpx [No]
-- Enable-libx264 enable H.264 encoding via x264 [No]
-- Enable-libxvid enable Xvid encoding via xvidcore,
Native MPEG-4/Xvid encoder exists [No]
-- Enable-mlib enable sun medialib [No]
-- Enable-zlib enable zlib [autodetect]
Advanced options (experts only ):
-- Source-Path = Path to source code [$ source_path]
-- Cross-Prefix = prefix use prefix for compilation tools [$ cross_prefix]
-- Enable-Cross-compile assume a cross-compiler is used
-- Sysroot = path root of cross-build tree
-- Sysinclude = path location of cross-build system Headers
-- Target-OS = OS compiler targets OS [$ target_ OS]
-- Target-exec = cmd command to run executables on target
-- Target-Path = dir path to view of build directory on target
-- Nm = Nm use nm Tool
-- Ar = ar use archive tool ar [$ ar_default]
-- As = as use extends er as [$ as_default]
-- Cc = Cc use C compiler CC [$ cc_default]
-- LD = LD use linker LD
-- Host-CC = hostcc use host C compiler hostcc
-- Host-cflags = hcflags use hcflags when compiling for host
-- Host-ldflags = hldflags use hldflags when linking for host
-- Host-libs = hlibs use libs hlibs when linking for host
-- Extra-cflags = ecflags add ecflags to cflags [$ cflags]
-- Extra-ldflags = eldflags add eldflags to ldflags [$ ldflags]
-- Extra-libs = elibs add elibs [$ elibs]
-- Extra-version = string version string suffix []
-- Build-suffix = suffix library name suffix []
-- Arch = arch select architecture [$ arch]
-- CPU = CPU select the minimum required CPU (affects
Instruction selection, may crash on older CPUs)
-- Enable-PowerPC-perf enable performance report on PPC
(Requires enabling PMC)
-- Disable-ASM disable all scheduler Optimizations
-- Disable-altivec disable altivec Optimizations
-- Disable-amd3dnow disable 3 dnow! Optimizations
-- Disable-amd3dnowext disable 3 dnow! Extended Optimizations
-- Disable-MMX disable MMX Optimizations
-- Disable-mmx2 disable mmx2 Optimizations
-- Disable-SSE disable SSE Optimizations
-- Disable-ssse3 disable ssse3 Optimizations
-- Disable-armv5te disable armv5te Optimizations
-- Disable-armv6 disable armv6 Optimizations
-- Disable-armv6t2 disable armv6t2 Optimizations
-- Disable-armvfp disable arm VFP Optimizations
-- Disable-iwmmxt disable iwmmxt Optimizations
-- Disable-MMI disable MMI Optimizations
-- Disable-neon disable neon Optimizations
-- Disable-vis disable vis Optimizations
-- Disable-yasm disable use of yasm extends er
-- Enable-pic build position-independent code
-- Malloc-Prefix = pfx prefix malloc and related names with pfx
-- Enable-SRAM allow use of on-chip SRAM
Developer options (useful when working on FFMPEG itself ):
-- Disable-Debug disable debugging symbols
-- Enable-DEBUG = level set the debug level [$ debuglevel]
-- Enable-GPROF enable profiling with GPROF [$ GPROF]
-- Disable-optimizations disable compiler Optimizations
-- Enable-extra-warnings enable more compiler warnings
-- Disable-stripping disable stripping of executables and shared libraries
-- Samples = path location of test samples for fate