I'd be a bit more careful with making statements like that here. "The walls have ears."
It's not like Youtube's engineers can't just. Download yt-dlp and see how it works
It's not proprietary
The yt-dlp devs also talk about this openly, in GitHub issues and elsewhere. I think there have been multiple front page stories about how yt-dlp works here on HN over the last few years.