Intel Media SDK安装步骤
!!!(gcc/g++版本要在4.8以上,本人使用的是5.4版本)
要先安装依赖,按以下步骤依次执行
1.LIBVA
git clone https://github.com/intel/libva.git
cd libva/
./autogen.sh
./configure
make
make install
cp /usr/local/include/va/* /usr/include/
cp /usr/local/lib/libva* /usr/lib64/
2.Intel(R) Graphics Memory Management Library(gmmlib)(可以不用单独安装,安装Media Driver时会附带安装)
Introduction
The Intel(R) Graphics Memory Management Library provides device specific and buffer management for the Intel(R) Graphics Compute Runtime for OpenCL(TM) and the Intel(R) Media Driver for VAAPI.
License
The Intel(R) Graphics Memory Management Library is distributed under the MIT Open Source license.
You may obtain a copy of the License at:
https://opensource.org/licenses/MIT
Building
Get gmmlib repo, make it look like
<workspace>
|- GmmLib
$ mkdir <workspace>/build
$ cd <workspace>/build
cmake [-DCMAKE_BUILD_TYPE= Release | Debug | ReleaseInternal] [-DARCH= | ] ../GmmLib
$ make -j8 ( Also performs compile time ULT)
Build步骤如下:
mkdir workspace && cd workspace/
git clone https://github.com/intel/gmmlib.git
mkdir build && cd build
cmake [-DCMAKE_BUILD_TYPE= Release] [-DARCH= ] ../gmmlib
make -j8
执行完make以后会得到如下结果:
[ %] Linking CXX static library libgmm_umd.a
[ %] Built target gmm_umd
[ %] Linking CXX shared library libigdgmm64.so
[ %] Built target igfx_gmmumd_dll
[ %] Linking CXX static library libigfx_gmmumd_excite.a
[ %] Built target igfx_gmmumd_excite
Scanning dependencies of target GMMULT
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmCachePolicyULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmCommonULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmGen10CachePolicyULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmGen9CachePolicyULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmGen10ResourceULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmGen9ResourceULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmResourceCpuBltULT.cpp.o
[ %] Linking CXX static library libigfxgmmumd.a
[ %] Built target igfxgmmumd
把生成的动态和静态库拷贝到 /usr/lib64 目录下:
cp Source/GmmLib/libgmm_umd.a /usr/lib64/ &&
cp Source/GmmLib/libigdgmm64.so /usr/lib64/ &&
cp Source/GmmLib/libigfx_gmmumd_excite.a /usr/lib64/ &&
cp Source/GmmLib/libigfxgmmumd.a /usr/lib64/
Install
Not a stand alone software component. GmmLib is build as static library for Intel media driver and Compute runtime for OpenCL Supported Platforms
Intel Atom and Core Processors supporting Gen9/Gen10 graphics devices
BDW (Broadwell)
SKL (Skylake)
CNL (Cannonlake)
3.Intel(R) Media Driver for VAAPI
Introduction
The Intel(R) Media Driver for VAAPI is a new VA-API (Video Acceleration API) user mode driver supporting hardware accelerated decoding, encoding, and video post processing for GEN based graphics hardware.
License
The Intel(R) Media Driver for VAAPI is distributed under the MIT license with portions covered under the BSD 3-clause "New" or "Revised" License. You may obtain a copy of the License at: https://opensource.org/licenses/MIT & https://opensource.org/licenses/BSD-3-Clause
Prerequisites
For Ubuntu 16.04 and above
apt install autoconf libtool libdrm-dev xorg xorg-dev openbox libx11-dev libgl1-mesa-glx libgl1-mesa-dev
Equivalents for other distributions should work.
Dependencies
Libva - https://github.com/intel/libva
GmmLib - https://github.com/intel/gmmlib (please check https://github.com/intel/media-driver/wiki/Comparability-with-GmmLib)
Building
. Build and install libva master
. Get gmmlib and media repo and format the workspace folder as below (suggest the workspace to be a dedicated one for media driver build):
<workspace>
|- gmmlib
|- media-driver $ mkdir <workspace>/build_media $ cd <workspace>/build_media $ cmake ../media-driver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DMEDIA_VERSION="2.0.0" \
-DBUILD_ALONG_WITH_CMRTLIB= \
-DBS_DIR_GMMLIB=`pwd`/../gmmlib/Source/GmmLib/ \
-DBS_DIR_COMMON=`pwd`/../gmmlib/Source/Common/ \
-DBS_DIR_INC=`pwd`/../gmmlib/Source/inc/ \
-DBS_DIR_MEDIA=`pwd`/../media-driver Alternatively, copy
<workspace>/media-driver/unified_cmake.sh into
<workspace>/build_media then run
$ ./unified_cmake.sh $ make -j8 Install
$ sudo make install This will install the following files (e.g. on Ubuntu):
-- Installing: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
-- Installing: /etc/profile.d/intel-media.sh
-- Installing: /usr/lib/x86_64-linux-gnu/igfxcmrt64.so
Build步骤如下:
cd workspace/
git clone https://github.com/intel/media-driver.git
mkdir build_media && cd build_media/
cp ../media-driver/unified_cmake.sh ./
./unified_cmake.sh
make -j8
make install
执行unified_cmake.sh脚本时可能会报如下错误:
CMake Error at /usr/local/share/cmake-3.5/Modules/FindPkgConfig.cmake: (message):
A required package was not found
Call Stack (most recent call first):
/usr/local/share/cmake-3.5/Modules/FindPkgConfig.cmake: (_pkg_check_modules_internal)
cmrtlib/linux/CMakeLists.txt: (pkg_check_modules) -- Configuring incomplete, errors occurred!
See also "/opt/MediaDriver/build_media/CMakeFiles/CMakeOutput.log".
解决方法:
vim /usr/local/share/cmake-3.5/Modules/FindPkgConfig.cmake
在356行,把set(_pkg_check_modules_failed 1)改为set(_pkg_check_modules_failed 0)
再执行./unified_cmake.sh
执行make install后,无错误的情况如下:
Install the project...
-- Install configuration: ""
-- Installing: /home/tvu/hevc_shmenc_new/shmenc/3rdparty/libva-1.8./lib/lib/dri/iHD_drv_video.so
-- Installing: /usr/lib64/igfxcmrt64.so
-- Installing: /etc/profile.d/intel-media.sh
命令行输入:echo $LIBVA_DRIVERS_PATH 查看环境变量的值,如下:
/usr/intel/mediasdk/lib64
执行 ls /usr/intel/mediasdk/lib64 可以看到此目录下有如下文件:
iHD_drv_video.so libmfxhw64-p.so.1.19 libmfxhw64.so libmfxsw64-p.so.1.19 libmfxsw64.so iHD_drv_video.so libdispatch_shared.a libmfx.a libmfxhw64-p.so.1.19 libmfxhw64-p.so.1.26 libmfxhw64.so libmfxsw64-p.so.1.19 libmfxsw64.so pkgconfig
执行如下命令替换掉 /usr/intel/mediasdk/lib64/iHD_drv_video.so(此步骤也可以在装完MediaSDK后执行):
cp /home/tvu/hevc_shmenc_new/shmenc/3rdparty/libva-1.8./lib/lib/dri/iHD_drv_video.so /usr/intel/mediasdk/lib64/
然后执行vainfo的到如下结果:
error: can't connect to X server!
libva info: VA-API version 1.1.
libva info: va_getDriverName() returns
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns
vainfo: VA-API version: 1.1 (libva 1.67..pre1)
vainfo: Driver version: Intel iHD driver - 2.0.
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : <unknown entrypoint>
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : <unknown entrypoint>
VAProfileH264Main : <unknown entrypoint>
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : <unknown entrypoint>
VAProfileH264High : <unknown entrypoint>
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: <unknown entrypoint>
VAProfileH264ConstrainedBaseline: <unknown entrypoint>
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : <unknown entrypoint>
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
*注意:没替换掉 /usr/intel/mediasdk/lib64/iHD_drv_video.so的情况下,命令行执行vainfo可能会出现以下情况:
error: can't connect to X server!
libva info: VA-API version 1.1.
libva info: va_getDriverName() returns
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/intel/mediasdk/lib64/iHD_drv_video.so
libva error: /usr/intel/mediasdk/lib64/iHD_drv_video.so has no function __vaDriverInit_1_0
libva info: va_openDriver() returns -
vaInitialize failed with error code - (unknown libva error),exit
4.Intel® Media SDK
Intel® Media SDK provides an API to access hardware-accelerated video decode, encode and filtering on Intel® platforms with integrated graphics.
Supported video encoders: HEVC, AVC, MPEG-2, JPEG Supported Video decoders: HEVC, AVC, VP8, MPEG-2, VC1, JPEG Supported video pre-processing filters: Color Conversion, Deinterlace, Denoise, Resize, Rotate, Composition Important note
The current version of Intel Media SDK is compatible with the open source Intel Media Driver for VAAPI. Intel Media SDK depends on LibVA. FAQ
You can find answers for the most frequently asked questions here. Table of contents
- License
- How to contribute
- Documentation
- Products which use Media SDK
- System requirements
- How to build
- Requirements
- Build steps
License
Intel Media SDK is licensed under MIT license. See LICENSE for details.
How to contribute
See CONTRIBUTING for details. Thank you!
Documentation
Please find full documentation under the doc/ folder. Key documents:
- Media SDK Developer Reference
- Media SDK Developer Reference Extensions for User-Defined Functions
- Media Samples Guide
You may also wish to visit Intel Media Server Studio support page for additional documentation.
products which use Media SDK
- Intel Media Server Studio
- Intel Media SDK for Embedded Linux
System requirements
Operating System: Linux
Software:
- LibVA
- VAAPI backend driver:
Intel Media Driver for VAAPI - Some features require CM Runtime library (part of Intel Media Driver for VAAPI package)
Hardware: Intel platforms supported by the Intel Media Driver for VAAPI
Media SDK test and sample applications may require additional software packages (for example, X Server, Wayland, LibDRM, etc.) to be functional.
How to build
Requirements
- Git* (with LFS support)
- Perl* v5.16+
- Cmake* v2.8+
- GCC* v4.8+
- LibVA
Build steps
Get sources
git clone https://github.com/Intel-Media-SDK/MediaSDK msdk
cd msdk
Configure build with GCC (default) compiler:
perl tools/builder/build_mfx.pl --cmake=intel64.make.release
这时会报如下错误:
CMake Error at builder/FindTrace.cmake: (include):
include could not find load file
/usr/intel/mediasdk/builder/FindVTune.cmake
Call Stack (most recent call first):
CMakeLists.txt: (include)
解决方法:
mkdir /usr/intel/mediasdk/builder/
cp builder/* /usr/intel/mediasdk/builder/
再执行perl tools/builder/build_mfx.pl --cmake=intel64.make.release即可。
This will build MSDK binaries and MSDK samples.
If you want to configure build with CLang compiler use the following command:
perl tools/builder/build_mfx.pl --cmake=intel64.make.release.clang
Run build:
make -j8 -C __cmake/intel64.make.release
Intel Media SDK安装步骤的更多相关文章
- Intel® Media SDK Media Samples Linux 学习笔记(转)
最近折腾intel media sdk,主要硬件平台是在HD4600的核显上进行测试,intel media sdk是intel提供的一种基于核显的硬件编解码的解决方案,之前已经有使用ffmpeg进行 ...
- Intel Media SDK H264 encoder GOP setting
1 I帧,P帧,B帧,IDR帧,NAL单元 I frame:帧内编码帧,又称intra picture,I 帧通常是每个 GOP(MPEG 所使用的一种视频压缩技术)的第一个帧,经过适度地压缩,做为随 ...
- (转)Integrating Intel® Media SDK with FFmpeg for mux/demuxing and audio encode/decode usages 1
Download Article and Source Code Download Integrating Intel® Media SDK with FFmpeg for mux/demuxing ...
- Getting Started with the Intel Media SDK
By Gael Hofemeier on March 19, 2015 Follow Gael on Twitter: @GaelHof Media SDK Developer’s Guide Med ...
- Intel® Media SDK(一)
A cross-platform API for developing media applications on Windows* Fast video playback, encode, proc ...
- Intel Media SDK 性能測试
经过測试,发如今windows 7上 i3 i5 上Intel Media SDK 1080P仅仅能解6路,720P仅仅能解8路, 不知大家有没有測试过?
- 微软商店一直安装不上Intel Media SDK DFP
具体表现为一直安装失败,但是下载进度条一直在,无法去除. 此方法来自 https://answers.microsoft.com/en-us/windows/forum/all/error-code- ...
- python3.3.5x64+win2003x64+aliyun oss sdk安装步骤
参考文章:https://help.aliyun.com/document_detail/32026.html?spm=5176.doc31890.6.690.S6ZrRn 1.安装python3.3 ...
- Android sdk安装目录中没有platform-tools目录问题详解
sdk下载地址 http://tools.android-studio.org/index.php/sdk 安装步骤很简单,百度即可. 下面详细说一下,在安装中遇到android sdk下没有plat ...
随机推荐
- Ajax 传递json字符串到客户端时报 Internal server error
架构:struts2+JQuery 需求:就是前台请求后台,后台查询数据库,将数据转换成json格式,使用struts2框架赋值给action内的变量jsonStr,前台通过 response.jso ...
- jsp连接MySQL实现登录
1.下载驱动,并把jar包放到Tomcat的lib目录下 下载连接 2.把jar包添加到项目中 3.登录页面 <%@ page language="java" content ...
- WEB笔记-3、盒子模型+定位+显示
3.1 盒子模型 边距控制 margin/padding:上 右 下 左: padding:内容和边距之间的空间 margin:”盒子“外撑开的空间,两个相邻标签外边距会出现重叠和累加的现象, ...
- Metric Learning度量学习:**矩阵学习和图学习
DML学习原文链接:http://blog.csdn.net/lzt1983/article/details/7884553 一篇metric learning(DML)的综述文章,对DML的意义.方 ...
- php 加密解密函数封装
算法一: //加密函数 function lock_url($txt,$key='yang') { $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi ...
- CorelDRAW2019新耀发布会,报名即可领红包!
30年时光荏苒!眨眼风惊雨过. 在1989年的春天,CorelDRAW 1.0正式发布,一经面世就掀起了图形设计行业革命浪潮,这个图形工具不仅给设计师提供了矢量图像.页面设计,更能应用于网站制作.位 ...
- MQTTnet 的Asp.Net Core 认证事件的扩展
MQTTnet 的数据接收 连接 等事件都很丰富, 唯独客户端连接验证不能依赖注入也不能很舒服的使用事件的方式, 因此MQTTnet.AspNetCoreEx 就出现了. 示例如下:在 public ...
- 团体程序设计天梯赛-练习集-L1-040. 最佳情侣身高差
L1-040. 最佳情侣身高差 专家通过多组情侣研究数据发现,最佳的情侣身高差遵循着一个公式:(女方的身高)×1.09=(男方的身高).如果符合,你俩的身高差不管是牵手.拥抱.接吻,都是最和谐的差度. ...
- Qt中采用多线程实现Socket编程
Socket通常也称作"套接字",应用程序通常通过"套接字"向网络发出请求或者应答网络请求. 本文介绍的是Qt中采用多线程Socket编程,由于工作的需要,开始 ...
- S-HR系统流程