How to install a driver for Intel QuickSync on CentOS 7.4/7.5

September 23, 2019
Features 354 views

To provide hardware accelerated decoding, encoding, and video post processing, you need to install a driver.

To do that, you need access to the Internet or proxy-server settings for yum and git. For your convenience we recommend you to perform all actions in a temporary folder, e.g. /home/user_name/intel_driver.

  1. Install utilities.

    sudo yum group install "Development Tools"
    sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    sudo yum install -y cmake3 libdrm-devel libpciaccess-devel libX11-devel git

  2. Build and install libva (VIdeo Acceleration API).

    git clone https://github.com/intel/libva.git
    cd libva
    git checkout 285267586a3d4db0e721d30d4a5f5f9fe6a3c913
    ./autogen.sh
    make -j8
    sudo make install
    sudo cp va/x11/va_dricommon.h /usr/local/include/va/
    sudo cp va/va_x11.h /usr/local/include/va/
    cd ..

  3. Build and install Graphics Memory Management Library (gmmlib).

    git clone https://github.com/intel/gmmlib.git
    cd gmmlib
    git checkout tags/intel-gmmlib-18.3.0
    mkdir build
    cd build
    cmake3 ..
    make -j8
    sudo make install
    cd ../..

  4. Build and install media driver.

    git clone https://github.com/intel/media-driver.git
    cd media-driver
    git checkout tags/intel-media-18.3.0
    cd ..
    mkdir build_media
    cd build_media
    cmake3 -DLIBVA_INSTALL_PATH=/usr/local/include -DLIBVA_LIBRARY_PATH=/usr/local/lib ../media-driver
    make -j8
    sudo make install
    sudo cp media_driver/cmake/linux/intel-media.sh /etc/profile.d/
    . /etc/profile.d/intel-media.sh
    cd ..

  5. Install a driver toolset (Intel MediaSDK).

    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    git clone https://github.com/Intel-Media-SDK/MediaSDK msdk
    cd msdk
    git checkout tags/intel-mediasdk-18.3.1
    mkdir build
    cd build
    cmake3 ..
    make -j8
    sudo make install
    cd ../..

    Add the following string to the end of ~/.bashrc file:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/opt/intel/mediasdk/lib64.

    Then, run ~/.bashrc.

  6. Check if the driver has been installed successfully.

    git clone https://github.com/intel/libva-utils.git
    cd libva-utils
    git checkout tags/1.8.3
    sudo yum install automake libtool
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    ./autogen.sh
    #(Delete or comment lines 244-248 of encode/avcenc.c)
    make -j8
    sudo make install
    vainfo
    cd ..

    If everything is done correctly, the vainfo call does not contain errors and looks like this:

    libva info: VA-API version 1.4.0
    libva info: va_getDriverName() returns 0
    libva info: User requested driver 'iHD'
    libva info: Trying to open /usr/local/lib64/dri//iHD_drv_video.so
    libva info: Found init function __vaDriverInit_1_4
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 1.4 (libva )
    vainfo: Driver version: Intel iHD driver - 1.0.0
    vainfo: Supported profile and entrypoints
    ...

    Note that driver works only under the user account that you used during installation. To make it work for other users too, you can add them to the video group:

    usermod -a -G video username.

 

To learn more, you can use the following links:

 

If you have any questions, contact our technical support team.

Resources

On the topic

Product:CodecWorksCodecWorksCodecWorks
Category:Features

Feedback

Related questions

More questions?

Chat nowAsk a question