Intel® oneAPI Video Processing Library Installation Guide

Published:03/25/2021

Introduction

oneVPL is a development toolkit to enable the video codec accelerator on different platforms, it is also the successor to Intel® Media SDK. To keep the unified API as well as the compatibility of oneVPL with the current Intel® Media SDK product, oneVPL provides a flexible packaging scheme and offers a separate installation for each package.

Read a brief description of oneVPL architecture and packages to better understand the details of oneVPL installation. If you already decided on the installation path, you may skip the following sections and go directly to the installation process.

Intended Audience

The deployment of oneVPL addresses the following personas, each with their own user perspective:

Developer

Developers compile code that calls oneVPL functions. oneVPL headers must be available to include and oneVPL dispatcher library must be available to link. oneVPL provides samples for code examples as well as tools to test the implementations and explore oneVPL APIs.

Note: If you are currently using Intel® Media SDK as a developer, read about upgrading from Intel® Media SDK to oneVPL to understand the options based on your next steps.

End user

End users are the users of applications for which oneVPL is a prerequisite dependency. In this case, only runtime components are required to be installed.

Note: If you are an end user of Intel® Media SDK, follow the Intel® Media SDK installation steps to install the new Intel® Media SDK library.

Architecture

This is the high-level architecture of oneVPL product:

As shown on the diagram, oneVPL has an API layer and an Implementation layer. The unified API allows applications to access different libraries either without modifying the source code at all or with only a minor modification. The library for a specific accelerator depends on the platform installed, which means that oneVPL only includes the CPU library by default. The other libraries can be installed separately based on the need of the platform and application.

The API layer is packaged as a developer package. The implementation library is called “runtime library” or “runtime”. Intel® Media SDK is the GPU runtime.

The following deliveries are available for oneVPL deployment:

  • oneVPL release packages: developer package, CPU runtime, sample code, and pre-built tools. It is also called oneVPL default package.
  • oneVPL source code
  • oneVPL sample code
    • Note: The source code of the oneVPL sample code is published on GitHub together with the oneAPI samples.

  • Intel® Media SDK release: GPU runtime
  • Intel® Media SDK source code:
    • Note: The source code has been released on GitHub since 2017.

Installation Paths

The installation paths are different for each persona. The main difference is that when you install oneVPL packages as an end user, you are only required to install the runtime package.

Installation Paths for Developers

As a developer, you should follow these steps to install oneVPL:

  1. Decide on an installation method
    • Check hardware support
    • Check OS support
  2. Choose installation method
    • Use a binary package
    • Use platform-specific channels (Nuget, APT, and others)
    • Build from source code
  3. Install default package
    • Developer Package
    • CPU Runtime
    • Sample code
  4. Install other package
    • Graphic drivers
    • GPU Runtime

Refer to the table below to choose the operating system and the hardware platform:

  Linux Windows
CPU Refer to oneVPL system requirements Windows 10
GPU Ubuntu 20.04 Windows 10

Installation Paths for End Users

As an end user, you should follow these steps to install oneVPL:

  1. Decide on an installation method
    • Check Hardware support
    • Check OS support    
  2. Install Runtime
    • Install CPU runtime
    • Install GPU runtime
  3. Install an application
    • Install a third party application
    • Install an application framework

Choose an Installation Approach

The following sections in this document cover developer and end user installation for CPU and GPU.

CPU Components

Approach When to use
Install CPU Implementation of oneVPL with Intel® oneAPI Base Toolkit If you are working with several oneAPI components.
Install CPU Implementation of oneVPL as a stand-alone oneAPI component If only oneVPL is needed.
Install CPU Implementation of oneVPL from NuGet If NuGet dependency management is needed.
Install CPU Implementation of oneVPL from Open Source If a project needs access to the source instead of precompiled libraries.

For more alternatives, refer to other installation methods in oneAPI Base Toolkit installation guide.

GPU Components

Approach When to use
Install Intel Graphics runtime and development packages If you are using runtimes and graphics stack without modification. This is the recommended installation option for most cases because package manager assists with the correct graphics stack installation.
Install GPU Implementation of oneVPL from Open Source If your application is modifying runtimes or graphics stack. You may have to build multiple stack components from source to use this approach.


After the release package, we describe the GPU runtime installation on Linux. To install GPU runtime on Windows, refer to Intel® Media SDK download page.

Install CPU Implementation of oneVPL with Intel® oneAPI Base Toolkit

  1. Go to oneVPL home page and click “Get it Now”. It will take you to Intel® oneAPI Base Toolkit download page.
  2. Select the operating system.
  3. Select “Web&Local” as the distribution.
  4. Select the installer, either “Online” or “Local”. With the local installer, you will get the default package with all components. Online installer allows you to customize the toolkit for it to better fit your needs.

  5. Log in to download the installer for the chosen operating system.
  6. Launch the downloaded executable file.
  7. Once the installation wizard is launched, follow the instructions to install the toolkit.

See Also

Install CPU Implementation of oneVPL as a stand-alone oneAPI component

  1. Go to oneVPL home page.
  2. Scroll down to the bottom of the page and click “Download”. This will take you to the oneVPL component installation page.
  3. Choose the installation package for the desired operating system (Windows* or Linux*) with the preferred type of installer (Online or Local) to start the downloading process.

  4. Launch the downloader.
  5. Once the installation wizard is launched, follow the instruction to install oneVPL as a single component.

Install CPU Implementation of oneVPL from NuGet

NuGet is a package manager used by Microsoft Visual Studio. It can be installed from VS 2017 or later. For details, refer to Microsoft documentation for NuGet Installer. There are two ways to install oneVPL packages from NuGet.

Using NuGet CLI

If you do not have Microsoft Visual Studio and want to use command line console, use NuGet CLI:

  1. Go to nuget.org to download nuget.exe. This is the binary to run NuGet.
  2. To list all package, run:
    nuget list onevpl
    You will see the list of available oneVPL packages: 
    onevpl.devel.linux-x64  2021.1.1.66
    onevpl.devel.win-x64  2021.1.1.76
    onevpl.runtime.linux-x64  2021.1.1.66
    onevpl.runtime.win-x64  2021.1.1.76
  3. To install the package, use the following command: nuget install <package name>. For example:
    nuget install onevpl.devel.win-x64
    nuget install oneVPL.runtimewin-x64

Using Package Manager UI

  1. Open your project in Microsoft Visual Studio.
  2. In Solution Explorer, right-click either References or a project, and select Manage NuGet Packages for Solution…
  3. In the search bar, use “oneVPL” as a keyword to search for the list of available oneVPL packages.
  4. On the right side, click “Install” button. The package will be installed to the same directory as the solution file.

Using Package Manager Console

  1. Open Visual Studio.
  2. In Tools menu, open “Package manager Console”.

     

  3. In a NuGet console, search for oneVPL packages using find-package command:
    find-package onevpl
    You will see the list of available oneVPL packages:
    PM> find-package onevpl
    Id                                  Versions       Description                                                                                    
    --                                  --------        -----------                                                                                    
    onevpl.runtime.win-x64           {2021.1.1.76}     Runtime environment for oneVPL on 64-bit Windows                                                
    onevpl.devel.win-x64             {2021.1.1.76}     Development environment for oneVPL on 64-bit Windows                                            
    onevpl.runtime.linux-x64         {2021.1.1.66}     Runtime environment for oneVPL on 64-bit Linux                                                  
    onevpl.devel.linux-x64           {2021.1.1.66}     Development environment for oneVPL on 64-bit Linux                                              
    Time Elapsed: 00:00:00.8533599
  4. To install oneVPL, use the install-package command with the package name that you want to install. For example:
    install-package onevpl.devel.win-x64

The package will be installed to the same directory as the solution file.

See Also

Install CPU Implementation of oneVPL from Open Source

To install oneVPL from the source code, you have to install its API and dispatcher and the runtime library.

Note: Only CPU runtime library is included in 2021.2.2 release, so the installation process for runtime library will only have the CPU part.

Build and Install on Linux* OS

The following instructions are tested on Ubuntu 18.04. The assumption is that the installation path is /opt/intel/oneVPL-build. You can replace this path with any one you prefer.

  1. Check the prerequisites and install the following tools:
    • A compiler with C++11 support
    • CMake: version higher than 3.10
    • Git
  2. Clone the source code from oneVPL repository:
    git clone https://github.com/oneapi-src/oneVPL.git
    cd oneVPL
  3. Build oneVPL:
    mkdir _build
    cd _build
    cmake .. -DCMAKE_INSTALL_PREFIX=oneVPL-build
    cmake --build . --config Release
    sudo cmake --build . --config Release --target install

    Note: You do not have to use “sudo” if the installation path is not a root directory.

  4. Install the required tools to build CPU runtime library:
    sudo apt-get update && sudo apt-get install -y --no-install-recommends \
         build-essential git pkg-config yasm nasm cmake python3 \
         python3-setuptools python3-pip
    sudo pip3 install -U wheel --user
    sudo pip3 install meson ninja
  5. Clone the source code:
    git clone https://github.com/oneapi-src/oneVPL-cpu.git
    cd oneVPL-cpu
  6. Build and install the CPU runtime library:
    export VPL_INSTALL_DIR=/opt/intel/oneVPL-build
    source script/bootstrap
    script/build
    sudo script/install

    Note: You do not have to use “sudo” if the installation path is not a root directory.

  7. (Optional) Enable H.264 encode. By default, H.264 encode is not enabled for licensing reasons.
    export VPL_INSTALL_DIR=/opt/intel/oneVPL-build
    script/bootstrap gpl
    script/build gpl
    sudo script/install

Build and install on Windows* OS

The following instructions are tested on Windows 10 64-bit. The assumptions is that the installation path is C:\User\developer\Document\oneVPL-build. You can replace this path with any one you prefer.

  1. Check the prerequisites and install the following tools:
  2. Open git console and clone the source code from oneVPL repository:
    git clone https://github.com/oneapi-src/oneVPL.git
    cd oneVPL
  3. In the command line console, build oneVPL:
    mkdir _build
    cd _build
    cmake .. -DCMAKE_INSTALL_PREFIX= C:\User\developer\Document\oneVPL-build
    cmake --build . --config Release
    cmake --build . --config Release --target install
    

    Note: You might need administrator rights if the installation path is in a system directory.

  4. Install Chocolatey*. Open a PowerShell with administrator permission.
    PM> Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  5. Install MSYS2-based tools.
    • Install MSYS2 from a command line console with administrator permissions: 
      choco install msys2
    • Start a mingw64 shell from command line console: 
      C:\tools\msys64\msys2.exe
    • Use mingw64 shell to get the packages required by build:
      pacman -Syu
      pacman --needed -Sy mingw-w64-x86_64-toolchain base-devel yasm nasm
      pacman --needed -Sy mingw-w64-x86_64-cmake git python-pip
      pacman --needed -Sy mingw-w64-x86_64-meson mingw-w64-x86_64-ninja
  6. Open git console and clone the source code from oneVPL-cpu repository:
    git clone https://github.com/oneapi-src/oneVPL-cpu.git
    cd oneVPL-cpu
  7. In the command line console, build and install the CPU runtime library:
    set VPL_INSTALL_DIR= C:\User\developer\Document\oneVPL-build
    script\bootstrap
    script\build
    script\install
  8. (Optional) Enable H.264 encode. By default, H.264 encode is not enabled for licensing reasons. 
    export VPL_INSTALL_DIR=/opt/intel/oneVPL-build
    script/bootstrap gpl
    script/build gpl
    script/install

Install Intel Graphics runtime and development packages

  1. Install prerequisite packages:
    apt-get update && apt-get install -y --no-install-recommends apt-utils build-essential ca-certificates cmake  gnupg  libdrm-dev libdrm2 libpciaccess0 libva-dev libva-drm2 lsb-release  pciutils software-properties-common  strace  vainfo  wget
  2. Enable Intel Graphics package repository for Ubuntu 20.04:
    wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | apt-key add - && \  echo "deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main" > /etc/apt/sources.list.d/intel-graphics.list
  3. Install Intel® Media SDK GPU media accelerator runtime:
    LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri
    LIBVA_DRIVER_NAME=iHD
    apt-get update && apt-get install -y --no-install-recommends intel-media-va-driver-non-free libmfx1 libmfx-dev

Install GPU Implementation of oneVPL from Open Source

Intel® Media SDK depends on several packages, which are identified and checked for the proper version during configuration stage. Make sure to install these packages to satisfy Intel® Media SDK requirements.

Prerequisites

Building the GPU packages requires several prerequisites. Specific versions tested with each release are listed with Intel® Media SDK releases on GitHub*. For example, for Intel® Media SDK 20.5.1 release, there the following prerequisites:

  • Intel Media Driver
  • Gmmlib
  • libva/libva-utils
  • libdrm
  • Cmake (version 3.6 or higher)

Build Steps

  1. Get the sources with the following Git* command:
    git clone https://github.com/Intel-Media-SDK/MediaSDK msdk
    cd msdk
    

    Note: To get full Intel® Media SDK sources bundle, it is required to have Git* with LFS support.

  2. To configure and build Intel® Media SDK, run the following commands:
    • To build everything by default: 
      mkdir build && cd build
      cmake ..
      make
      make install
      
    • To build only the runtime component, run the cmake command with the -D option:
      mkdir build && cd build
      cmake .. -D <list what to turn off>
      make
      make install
      

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.