Hardware decoding is disabled by default (
--hwdec=no). Enable it at runtime with the Ctrl+h shortcut, which toggles between auto and no.Choosing a method
1
Try auto first
Start with
--hwdec=auto. This selects from a whitelist of known-safe hwdec methods that the mpv development team actively supports.2
Test all codecs
To see exactly which hardware decoder is being used and for which codecs:
3
Add to config if it works
If hardware decoding works as desired for your content, add it to
~/.config/mpv/mpv.conf:—hwdec values
You can also mix specific API names with special values:
Platform methods
- Linux
- macOS
- Windows
vaapi (Intel / AMD)
Requires--vo=gpu, --vo=gpu-next, --vo=vaapi, or --vo=dmabuf-wayland.nvdec (NVIDIA — recommended)
Requires--vo=gpu or --vo=gpu-next. Available on any platform where CUDA is available.nvdec is the newest and recommended method for NVIDIA GPU hardware decoding. Prefer it over vdpau and cuda.vdpau (NVIDIA legacy — not recommended)
Requires--vo=gpu with --gpu-context=x11, or --vo=vdpau.drm (SoC / embedded)
Requires--vo=gpu or --vo=gpu-next with the DRM backend.Native vs. copy modes
Every hardware decoding method comes in two variants:Native mode (e.g. vaapi)
Decoded frames stay in GPU memory and are passed directly to the video output. Lower overhead, but works only with compatible VOs and may limit which video filters you can apply.
Copy mode (e.g. vaapi-copy)
Decoded frames are copied back to system RAM after decoding. Works with all video filters and all video outputs, at the cost of a copy operation.
--hwdec=auto-copy to automatically select the best available copy-back method:
Hardware decoding + GPU rendering interop
For the best result with native (non-copy) modes, pair--hwdec with --vo=gpu or --vo=gpu-next:
Restricting codecs
By default, hardware decoding is whitelisted for:h264, vc1, hevc, vp8, vp9, av1, prores, prores_raw, ffv1, dpx.
Use --hwdec-codecs to override this list:
When not to use hardware decoding
Known limitations:- vdpau: Forces RGB conversion in hardware; BT.2020, 10-bit, and HDR are not supported correctly.
- dxva2: Always uses BT.601 for RGB conversion; causes incorrect colors on HD/UHD content.
- cuda: Reported to corrupt timestamps in some mixed streams, causing flashing frames. Prefer
nvdec. - mediacodec (Android): Forces RGB conversion; 10-bit support is limited and reduces output to 8-bit.
Fallback behavior
By default, mpv falls back to software decoding if the hardware decoder fails for 3 consecutive frames (--hwdec-software-fallback=3). You can adjust this: