Skip to content

YouTube

Iain Smith edited this page Aug 28, 2026 · 1 revision

YouTube

URL can also be a plain YouTube video URL (youtube.com/watch?v=..., youtu.be/..., or youtube.com/shorts/...):

tvdinner https://www.youtube.com/watch?v=wEx-z1TYPKU

mpv already plays these directly via its own ytdl_hook script, which shells out to a separate yt-dlp (or youtube-dl) binary on PATH to resolve the actual stream:

sudo apt install yt-dlp      # Debian/Ubuntu
sudo dnf install yt-dlp      # Fedora/RHEL
pip install yt-dlp           # anywhere else

Not bundled by tvdinner or by mpv itself, on any platform — including the Windows installer. What tvdinner actually adds on top is the i overlay working for a YouTube video the same way it does for anything else.

Metadata

Unlike a local file, a YouTube video's title/uploader/thumbnail are fetched for free from YouTube's own public oEmbed endpoint (no API key, no --tmdb-api-token needed) as soon as playback starts, in the background — i shows them once that lands (mpv's own window title, set by its yt-dlp hook, is untouched either way).

If --tmdb-api-token is given, tvdinner additionally tries a TMDB lookup using that title — see TMDB Ratings & Metadata. --title/--year override it outright; otherwise the title itself is tried as a couple of candidate search strings in turn:

  1. Its first -/| segment — many archive-channel and official-studio titles chain cast names/taglines/genre tags onto the real movie name this way, e.g. "1940 - His Girl Friday - Cary Grant and Rosalind Russell - ..." splits to just "His Girl Friday", and "McLintock! | FULL MOVIE | John Wayne, Maureen O'Hara | Western Rancher Cowboy Comedy" splits to just "McLintock!"
  2. The whole remainder unsplit — a broader fallback for a movie whose real title happens to contain one of those separators itself

Whether or not the title carries a year at all. A successful TMDB match replaces the oEmbed poster/description with TMDB's own poster/synopsis/rating/director (falling back to YouTube's own thumbnail if TMDB has no poster of its own).

Resuming and bookmarks

Resuming (--playback-positions-file) works the same as any other on-demand source — see VOD Browsing & Resume. A YouTube URL also works directly as a bookmark's URL.

Everything else

Clone this wiki locally