intel利用GPU做H264硬件编解码,目前已经完成啦!更多具体的性能测试还在进行中,这里先将搭建环境方式写下来。
1、安装intel media sdk
2、创建链接
ln -s /opt/intel/mediasdk/include/ /usr/local/include/mfx
ln -s /opt/intel/mediasdk/lib64/8086/0f31/libmfxhw64.so /usr/local/lib/libmfxhw64.so
3、新建/usr/local/lib/pkgconfig/libmfx.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libmfx
Description: Intel Media SDK Dispatched static library
Version: 2015
Libs: -L${exec_prefix}/lib -lsupc++ -lmfxhw64
Libs.private:
Cflags: -I${prefix}/include
4、编译选项配置
安装 g++
执行./configure --enable-shared --enable-libmfx
5、编译
make
make install
6、运行
ffmpeg -i /dev/video1 -s 1280x720 -vcodec h264_qsv -q 80 -an -y output.264
欢迎与大家一起学习