ytdl_hook.lua: don't pass any format to youtube-dl by default

yt-dlp changed its default format from `bv+ba/b` to `bv*+ba/b`, which we want to follow
since it fixes the behavior with some streaming sites.

The note that "sometimes youtube-dl returns a format that mpv cannot use" was added in
43c13e5ea2 but it's not clear what it refers to.

fixes #16388
This commit is contained in:
sfan5
2025-07-26 21:02:50 +02:00
parent 2168e3d82c
commit a6f3236c3a
2 changed files with 9 additions and 16 deletions
+8 -11
View File
@@ -1004,18 +1004,15 @@ Program Behavior
I have no idea.
``--ytdl-format=<ytdl|best|worst|mp4|webm|...>``
Video format/quality that is directly passed to youtube-dl. The possible
values are specific to the website and the video, for a given url the
available formats can be found with the command
``youtube-dl --list-formats URL``. See youtube-dl's documentation for
available aliases.
(Default: ``bestvideo+bestaudio/best``)
``--ytdl-format=<|ytdl|best|worst|mp4|webm|...>``
Format selection string that is directly passed to youtube-dl.
The possible values are specific to the website and the video, for a given
URL the available formats can be found with the command
``youtube-dl -F URL``. See youtube-dl's documentation for available aliases.
(Default: empty)
The ``ytdl`` value does not pass a ``--format`` option to youtube-dl at all,
and thus does not override its default. Note that sometimes youtube-dl
returns a format that mpv cannot use, and in these cases the mpv default
may work better.
An empty value or ``ytdl`` does not pass a ``--format`` option to youtube-dl
at all, and thus uses its default format selection behavior.
``--ytdl-raw-options=<key>=<value>[,<key>=<value>[,...]]``
Pass arbitrary options to youtube-dl. Parameter and argument should be
+1 -5
View File
@@ -918,11 +918,7 @@ local function run_ytdl_hook(url)
msg.verbose("Video disabled. Only using audio")
end
if format == "" then
format = "bestvideo+bestaudio/best"
end
if format ~= "ytdl" then
if format ~= "" and format ~= "ytdl" then
table.insert(command, "--format")
table.insert(command, format)
end