Allow passing cookies to yt-dlp for get around YouTube restrictions
Vistanz
As we all know, YouTube is getting stricter on usage of yt-dlp now days, and causes trouble on viewing them in VRChat. I have discover a way that can effectively get around it, which is
--cookies
argument.Good news is yt-dlp itself supports accepting additional arguments by putting a
yt-dlp.conf
file alongside with it.But here is the twist, VRChat's custom build took away support of
--cookies
argument, make it no way to do so unless we manually replaces the executable to the original build.Here is how I found it works:
- Creating the config file with provided cookies as yt-dlp documented in the Tools folder: It complains unrecognize --cookiesargument. (Indicates we can use config file passes additional arguments)
- Replaces yt-dlp with official build: It complains unable creates temp directory. (Indicates official build also works for VRChat)
- Use icaclswith/setintegritylevel medium: Works, but everytime VRChat reloads the executable replaced with VRChat custom build. (Indicates previous issue just caused by Windows security design)
So I hope VRChat can at least enable
--cookies
argument for the custom yt-dlp build, the rest can be handle by users themselves (extract login session with browser extensions such as "Get cookies.txt LOCALLY" then feed to yt-dlp with config file).Log In
淫神 Nafryti
it is also in fact against Youtube TOS to use yt-dlp and can get the account banned, it would be easier for VRChat to request an official integration support rather than to support a 3rd parties continued efforts to circumvent a security policy.
Deantwo
yt-dlp was not designed to be used in the way that VRChat is using it. It was designed to be a small tool you can use to download a few YouTube videos, not to endlessly use it to skip ads and embed the videos into a video game.
yt-dlp advises against using cookies, this was mainly just a solution when YouTube was using CAPTCHA to verify users weren't bots. Now that YouTube demand you are logged in to an account, you are more likely to just end up getting your YouTube account suspended for abusing their API and circumventing ads.
I doubt there is a good solution to the issue, aside from VRChat removing yt-dlp and implementing a more standard video embed, basically so YouTube can serve ads to users. Therefore, world creators in VRChat really need to stop relying on YouTube for background music and video hosting.
Deantwo
> ## Exporting YouTube cookies
>
Caution
> By using your account with yt-dlp, you run the risk of it being banned (temporarily or permanently). Be mindful with the request rate and amount of downloads you make with an account. Use it only when necessary, or consider using a throwaway account.
Vistanz
I think it still be safe if your account is premium, since YouTube won't show ads in this case.
Deantwo
Vistanz, I suggest you ask YouTube that, rather than assume that everyone on VRChat has YouTube premium.
If this option is added, and people misguidedly assume there is no risk to enabling it, or is told by friends to just enable it without question. Then all those players would be at risk of getting in trouble with YouTube/Google.
(We know that people will just enable the option with out questioning it. Just look at Quest users and enabling all Very Poor avatars, not knowing how bad it is for their performance and stability.)
Vistanz
No, I never suggests it as a click-to-enable option in the option panel, that would really get users and VRChat themselves in trouble. What I'm asking for is expose one command line argument in their yt-dlp build, that's it, the rest is user's own responsibility on using it.
Deantwo
Vistanz, I would much rather see VRChat just get rid of
yt-dlp
, as I mentioned in my first comment.Vistanz
Just see if VRChat decides to officially partner with YouTube or not.
xantoz・ザントス
Deantwo "a more standard video embed' would require embedding a web browser in VRChat.
This was tried in the early days of VRC but already removed by the time I started VRC due to security issues.
also I've been using yt-dlp outside of VRC with/without cookies archiving entire channels for personal use etc. I've yet to be banned. Make of that what you will. Although I have been throttled before after downloading a lot.