If you have any sense of privacy, you know better than to use Google’s official Youtube clients - not to mention, they’re really kind of terrible.

To view Youtube video comfortably and limit Google’s privacy invasions, the main third-party clients are:

Unfortunately, if you’ve been using those third-party clients for a long time, you know Google plays a game of cat and mouse with them, to discourage users from using them:

  • Google breaks something or other (usually the player API) or Google blocks your IP because it detects a non-Google player.
  • The developers of those clients play catch-up, make their clients work again for a while.
  • Google breaks them again. Rinse. Repeat.

And Google now having free rein to be as abusive as they want under the Trump regime, it’s not getting any better ☹️

The developers who react most quickly to Google’s shenanigans are the FUTO developers behind Grayjay: when Google breaks it, usually they have a fix within hours, if not less. And there’s a reason for that: they’re paid to do it. Incidentally, I encourage you to purchase a FUTO license: it’s money well spent to encourage FUTO. They’ve really earned it.

The Newpipe developers are also fairly quick to fix their client. Not always, but they do a pretty decent job.

Freetube however can take many days to get fixed. For instance, the native Freetube player is currently broken and it’s been broken for a week.

When Google plays with everybody’s balls, if you’re on mobile, at least Grayjay will almost always get the job done, so you don’t have to compromise your privacy and hit the official client.

On the desktop however, unless you have an ARM64 machine and you use Grayjay as a desktop app in Waydroid - which is a totally valid solution that works great, in case you didn’t know [EDIT: this is incorrect: there is in fact an x64 Grayjay desktop client - Thanks @portnull@lemmy.dbzer0.com], Freetube will sadly let you down regularly for a long time.

The official workaround recommended by the Freetube developers when Google breaks their player is to use an external player. But there are two problems with that:

  • If you don’t use the right external players - which Google likely broke too - or the player isn’t configured to use the latest and greatest Google evasion code, it’s not going to work.
  • When spawning Freetube with a URL (typically by LibRedirect from your browser), Freetube ignores the external player and tries to play the video with its broken internal player anyway. You can always manually tell it to use the external player after it’s failed trying to play the video itself, but it’s an extra step, and you end up running both Freetube and the external player just to view a Youtube video from a website.

So I figured I’d post a little guide on how to setup an external video player that works with Freetube (and gets fixed quickly when Google breaks it) and how to spawn it directly from your browser to view a video and bypass LibRedirect / Freetube entirely.

This little guide is mostly for Linux. If you’re not running Linux, the principle should be the same, but the details of how to make this work are different of course.

So the player you need is SMPlayer. SMPlayer is a great mpv player frontend in its own right. Don’t worry, both mpv and SMPlayer are usually available in most distros, so you can install it normally with your favorite package manager.

But the thing that makes SMPlayer great is, to play Youtube video, it can use yt-dlp as a backend to fetch the video from Youtube:

SMplayer preferences setting to use yt-dlp as a backend to fetch Youtube videos

And it turns out, the developers of yt-dlp are usually very quick to unfuck Google’s fuckeries and make it work again. Almost as quick as FUTO’s developers: when Google breaks things, yt-dlp is usually one of the first Youtube clients to start working again.

The problem is, the version of yt-dlp that comes in most distributions is usually hopelessly behind, so it won’t work with your distro’s official package.

To use the latest and greatest yt-dlp with SMPlayer, you need to use the version in the Github repo. To do this:

  • Clone the repo (for example in your home directory): git clone --recurse-submodules https://github.com/yt-dlp/yt-dlp.git
  • Make yt-dlp available in your PATH: ln -s ~/yt-dlp/yt-dlp.sh ~/.local/bin/yt-dlp

Then if you invoke yt-dlp from any directory, it should start it correctly:

$ yt-dlp  

Usage: yt-dlp [OPTIONS] URL [URL...]  

yt-dlp: error: You must provide at least one URL.  
Type yt-dlp --help to see a list of all options.  

Then you can try if SMPlayer now plays a Youtube video correctly: smplayer https://youtu.be/jNQXAC9IVRw

Finally, configure Freetube to use SMPlayer as an external player:

Freetube external player setting

Now try to play a video from Freetube: it should open SMPlayer and SMPlayer should play the video correctly.

When Google breaks yt-dlp again, simply go into the repo and do a git pull --recurse-submodules. Do this regularly until the yt-dlp folks work their magic and fix it, which should happen a lot quicker than fixing the internal Freetube player.

Finally, how to spawn SMPlayer directly from the browser:

  • Install the RunWith browser extension: this little thing is a simple tool to spawn an external program from the browser and it’s really underrated. Not terribly user-friendly to install but it does the job fine.
  • In the RunWith extension preferences, configure RunWith like so:

Setting in the RunWith browser extension to run SMPlayer on Youtube video links

Then if you right-click on a Youtube video link, you’ll get an option in the context menu to open it with SMPlayer through RunWith:

RunWith context menu option

I hope this helps 🙂

  • PortNull@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    19
    ·
    edit-2
    20 days ago

    Great write up, thanks. But I use grayjay desktop on an x64 machine. There’s definitely a desktop app for itoutaode of ARM devices.

  • ZeroHora@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    20 days ago

    Please correct me if I’m wrong but to be really private with yt-dlp you need to use a Proxy no? At least SMPlayer have a option to do it.

    • ReversalHatchery@beehaw.org
      link
      fedilink
      arrow-up
      4
      ·
      20 days ago

      without a proxy google can still connect your watching habits to you by IP, and see how often you pause or rewind, but at least they can’t feed you with garbage you don’t need and can’t fingerprint your client and how you move your mouse.

  • Ardens@lemmy.ml
    link
    fedilink
    arrow-up
    7
    arrow-down
    6
    ·
    20 days ago

    Just stop using youtube…

    Oh, ad Tubular to your list over Android players…

    And then keep asking for videoes on other platforms…

    • ReversalHatchery@beehaw.org
      link
      fedilink
      arrow-up
      1
      arrow-down
      3
      ·
      20 days ago

      and when I ask my favorite creators, what do I bring up as the upside? that it doesn’t have ads?

      that’s not an upside for a lot of them.

      • Ardens@lemmy.ml
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        19 days ago

        Ethics, control over your own content, the possibility to avoid bot-farms, censorship, a more engaged audience, the possibility to make content that is true to the creators wishes, and doesn’t have to conform to algorithms that often change. There’s a lot of upsides to it - but feel free to keep the shitty system going, for your comfort.

  • SwooshBakery624 [they/them]@programming.dev
    link
    fedilink
    English
    arrow-up
    36
    arrow-down
    5
    ·
    20 days ago

    I encourage you to purchase a FUTO license: it’s money well spent to encourage FUTO. They’ve really earned it.

    You should stop promoting FUTO’s proprietary software. It is also against community rules.

  • TheProtagonist@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    20 days ago

    I’m on a Mac, so I have to wait for the FreeTube community to fix the problems getting imposed by Google that is putting all it’s efforts in further enshittification of the YouTube API as it seems.

  • PrincessCory@lemmy.wtf
    link
    fedilink
    arrow-up
    2
    ·
    18 days ago

    We should all switch to Lbry its designed for content freedom. Its like youtube but works like torrent.

    Its open source and much better platform but much less popular also which is what i would like to be changed in the future…

  • MoonMelon@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    19 days ago

    Thanks, this helped. Although I keep yt-dlp installed with pip so for me instead of github it’s just a pip3 install yt-dlp -U.

    • rumba@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      19 days ago

      For consumers absolutely. For creators trying to make a living no so much.

        • rumba@lemmy.zip
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          1
          ·
          18 days ago

          Tell me, if it’s harder to publish and it’s impossible to monetize, what are you going to be viewing?

          • quick_snail@feddit.nl
            link
            fedilink
            arrow-up
            4
            ·
            edit-2
            18 days ago

            Content distributed onto multiple channels, content made by nonprofits, and content made by hobbiests

            • rumba@lemmy.zip
              link
              fedilink
              English
              arrow-up
              2
              ·
              16 days ago

              I mean, peertube is full of that right now and nobody wants to watch it.

              There’s maybe a couple of hours, a week worth of reasonable content and it’s the same handful of people.

              Until somebody figures out monetization on Peerube, the platform will be stuck right exactly where it is now.

      • 1984@lemmy.today
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        18 days ago

        Dont think we all should need to suffer because creators and ad agencies “need” to make a living. The entire internet economy is built on centralized platforms owned by big tech now. It sucks so much.

        Not much remains of the original ideas of the web. People think social media is the web.

        • rumba@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          16 days ago

          Fair enough, no content then. Those people who quite their jobs to make the streams are only doing it because they get paid. They’re not going to spend 60 hours a week moving over to peertube and having to go back to their 9-5.

          All the people who will make content for nothing are already on Peertube. If you don’t want anything else, you’re already good to go.

  • Zarathustra@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    20 days ago

    Thanks for the suggestion to use sm-player via freetube with youtube-dl – It’s been frustrating recently trying to watch the odd video on youtube (which is essentially a monopoly if you ask me).

  • Da Oeuf@slrpnk.net
    link
    fedilink
    arrow-up
    1
    ·
    19 days ago

    Thanks for that - the Freetube/SMPlayer part worked for me!

    What is the full content of the Target URLs field for RunWith? Trying to get that bit working now. Thanks :)

    • MadhuGururajan@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      19 days ago

      who is the thief here? One who wants outsized profit beyond 10 generations of children? Or the average overworked joe who hates dealing with the 3rd 2 minute ad on a 10 minute video?

      Maybe realise that there’s more important things to worry than denying “projected profits” from a billion dollar megacorp which steals regularly from people (in the form of bribing politicians to make policies that benefit them and disadvantage actual people, or destroying the earth for training LLMs, or stealing content to use for the same LLMs)

    • ReversalHatchery@beehaw.org
      link
      fedilink
      arrow-up
      11
      ·
      edit-2
      20 days ago

      I was thinking about it but google does not agree, they continue doing it, so we must do what we can to protect our community privacy

    • ExtremeDullard@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      10
      ·
      edit-2
      19 days ago

      You guys ever wonder if maybe if the answer is to stop stealing s*?

      There are two ways to be honest with normal companies:

      1/ You pay them and they stop monetizing your data
      2/ You don’t patronize their services and you choose a competitor instead

      Unfortunately, with Google as with most other surveillance capitalism monopolies, it doesn’t work that way:

      1/ If you don’t pay Google, they violate your privacy and abuse your data. If you pay them, they don’t stop: you just gave them extra money because you’re gullible.
      2/ Youtube is a virtual monopoly. There is no valid competition to speak of. And unfortunately, a lot of the societal discourse now happens on Youtube. So it’s kind of unavoidable.

      Therefore, Google being the abusive monopoly that it is, you have no way to deal with the essential service they provide honestly and pay your fair share - which I honestly would gladly do - without compromising your privacy. They put themselves in a position to be this abusive.

      Therefore, I consider my duty towards paying honestly for Youtube waived. That’s why I’m happy to pay for a FUTO license for the work they do with the Grayjay client, but I’ll never give Google a cent: FUTO respects me while Google spits in my face.

  • Kailn@lemmy.myserv.one
    link
    fedilink
    arrow-up
    2
    ·
    19 days ago

    Hey!
    Where’s invidious?? the option to self-host your web yt client??
    Or just using yt-dlp?

    (tho, I lightly use yt nowadays, the content is getting satire…)

    • RheumatoidArthritis@mander.xyz
      link
      fedilink
      arrow-up
      1
      ·
      14 hours ago

      Is Invidous still a thing? I tried it earlier this year and it couldn’t play a single video, I gave up after reading about extracting tokens from a google account

  • this@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    20 days ago

    Personally, I use ironfox+unlock+VPN. If it (rarely) breaks, all I have to do is change my vpns exit location.