ffmpeg在windows下编译

 ./configure  --prefix=${basepath}/ffmpeg_install \
--enable-gpl --enable-libx264  --enable-shared  --enable-encoder=h264_qsv --enable-decoder=h264_qsv --enable-libmfx --enable-encoder=mjpeg --enable-encoder=mpeg4 --extra-cflags="-I/j/src/ffmpeg/FFmpeg-release-4.4/3rdpart/include"  \
--extra-ldflags="-LIBPATH:/j/src/ffmpeg/FFmpeg-release-4.4/3rdpart/lib"  \
--extra-libs="-L/j/src/ffmpeg/FFmpeg-release-4.4/3rdpart/lib -lx264 -lmfx  -lstdc++  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32"

编译lame3.99.5出错
直接删除 configure 文件中 xmmintrin.h

#!/bin/bash

basepath=$(cd `dirname $0`;pwd)
echo ${basepath}
cd ${basepath}
 
 
#添加x264 x265 pkg路径
x264_pkg_path=/j/src/ffmpeg/FFmpeg-release-4.4/3rdpart/lib/pkg-config
#x265_pkg_path=/home/xxxx/x265_git/x265_install/lib/pkgconfig
export PKG_CONFIG_PATH=$x264_pkg_path:$PKG_CONFIG_PATH

#export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/E/work/ffmpeg/h264/x264-master/x264-master/VS2015_build/lib/pkgconfig
echo ${PKG_CONFIG_PATH}

#export PKG_CONFIG_PATH=$x264_pkg_path:$PKG_CONFIG_PATH
 
#CC=cl.exe  ./configure --prefix=${basepath}/ffmpeg_install --disable-static --enable-shared --enable-libx264 --enable-libx265 --enable-gpl
#CC=cl.exe ./configure  --prefix=./VS2015_build --disable-programs --enable-shared --disable-doc --enable-decoder=h264  --enable-decoder=mjpeg --enable-decoder=mpeg4 --enable-parser=h264 --enable-parser=mpeg4video --enable-parser=mpegvideo --toolchain=msvc --extra-cflags="-MD -DWIN32_LEAN_AND_MEAN" --enable-libx264  --enable-gpl 
 ./configure  --prefix=${basepath}/ffmpeg_install_mp3 \
--enable-gpl --enable-libx264  --enable-shared  --enable-encoder=h264_qsv --enable-decoder=h264_qsv --enable-libmfx --enable-encoder=mjpeg --enable-encoder=mpeg4 --enable-libmp3lame  --enable-nonfree --enable-libfdk_aac --extra-cflags="-I/j/src/ffmpeg/FFmpeg-release-4.4/3rdpart/include"  \
--extra-ldflags="-LIBPATH:/j/src/ffmpeg/FFmpeg-release-4.4/3rdpart/lib"  \
--extra-libs="-L/j/src/ffmpeg/FFmpeg-release-4.4/3rdpart/lib -lx264 -lmfx  -lstdc++  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32"
#--extra-cflags=-l/E/work/ffmpeg/h264/x264-master/x264-master/VS2015_build/include --extra-ldflags=-L/E/work/ffmpeg/h264/x264-master/x264-master/VS2015_build//lib
#--extra-ldflags=-LIBPATH:/E/work/ffmpeg/h264/x264-master/x264-master/VS2015_build/lib --extra-cflags=-I/E/work/ffmpeg/h264/x264-master/x264-master/VS2015_build/include
# --extra-ldflags=-LIBPATH:C:/MinGW/msys/1.0/x264/VS_2015_build/lib --extra-cflags=-IC:/MinGW/msys/1.0/x264/VS_2015_build/include
#make -j8
#make install

你可能感兴趣的:(ffmpeg,windows)