oneVPL Enabled in FFMPEG: Achieving Great Streaming Quality on Intel GPUs

Get the Latest on All Things CODE

author-image

By

As part of Intel’s long-term contributions to open source industry standards FFMPEG and GStreamer for media processing, Intel added support for the Intel® oneAPI Video Processing Library (oneVPL) to FFMPEG. This is an important change because oneVPL is Intel’s evolution of the Intel® Media SDK (Media SDK). Going forward, the primary way to access new Intel® GPU media features is via oneVPL (no more feature additions are being added to Media SDK). All Intel GPU media users are encouraged to switch to oneVPL to take advantage of hardware capabilities as soon as they become available.

How to enable oneVPL

The switch to oneVPL from Media SDK in FFMPEG, is simple. Just substitute ‘--enable-libvpl’ instead of ‘--enable-libmfx’ in the configure stage of FFMPEG compilation.  Both options enable compilation of Intel® Quick Sync Video (*_qsv) codecs, which can be used without change from the FFMPEG command line or in applications.

Users can switch to oneVPL in FFMPEG, even for older Intel hardware. As illustrated in the diagram below, the oneVPL dispatcher chooses which implementation to load when run.

For newer hardware (Xe Architecture (GPUs) and beyond) the oneVPL-intel-gpu implementation is loaded. For legacy hardware, oneVPL loads the Media SDK implementation. (The oneVPL-cpu implementation is not used by FFMPEG)

The FFMPEG stack

Many codec implementations are available in FFMPEG. Application developers can choose between CPU implementations, Quick Sync Video (now implemented with oneVPL), as well as implementations calling VA-API/DirectX without oneVPL.

The *_qsv codecs are implemented with glue code that calls oneVPL to implement decode and encode operations.

Decoders Encoders

av1_qsv
h264_qsv
hevc_qsv
mpeg2_qsv
mjpeg_qsv
vc1_qsv
vp8_qsv
vp9_qsv


h264_qsv
hevc_qsv
mpeg2_qsv
mjpeg_qsv


vp9_qsv

The VA-API codecs call VA-API directly through a different implementation to provide decode and encode without using oneVPL. There are also some DirectX/DXVA2 decoders. 

Future articles will cover comparisons of oneVPL vs. VA-API/DirectX implementations.

Users are free to build pipelines with multiple components to match what they need.  For example, VA-API decode with oneVPL encode. The update described in this article only affects the *_qsv codecs, which are intended to provide easy access to Intel hardware capabilities for FFMPEG users.

Applications can also mix and match APIs. For example, decode + resize in FFMPEG, then drop to oneVPL for specialized encode parameters or algorithms.

Benefits of using oneVPL in FFMPEG

Switching from libmfx to libvpl for the *_qsv codecs in FFMPEG provides an easy way to align with future updates from Intel. Media SDK has already had its final feature updates. Even if security fixes force a new release, features will not change beyond Media SDK’s current 1.35 API implementation. New features will be enabled for new Intel hardware in oneVPL. As an example, one of the first places that oneVPL features start to differentiate from Media SDK is AV1 encode.  Intel released GPUs with the industry’s first hardware accelerated AV1 encoder, which can be accessed via FFMPEG.  This approach is written on top of oneVPL.  In general, Media SDK represents legacy GPU support and oneVPL is for current and future Intel integrated  and discrete GPUs.

Legacy Media SDK GPUs (still work via oneVPL) Intel GPUs enabled by oneVPL
  • Intel® Server GPU Series
  • 5th to 10th generation Intel®
    Core™ processors with pre-Xe-
    core processor graphics
  • 11th generation Intel® Core™
    processors with Xe Architecture
    GPUs
  • Intel® Iris® Xe MAX
  • Intel® Arc™ A-series graphics
  • Intel® Data Center GPU Flex Series
  • Upcoming GPU platforms

As an industry FFMPEG standard, FFMPEG is the tool/API of choice for many media applications. With this update, FFMPEG users can easily make use of new media features as they become available while maintaining easy portability between hardware types and vendors.    Intel experts are here to help. We are always happy to get feedback and feature requests. Please let us know in our community forum, if you encounter any difficulties with this upgrade.