For streaming youtube, is MPV/yt-dlp better than browser/ublock?

I am aware alternative frontends like Piped and Invidious exist, but they seem to be mostly broken these days.
But since yt-dlp somehow works without any issue most of the time and gets updated quickly, they can offer decent experience.

I’m curious if there is a way for YouTube to track users when they use MPV and yt-dlp to stream their videos, apart from ip address since that could be easily mitigated via VPN.
Could they somehow fingerprint users in this case?
If not, is this better than using official YouTube website on a privacy-focused browser paired with ad block extension like uBlock Origin?

I am currently using iina as a gui frontend for this.

YT still works without ads with uBO properly configured. It also works with Freetube app.

I recommend changing your browser settings such that every time you open, it opens with cookies, site data, cache deleted so it’s a “fresh” new session for you. This way, YT won’t know your history and won’t try to block or misbehave too much. I also recommend choosing a right location in the VPN if using one. I go with Switzerland, Albania, Estonia, and a couple other EU countries at most for the most part. But if you want more relevant content and want the algorithm to work for you, it will or should never block you if you use it signed in.

Let’s not confuse two different things. Invidious and Pipes is a front-end, like you said. It doesn’t work well, because it isn’t really integrated with youtube. It acts like a proxy for the service.

yt-dlp on the other hand is a video downloader. Pretty much the best I’ve seen, most compatible not only with youtube, but with internet videos in general. When you’re using yt-dlp it’s like buffering whole video at once and saving it to a file. The program fetches every element of selected video and saves it to hard drive.

With that out of the way, define ‘track users’.
When you download a video, youtube only knows that you have opened that video and fetched a lot of data from the site (during the download). They don’t have analytics about how you are watching the video, how fast you click, how interested you are. That’s a win for me. Enough to use yt-dlp on daily basis. Not to mention I don’t have to deal with poor buffering that youtube is slowing down if you’re a free user.

When you download a video and watch it through players like VLC or MPC-HC, it’s local. If you care about privacy you can always disable internet access for them in your firewall.

Can youtube fingerprint users with yt-dlp? As far as I know, not really. Fingerprinting works mostly through your browser - with the usage of JavaScript, cookies, and browser settings. I may be wrong, but yt-dlp communicates in a much simpler way with for example (probably) HTTPS requests that carry much less data.

In any case, it is still better than using official Youtube website. Youtube makes the most money on analytics and ads. What videos you picked next, what is your attention span at certain points in the video. Everything is tracked, including your movement and its speed. Disabling Javascript can help, but it breaks most of the websites. I’m not even sure if youtube works without JS today. Ublocks won’t really help with that, because you have to communicate with the site in some way. And they’re using that to send your data as well.

1 Like

YT still works without ads with uBO properly configured.

This is not a matter of youtube working with blockers.

The user is more concerned about the data and usage analytics he is sending while watching youtube.

For future reference, if a person wants to still use the offcial Youtube website, it is indeed the best practice to clear all browser data during exit. Chrome has this setting really hidden, it’s much easier to set up on firefox. Yet it doesn’t change the fact, that when you watch a video, you send your usage data from your IP to Youtube. After clearing the browser data, Youtube will still know it’s you because of your IP. Obviously you can change the IP if you use a VPN, but for me that’s too much of a nuisance. yt-dlp works for me so much better.

it will or should never block you if you use it signed in.

I think you might have misunderstood OP. He is trying to reduce amount of collected data about him (asking about fingerprinting, tracking users).

Signing in makes all of it useless.

When you are logged in, all your data including usage and tracking is linked to your account. You don’t even have to care about your fingerprint, since your fingerprint is your account ID.

1 Like

You are saying it yourself and what I said/implied too:

So proper browser settings negates any if not most issues with watching it on YT directly.

Yes I know. Most of us here know this. You’ve only restated the obvious but alright..

Yes, I know. Info and details on my comment explains and mitigates this issue/concern for the most part.

You’ve again stated the obvious. I also did say that OP wanted relevant and better suggestions.. that’s a big if but you missed accounting for any of the details and rationale with which I commented in your response to mine. I don’t get it..

So proper browser settings negates any if not most issues with watching it on YT directly.

Not really. You didn’t provide explanation on what are “proper browser settings”. It’s about extremely tuning your browser. Like I’ve said before, turning off JS (which is probably the component that tracks you the most) will pretty much ruin your experience with most of the sites, including youtube. Can you say with confidence that you can navigate Youtube efficiently without JS?

Even then, setting up your browser in such a specific way creates a very unique fingerprint. Which is exactly what the OP is concerned about. It’s like with DNT header. Sites may or may not comply with that, but setting it to ON creates a more unique fingerprint and still tells the site something about you.

And even THEN youtube can get its hands on your data with their analytics domains. You would have to set up a DoH with a filter in place in order to block it, or at least create your own filter in Ublock.

Yes I know. Most of us here know this. You’ve only restated the obvious but alright..

If a user is asking a question, I am trying to provide a response that will be helpful also for the outsiders. Please do not assume that “everyone know everything” , there are newcomers that wouldn’t know about fingerprinting, or how browser settings influence your online presence.

restated the obvious but alright..

Many users on the web believe that VPN is making them anonymous. I explained how using youtube with VPN differs from downloading a youtube video through yt-dlp. I don’t see any issue with that, especially because it’s completely relevant.

Info and details on my comment explains and mitigates this issue/concern for the most part.

I wouldn’t call “signing into your youtube account” a mitigation for the concern of your privacy. Not even in the slightest.

You’ve again stated the obvious.

… Why do we even ask questions? Is anything worth explaining if there’s another person for which everything is too obvious?

wanted relevant and better suggestions

Better for you, maybe? I tried to show both sides of the issue and let the OP decide. I use yt-dlp because I believe it is much more private. I have provided the concerns I have with using browsers, even if you would tweak them right.

I really don’t see why wouldn’t you recommend yt-dlp. At the same time, if you still want to use Youtube site, I am trying to provide information on how youtube collects your data. Without the usage of a web browser, the data collection is much more limited.

And I don’t get it why didn’t you provide any information on yt-dlp. In my eyes it’s a great tool to omit visiting youtube altogether.

PS yt-dlp also applies to de-googled devices. You don’t have to use youtube at all besides downloading a video. That’s pretty much all information they can get on you.

2 Likes

@JG unless you would provide a reason for why yt-dlp shouldn’t be used, I will ignore your responses.

Thanks for the response.

Yeah, that makes sense. Preventing fingerprinting on browser is notoriously hard, so I guess yt-dlp is better in most cases.

I was also wondering could “streaming” via yt-dlp + mpv slightly worse than “downloading” via yt-dlp in terms of privacy, but I guess they are quite similar…?
I’m not sure if yt-dlp actually uses different method for each of them.
Hope someone more knowledgable about inner workings of yt-dlp and mpv share some insight.

I did create some script that fetches the latest video info from each channel, downloads video, and stores it to the Jellyfin library so it can be streamed locally whenever I want, which is working decently as sort of a “subscription” feed.

But sometimes I have to browse and watch random YouTube videos, so I was planning to use Invidious (with VPN) to search for videos and get url of it (Since general search and browsing in invidious still seems to be working smoothly), and use yt-dlp/mpv setup to stream the actual video.
Per xardas and my understanding, this seems like a decent way of streaming YouTube, does anyone think this scheme is flawed in privacy perspective?

Kind of out of topic, but can anyone explain why yt-dlp is so good? YouTube seems to be very successful at blocking frontends like Invidious and Piped from fetching information from their server, but I haven’t experienced any major long-term issues from yt-dlp. What makes the difference?
I know they are fundamentally different, Invidious and Piped is whole website with complex frontend and backend elements, and yt-dlp is just a downloader installed on desktop. But what makes difficult for Invidious and Piped backend server to fetch videos from Youtube, while yt-dlp works flawlessly on personal desktop computers? Is it just because of some ip ban/rate limit enforced to Invidious/Piped server instances?

I never commented to claim that should not be used. My comment was meant to explain contextual alternatives.

You do you. Ignoring my comments is not going to hurt me. Relax.

1 Like

I am not familiar with mpv app, so I can’t really tell you. If I’m getting this right, in this case mpv is just playing file fragments downloaded by yt-dlp? In that case I can tell you that this is much more private than using youtube through your browser.

I don’t think so. Video on youtube consists of hundreds of fragments. Yt-dlp simply downloads fragments of a video. The only connection to youtube you should be making is at this point. You tell Youtube servers that you are going to download these video fragments. Next, these fragments should be sent to mpv video player. From my point of view, the player doesn’t even have to have internet connection. If yt-dlp supports streaming these fragments to mpv I see no issue with that.

So, to put it simply:
Youtube servers —> yt-dlp —> mpv
At least that’s how I see it. Dunno why mpv should make connections to youtube.
Also, yt-dlp (and possibly your script) is the only place where you contact youtube. Without actually watching a video in your browser you avoid A TON of trackers, ads, and scripts that track your usage.

Hey, that’s how I’m using yt-dlp on my phone :smiley:
After downloading my video I open it up in VLC. I think it’s similar in your case, with the exception of streaming said fragments.

When you open up a youtube video in browser, it needs to buffer. Your browser downloads first few fragments of the video.

Yt-dlp does exactly this, but for a whole video at once, and combines it into a full video.
At the end of the day, youtube videos are still files, but cut into very little pieces that are hard to download.

Why is invidious failing - that I don’t know. Like you’ve said, probably bandwidth rate limit. When I try to download more videos on my device, yt-dlp also slows down (Youtube wants you to watch videos through the browser). But because I never had an instance of invidious on my local machine, I can’t really tell.

Nice! You actually gave me an idea or two for my setup :slight_smile: