This is what I’m running:
yt-dlp --user-agent "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0" --cookies-from-browser firefox -f 311 "https://www.youtube.com/watch?v=P9C25Un7xaM"
I assume the problem here is that YT runs stuff browserside to negotiate up to the good stream, but I don’t know.