Does mpv Support NVDEC Hardware Acceleration?

The mpv media player fully supports hardware-accelerated video decoding using NVIDIA’s NVDEC decoder. Because mpv utilizes FFmpeg as its backend, it can leverage NVDEC across multiple operating systems, including Windows and Linux, to offload resource-intensive video decoding from the CPU directly to dedicated SIP cores on compatible NVIDIA graphics cards. This capability allows the player to smoothly handle high-resolution formats like 4K or 8K while significantly reducing overall system power consumption.

Understanding NVDEC Support in mpv

NVDEC is NVIDIA’s proprietary hardware video decoding API, succeeding the older PureVideo (VDPAU) technology. It supports a wide range of modern codecs, including H.264 (AVC), H.265 (HEVC), VP9, and AV1, depending on the generation of the installed NVIDIA GPU.

In mpv, NVDEC is implemented via two distinct operational modes:

How to Enable NVDEC in mpv

By default, mpv utilizes software decoding to maximize out-of-the-box compatibility and stability across diverse system configurations. Hardware acceleration must be explicitly enabled by the user.

Command-Line Execution

To open a video file with hardware acceleration enabled via the terminal or command prompt, use the following syntax:

mpv --hwdec=nvdec video.mp4

For the copy-back variant, modify the argument as follows:

mpv --hwdec=nvdec-copy video.mp4

Permanent Configuration

To make NVDEC the default decoding method for all video files, the option can be added to the persistent configuration file (mpv.conf).

  1. Locate or create the mpv.conf file (typically found in %APPDATA%/mpv/ on Windows or ~/.config/mpv/ on Linux).
  2. Append the required configuration lines to the file:
# Enable native NVDEC hardware decoding
hwdec=nvdec
vo=gpu-next

Platform Requirements and Dependencies

While the player natively contains the code to initiate NVDEC, specific platform requirements must be met for successful execution:

Drivers and Libraries

Because NVDEC relies on NVIDIA’s proprietary API, the system must utilize the official, proprietary NVIDIA graphics drivers. On Linux systems, open-source drivers (such as Nouveau) generally lack full support for the proprietary NVDEC ecosystem without additional translation layers.

Context Pairing

For the best performance in native nvdec mode, the decoder should be paired with a compatible video output (--vo) and graphics API backend. The modern renderer vo=gpu-next handles the interop between the hardware decoder and the display interface seamlessly. On Windows platforms, users often evaluate native options like d3d11va against nvdec depending on their specific API choices (such as Vulkan or OpenGL).