• How to set up Wowza Transcoder Quick Sync accelerated encoding on Ubuntu Desktop

    Note: This article is for an older Wowza™ product or technology that either has been updated or is no longer supported. For the current version of this article, see How to configure Quick Sync accelerated encoding on Linux.
    Wowza Transcoder contains preview technology that makes the best use of 3rd generation Intel Core processors on the Linux Ubuntu Desktop operating system distribution by adding support for Intel Quick Sync Video. Using Intel Quick Sync Video can double transcoding speeds over 2nd generation Intel Core processors by moving video-conversion tasks to dedicated media processing space. The final version of the technology that supports Quick Sync Video will be available in a later release of Wowza Transcoder.

    This article describes how to set up Quick Sync acclerated encoding on Ubuntu Desktop.

    Note: Wowza Media Server™ 3.5.0 or later is required.

    Note: The steps in this article were tested against Ubuntu Desktop 12.04.1. Older versions of Ubuntu Desktop may not work properly because the Intel LibVA driver technology that Quick Sync acceleration relies on is quite new.

    Note: Ubuntu Server will not work with Quick Sync accelerated encoding because the Quick Sync system requires the X Window System (X11) to be running to work properly.

    Note: Accelerated encoding is not available when running on a virtual hardware environment such as VMWare or XEN.

    Note: Currently, the pre-built Intel Video Acceleration API (VAAPI) release only supports the H.264 Baseline Profile. The following article includes generic build instructions for the staging environment of the Intel VAAPI library, which includes support for the H.264 Main Profile (this is for advanced users who are comfortable with compiling and linking code on Linux): How build Intel Quick Sync VAAPI components on Linux (advanced, main profile)

    To set up Quick Sync accelerated encoding on Ubuntu Desktop

    1. Download and install Ubuntu Desktop (ubuntu-12.04.1-desktop-amd64.iso) on a server that contains either a Sandy Bridge or Ivy Bridge processor. You can download Ubuntu Desktop from the Get Ubuntu webpage.

    2. After the installation is complete and the server is rebooted, execute the following commands in a terminal window to update the system and install the Intel LibVA software (be sure to be logged in as root user):
      sudo su -
      [enter password]
      apt-get update
      apt-get upgrade
      apt-get install vainfo
      apt-get install i965-va-driver
    3. Configure access to the X11 system for the root user by executing the following commands:
      [if logged in as root user execute the exit command]
      [as non-root user execute the following command]
      xauth list $DISPLAY
      [copy the out of this command to the clipboard]
      [should look something like "cgood-System-Product-Name/unix:0  MIT-MAGIC-COOKIE-1  8a2e3d31efa5d179974039de4e79f229"]
      sudo su -
      [enter password]
      chmod 775 /root/.Xauthority
      xauth add [output of "xauth list $DISPLAY" from above]
      [example: "xauth add cgood-System-Product-Name/unix:0  MIT-MAGIC-COOKIE-1  8a2e3d31efa5d179974039de4e79f229"]
    4. Test to be sure LibVA is properly installed by executing the following command:
      export DISPLAY=:0.0
      The output should look like this:
      libva: VA-API version 0.32.0
      libva: va_getDriverName() returns 0
      libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
      libva: va_openDriver() returns 0
      vainfo: VA-API version: 0.32 (libva 1.0.15)
      vainfo: Driver version: Intel i965 driver - 1.0.15
      vainfo: Supported profile and entrypoints
            VAProfileMPEG2Simple            : VAEntrypointVLD
            VAProfileMPEG2Main              : VAEntrypointVLD
            VAProfileH264Baseline           : VAEntrypointVLD
            VAProfileH264Baseline           : VAEntrypointEncSlice
            VAProfileH264Main               : VAEntrypointVLD
            VAProfileH264Main               : VAEntrypointEncSlice
            VAProfileH264High               : VAEntrypointVLD
            VAProfileH264High               : VAEntrypointEncSlice
            VAProfileVC1Simple              : VAEntrypointVLD
            VAProfileVC1Main                : VAEntrypointVLD
            VAProfileVC1Advanced            : VAEntrypointVLD
      QuickSync acceleration will not work properly unless you see the following entries in the Supported profile and entrypoints list:
      VAProfileH264Baseline           : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSlice
      If you do not see these entries in the list, then either LibVA is not configured properly or your system does not support Quick Sync acceleration.

    5. Install Java and Wowza Media Server 3.5. You can now use the QuickSync encoding implementation in your transcoder template.

    Note: When running as root user, you may receive an error messages like the following:
    error: can't connect to X server!
    Xlib: No protocol specified
    One solution is to do the following:

    1. Login as a non-root user and execute the following command:
      xhost +

      Login as root user using the following command:
      su -
    2. Test the VAAP install using the following commands:
      export DISPLAY=:0.0

    Originally Published: 11-08-2012.