• How to configure Quick Sync accelerated encoding on Linux

    Wowza Transcoder contains technology that makes the best use of Intel Core processors on Linux operating system distributions by adding support for Intel Quick Sync Video. Using Intel Quick Sync Video enables faster transcoding by moving video-conversion tasks to dedicated media processing space. This article describes how to set up Quick Sync accelerated encoding for Wowza Streaming Engine™ 4.4.0 (and later) software on CentOS 7.1-1503 (x86_64).

    Note: If you previously configured Wowza Streaming Engine software (version 4.3.x and earlier) to use Quick Sync acceleration on Ubuntu Server or SUSE Linux operating systems, it will continue to work if you upgrade your Wowza Streaming Engine installation to newer versions of the Streaming Engine software. Intel no longer provides direct support for these operating systems so you should install Wowza Streaming Engine 4.4.0 (and later) on the CentOS operating system to use Quick Sync accelerated encoding.
    Important: Skylake microarchitecture support is currently NOT available in Linux. To enable Haswell and Broadwell microarchitecture support in Linux, follow the instructions below.

    CentOS 7.1-1503 (x86_64) instructions

    Important: The specific version of CentOS 7.1 (1503) is required for Wowza Streaming Engine to work with Quick Sync acceleration. It won't work on any other versions of CentOS. The following instructions must be followed exactly to enable Quick Sync acceleration.
    1. Install CentOS 7.1-1503 64-bit (CentOS-7-x86_64-DVD-1503-01).

      Important: Don't run yum update to update the system. The default installed components are required.
      During post-installation setup, configure the following:

      • Software Selection - Select the Development and Creative Workstation base environment.

      • Network & Host name - On the General tab, select Automatically connect to this network when it is available.

      • During installation, set a root password and configure a non-Administrative user. The non-Administrative user is referred to as [non-root-user] in the following instructions.

    2. Log in to the computer as the root user, and then run the following commands to install additional required software:
      yum -y install net-tools redhat-lsb-ore unzip wget
      usermod -a -G video [non-root-user]
    3. Download and install the Intel Media SDK driver package for CentOS 7.1:
      mkdir /opt/mediasdk
      cd /opt/mediasdk
      wget http://www.wowza.com/downloads/WowzaTranscoder-4-Components/intel-quicksync-linux/intel-linux-media-centos_16.4.2.1-39163_64bit.zip
      unzip intel-linux-media-centos*
      tar -xvf install_scripts_centos*
      
      ./install_sdk_UMD_*.sh
      mkdir /MSS
      chown [non-root-user]:[non-root-user] /MSS
      
      su [non-root-user]
      cp build_kernel_rpm*.sh /MSS
      cd /MSS
      ./build_kernel_rpm*.sh
      exit
      
      cd /MSS/rpmbuild/RPMS/x86_64
      rpm -Uvh kernel-3.10.*.rpm
      Be sure to then reboot so that the driver is loaded:
      shutdown -r 0
    4. Download the Linux 64-bit installer for Wowza Streaming Engine, and then install the server software. Updates for the latest server software version may be available on our Software Updates webpage.

    5. Edit the Wowza Streaming Engine startup script to enable Quick Sync when running as a system service:
      vi /usr/bin/WowzaStreamingEngined
      Add the following two lines just above (. $WMSAPP_HOME/bin/wms.sh):
      export LIBVA_DRIVERS_PATH=/opt/intel/mediasdk/lib64
      export LIBVA_DRIVER_NAME=iHD
    6. Edit [install-dir]/conf/Server.xml to set the QuickSync plugin path to point to the R6 version of the Intel Media SDK libraries:
      <Transcoder>
      	<PluginPaths>
      		<QuickSync>quicksync-2015r6</QuickSync>
      	</PluginPaths>
      </Transcoder>
      Note: If the QuickSync plugin path XML section isn't present in your Server.xml file, add this just above the <Properties> container at the bottom of the file.
    7. You might need to turn off the CentOS firewall to stream over TCP port 1935:
      systemctl disable firewalld
      systemctl stop firewalld
      systemctl status firewalld

    Originally Published: 11-08-2012.
    Updated: For Wowza Streaming Engine 4.4.0 on 02-02-2016.

    If you're having problems or want to discuss this article, post in our forum.