As of October/November of 2025, to be able to download from YouTube, yt-dlp requires a Javascript engine. Of the ones it supports, only a couple are available on Haiku at the moment (and only one on x86_32 bits: "quickjs").
So, for that use case, you'll need to:
* Install either the "quickjs" or "node" packages:
"> pkgman install cmd:qjs" or "> pkgman install cmd:node"
* Let yt-dlp know which one to use, for example:
"> yt-dlp --js-runtime quickjs <youtube_url>"
Note: you might also need to pass appropiate cookies (with "--cookies-from-browser firefox" and/or, "--cookies <cookies_filename.txt>". Consult the documentation for more details.