Certainly! Since you're using Hyprland (a Wayland compositor) and mpv configured with GPU video output and PipeWire audio, we can optimize your ~/.config/mpv/mpv.conf for performance, Wayland compatibility, and a pleasant user experience.
Here's an enhanced version of your config with explanations:
# Video output
vo=gpu
gpu-api=wayland # Use Wayland GPU API since you're on Wayland (Hyprland)
gpu-context=wayland # Use Wayland context, important for Wayland compositors
hwdec=auto # Enable hardware decoding (if available), boosts performance and reduces CPU usage
# Audio output
ao=pipewire
# Better video quality & performance tweaks
gamma=auto # Automatically correct gamma
tone-mapping=auto # Tone mapping for HDR videos (if applicable)
interpolation=yes # Enable frame interpolation for smoother video (optional, depends on GPU power)
interpolation-cubic=yes # Higher quality interpolation method
interpolation-steps=2 # Number of frames to interpolate (balance between smoothness and performance)
# Subtitles
sub-auto=fuzzy # Automatically load subtitles with fuzzy matching of filenames
sub-font-size=36 # Bigger font size for better readability on modern displays
sub-color=#FFFFFF # White subtitles
sub-border-color=#000000 # Black border for contrast
sub-border-size=3 # Border thickness to improve subtitle visibility
# Input and UI
osc=yes # On screen controller (useful on Wayland without options like mpv + mpv-osc)
osc-scale=1.5 # enlarge OSC for HiDPI / high resolution screens
input-cursor=yes # Show mouse cursor when inputting shortcuts
# Misc
ytdl-format=bestvideo+bestaudio/best # For yt-dlp if playing online streams, pick best video+audio
cache=yes # Enable disk/ram cache for smoother playback (can reduce stutter)
cache-secs=60 # Cache 60 seconds ahead
demuxer-max-bytes=50MiB # Limit demuxer buffer size (avoid buffering huge amounts)
hwdec-codecs=all # Allow hardware decoding for all codecs
# Wayland tweaks
drm-initial-bits=24 # Colors depth (24-bit color)
force-window=immediate # Spawn window immediately (may reduce latency on Wayland)
# Misc useful tweaks
screenshot-format=png
screenshot-png-compression=0 # Fastest compression for screenshots
# Logging/debugging
log-file=~/.config/mpv/mpv.log # Enable log file for debugging if needed
Explanation / Recommendations:
gpu-api=wayland and gpu-context=wayland ensure mpv uses the native Wayland GPU integration instead of XWayland or Vulkan etc.
hwdec=auto enables hardware decoding whenever supported by your GPU/drivers (VAAPI, VDPAU, VDPAU, etc.)
ao=pipewire lets mpv output audio seamlessly with the PipeWire service, which is the standard audio manager in Wayland setups.
- Frame interpolation (
interpolation=yes) can be turned off if your GPU struggles or you dislike the effect.
- Subtitle settings are tailored for screen readability without making them too intrusive.
- Cache settings improve seeking and reduce playback stutter especially for network files.
- You can tweak the cache size (
cache-secs) depending on the amount of RAM you want to dedicate.
If you want, I can also help you with an example Wayland-specific key bindings file or help setting mpv as IPC client for external control on Wayland.
Would you like me to generate that too?