VPL 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® Video Processing Library (VPL) to FFMPEG. This is an important change because VPL 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 VPL (no more feature additions are being added to Media SDK). All Intel GPU media users are encouraged to switch to VPL to take advantage of hardware capabilities as soon as they become available.

How to enable VPL

The switch to VPL 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 VPL in FFMPEG, even for older Intel hardware. As illustrated in the diagram below, the VPL dispatcher chooses which implementation to load when run.

For newer hardware (Xe Architecture (GPUs) and beyond) the VPL-intel-gpu implementation is loaded. For legacy hardware, VPL loads the Media SDK implementation. (The VPL-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 VPL), as well as implementations calling VA-API/DirectX without VPL.

The *_qsv codecs are implemented with glue code that calls VPL 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 VPL. There are also some DirectX/DXVA2 decoders. 

Future articles will cover comparisons of VPL 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 VPL 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 VPL for specialized encode parameters or algorithms.

Benefits of using VPL 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 VPL. As an example, one of the first places that VPL 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 VPL.  In general, Media SDK represents legacy GPU support and VPL is for current and future Intel integrated  and discrete GPUs.

Legacy Media SDK GPUs (still work via VPL) Intel GPUs enabled by VPL
  • 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.