Below you will find pages that utilize the taxonomy term “Cookies”
Logs
read more
Solution to the Failure to Pass Cookies into yt-dlp When Using mpv
Issue Description
When using mpv to play videos from Bilibili, users may encounter issues where mpv fails to pass cookies to yt-dlp correctly, regardless of whether the cookies are already in Netscape format, leading to error messages like the following:
→ mpv --cookies-file="~/bilibili_cookies.txt" --ytdl-raw-options=format=100028+30280 https://www.bilibili.com/video/BV1HMH7z4ES4
[ytdl_hook] ERROR: [BiliBili] BV1HMH7z4ES4: Requested format is not available. Use --list-formats for a list of available formats
[ytdl_hook] youtube-dl failed: unexpected error occurred
Failed to recognize file format.
The format 100028+30280 is a valid format on Bilibili, but only extractable when the user is logged in, which requires the correct cookies to be passed to yt-dlp, which is the default backend for mpv to handle online video playback.