ytdl_hook: pass a default format again - #18468
Conversation
This is a revert of a6f3236 with bestvideo* added. Dropping the default format was meant to follow yt-dlp's `bv*+ba/b`, but yt-dlp only selects that when it finds ffmpeg to merge the tracks. Otherwise it falls back to `best`, a muxed format, which is most of the time is not optimal selection.
Since ffd3ae1 hls, and later dash, were opened by libavformat itself from the URL, so the manifest mpv already fetched for probing was fetched a second time. Back then the HLS demuxer copied the user agent and cookies from its own URLContext for the nested requests and there was no io_open hook to intercept them, so this was the only way to get the network options onto the nested requests. Both are gone, the nested requests go through nested_io_open() since 02756c3. Wrap the stream as for every other format, libavformat parses the manifest from it and opens only the nested URLs itself.
Couldn't this be considered a yt-dlp bug? If I'm passing |
It could, but good luck changing that. yt-dlp is designed primarily as downloading too, not external extractor. There are many assumptions made that does not really apply to mpv. It doesn't even have real api. |
No description provided.