Only recently discovered yt-dlp, despite its popularity. However I was wondering if I were to use this, should it be used behind a VPN when downloading videos off public websites?
Not needed (unless the target site is blocked in your country); as the videos themselves are publicly viewable. yt-dlp behaves like a typical viewer to these sites.
If you use yt-dlp like a regular user, you shouldn't have a problem. If you use it to download like a thousand videos at once then YouTube may block you out or rate limit you or something.
If that happens, or that's your use case, then you may need to use a VPN
Personally I run everything behind a VPN. Browsing the web without one kinda feels like a bad idea, like why should I expose my approximate home location to every website I go to and every server I connect to? Why should I let my ISP see which websites I'm visiting? And why should I trust my government to have access to all of that data?
I don't know. A VPN simply replaces your IP with one from their network, but you still have one IP that identifies you, right? So if you are using one tool to access YouTube while being logged into Google on your browser, doesn't that defeat the purpose of the VPN? I mean if Google just stores the IPs that were used to log into accounts they can simply look up who downloaded their videos, right?
That's not true, I just got a "Sign in to confirm you're not a bot" message on the official fucking YouTube website using Firefox behind Mullvad VPN. It's also very common to see this on Piped instances. The invidious team seems to have developed a fix though: https://github.com/iv-org/youtube-trusted-session-generator