ffmpeg qsv 编译

ffmpeg 的编译一直困扰很长时间,平时一直是直接用官网的ffmpeg builds库,但是设计到ffmpeg的qsv硬解没办法只能自己编译,感激参考博客https://blog.csdn.net/ww506772362/article/details/84643969

看完该博客之后相信qsv的64位编译已经编译好了,重点说不同之处32位编译,(重点)注意在编译32位和64位时注意切换工具链的环境变量。(重点)在编译的时候如果已经编译过32位或者64位ffmpeg或者mfx请重新下载源码,否则会遇见unercongise options...

1.在编译mfx时

32位:

 

autoreconf -i
configure --prefix=/usr/local --host=i386-w64-mingw32
make -j
make install

64位:

autoreconf -i
configure --prefix=/usr/local --host=x86_64-w64-mingw32
make -j
make install

2.编译ffmpeg,如果你在是在用ffmpeg 已经编译了64位,建议你做一下清理,不然会出现 unrecongise options 等错误
 

make clean
make uninstall 

顺便再清理一下/usr/local include /usr/local/lib 然后重新编译mfx 和 ffmpeg

3.编译的configure。

32位:

./configure --enable-shared --disable-static --disable-programs --disable-doc --enable-libmfx --disable-everything --disable-avdevice --disable-swresample --disable-postproc --disable-avfilter --disable-dxva2 --enable-decoder=h264 --enable-decoder=h264_qsv --arch=x86 --target-os=win32 --disable-debug --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib

64位
 

./configure --enable-shared --disable-static --disable-programs --disable-doc --enable-libmfx --disable-everything --disable-avdevice --disable-swresample --disable-postproc --disable-avfilter --disable-dxva2 --enable-decoder=h264 --enable-decoder=h264_qsv --arch=x64 --target-os=win64 --disable-debug --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib

4.用到的工具:

msys 介绍:这个根据个人理解他就是一个精简话的linux系统,

下载地址:

https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/msys+7za+wget+svn+git+mercurial+cvs-rev9.7z/download

已经附带了各种工具省的自己再安装了

mingw64:64位交叉编译工具链。

下载地址:

https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.7-release/x86_64-w64-mingw32-gcc-4.7.2-release-win64_rubenvb.7z/download

mingw32:32位交叉编译工具链。

如果找不到可以去我的csdn下载:https://download.csdn.net/upload/11106015

 

 

你可能感兴趣的:(音视频相关)