MPV can open a YouTube URL through its built-in ytdl_hook when it finds yt-dlp on your PATH.
Use yt-dlp for the current downloader flow. The refresh environment ran MPV 0.40.0 and yt-dlp 2025.04.30, then resolved a public YouTube URL in simulation mode.
Install MPV and yt-dlp
Install both packages through your distribution package manager. Debian and Ubuntu users can start with the following command.
sudo apt update
sudo apt install mpv yt-dlp
On Fedora, use dnf install mpv yt-dlp. On Arch Linux, use pacman -S mpv yt-dlp. Package versions differ by distribution, so check the installed versions when YouTube changes its delivery behavior.
Confirm that MPV can find the downloader
Check both commands before opening a video.
yt-dlp --version
mpv --version
MPV searches for yt-dlp through its ytdl_hook.
Open a YouTube video in MPV
Pass the full video URL to MPV and keep the terminal open for any error message.
mpv 'https://www.youtube.com/watch?v=VIDEO_ID'
The command does not download the video by default. MPV asks yt-dlp to resolve available streams, then plays the selected stream in its own window.
Choose a smaller stream when bandwidth is limited
MPV lets yt-dlp choose its default format unless you set a format selector.
mkdir -p ~/.config/mpv
printf "ytdl-format=bestvideo[height<=720]+bestaudio/best[height<=720]\n" >> ~/.config/mpv/mpv.conf
This preference asks for video at 720p or below with audio when that combination is available. Remove the line if it prevents playback on a site that exposes different format labels.
Update yt-dlp when YouTube changes
A YouTube signature or missing-format warning often points to a downloader update rather than an MPV configuration error.
sudo apt update
sudo apt upgrade yt-dlp
The refresh environment resolved a playable format while yt-dlp reported warnings for the current YouTube session.
Troubleshoot common failures
If MPV cannot find yt-dlp, run command -v yt-dlp and expose the executable on your PATH.
Some videos remain unavailable because of age restrictions, region controls, sign-in requirements, or the uploader’s access settings. MPV cannot bypass those controls.
Conclusion
Install MPV and yt-dlp, confirm both versions, then open the YouTube URL with MPV. Add a format limit only when you need it and keep yt-dlp current when YouTube changes its stream delivery.
