Does mpv Support AV1 Hardware Decoding?
Yes, mpv fully supports AV1 hardware decoding on compatible modern graphics cards. However, because mpv prioritizes playback reliability, hardware acceleration is disabled by default. To utilize your graphics card’s dedicated decoding hardware for the computationally intensive AV1 codec, you must explicitly enable it via command-line arguments or within your mpv configuration file.
Prerequisites for AV1 Hardware Acceleration
To successfully offload AV1 decoding from your CPU to your GPU in mpv, your system must meet specific hardware and software criteria:
- Supported Hardware: You need a graphics card with a dedicated AV1 hardware decoder. This includes NVIDIA GeForce RTX 30-series (Ampere) or newer, AMD Radeon RX 6000-series (RDNA 2) or newer, and Intel Arc (Alchemist) or newer GPUs.
- Up-to-Date Drivers: Ensure you have the latest stable graphics drivers installed for your operating system.
- FFmpeg Integration: Because mpv relies on FFmpeg as its backend backend, your installed version of FFmpeg must be compiled with support for the respective hardware acceleration APIs.
How to Enable AV1 Hardware Decoding
You can enable hardware decoding temporarily for a single video or permanently for all media playback.
1. On-the-Fly via Command Line
To open a video file with hardware decoding enabled automatically, launch mpv from your terminal or command prompt using the following flag:
mpv --hwdec=auto "your_av1_video.mkv"The auto argument directs mpv to look for the safest,
whitelisted hardware decoding method available on your operating
system.
2. Permanent Configuration
To ensure mpv always attempts to use your graphics card for decoding,
you can add the setting to your permanent configuration file
(mpv.conf).
- Windows:
%APPDATA%\mpv\mpv.conf - Linux/macOS:
~/.config/mpv/mpv.conf
Open the file in a text editor and add this line:
hwdec=auto
Verifying Active Hardware Acceleration
While a video is playing in mpv, you can check whether your graphics card is actively decoding the AV1 stream. Press the i key on your keyboard to bring up the on-screen statistics overlay. Look for the Decoder entry:
- If it reads av1 (software), the video is being handled by your CPU.
- If it displays an API identifier like av1 (vaapi), av1 (nvdec), or av1 (d3d11va), hardware acceleration is working successfully.
Alternatively, you can toggle hardware decoding on and off during active playback at any time by pressing Ctrl + h.