How to Disable Hardware Decoding in mpv?
This article provides a straightforward guide on how to entirely disable hardware-accelerated video decoding in the mpv media player, forcing it to use software rendering instead. While hardware decoding can save CPU cycles, it occasionally causes playback artifacts, stuttering, or compatibility issues with certain video codecs and graphics drivers. Below, you will find the precise configuration changes and command-line arguments needed to ensure mpv relies solely on your CPU for video decoding.
Modifying the Configuration File
The most permanent way to disable hardware decoding is by editing
your mpv.conf file. Depending on your operating system,
this file is located in one of the following directories:
- Windows:
%APPDATA%\mpv\mpv.confor inside the same folder as yourmpv.exe. - Linux/macOS:
~/.config/mpv/mpv.conf
To force software rendering, open the file in a text editor and add or modify the following line:
hwdec=no
Setting hwdec=no explicitly instructs mpv to turn off
all hardware acceleration APIs (such as NVDEC, VA-API, or DXVA2) and use
the CPU-bound FFmpeg software decoders instead.
Using the Command Line
If you only want to disable hardware decoding for a specific video or a single session without changing your global settings, you can pass the option directly through your terminal or command prompt:
mpv --hwdec=no video.mp4Verifying the Change
To confirm that mpv is successfully utilizing software rendering
during playback, press the I key
(uppercase āiā) on your keyboard. This toggles an on-screen statistics
display. Look for the Decoder field in the video
section; if hardware decoding is successfully disabled, it will list a
software decoder (such as h264 or hevc) rather
than a hardware-accelerated counterpart (such as h264-nvdec
or hevc-vaapi).