在windows下编译ffmpeg
在windows下编译mingw版本的ffmpeg
安装mingw
安装时选项:
下载源代码
x264
git clone git://git.videolan.org/x264.git
ffmpeg
git clone https://git.ffmpeg.org/ffmpeg.git
假设代码分别放在
c:\repo\SDL-1.2.15
c:\repo\x264
c:\repo\ffmpeg
编译
运行C:\MinGW\msys\1.0\msys.bat
cd /c/repo/SDL-1.2.15
./configure
make
make install
cd /c/repo/x264
./configure --enable-shared --disable-asm
make
make install
cd /c/repo/ffmpeg
./configure --enable-shared --disable-static --enable-memalign-hack --enable-libx264 --enable-gpl --disable-yasm --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
make
make install
如果在make ffmpeg时,出现了
missing separator common.mak:159
之类的错误的话
那么需要用git重新取一下代码
git config --global core.autocrlf false
git rm --cached -r .
git reset --hard
编译lib_faac
git clone https://github.com/knik0/faac.git
git checkout -b faac1_28
./bootstrap
./configure --enable-static --disable-shared --without-mp4v2
make
make install