Show HN: Firefox add-on to open YouTube videos in alternative front ends (github.com)
YouTube started blocking me because I use an adblocker. So I made this simple Firefox Add-On (haven't made it cross-browser yet, contributions welcome!) to open videos in alternative front-ends (piped.video by default).
Default keybinding: Alt+J to reopen current page in the configured frontend.
Shift+Click to open any video in a new tab in the configured frontend.
You can change the default frontend to something else if you like.
134 comments
[ 2.7 ms ] story [ 195 ms ] threadIt's always nice to see new efforts in this space.
[1] https://addons.mozilla.org/firefox/addon/libredirect
[2] https://github.com/libredirect/browser_extension
But I can’t stand anymore to be on Twitter or Medium so it is a must. I also use it for Youtube, stackoverflow.
I’m a bit confused by the current project because there are litteraly tenths of Youtube->invidious/alternative frontend and I don’t understand why this one is different.
One of the goals from https://github.com/mushroomlabs/fediverser is to mirror reddit discussions into different Lemmy instances. This coming week I'm planning to work on the part that lets you connect your reddit account to a respective Lemmy instance and migrate your posts. Would you like to try it out?
[1] https://addons.mozilla.org/en-US/firefox/addon/yt-siphon/
Combined with my private invidious instance so I can subscribe to channels without this data leaving computers I control.
May your own extension succeed too. I guess building it and releasing it are already two successes on their own.
It’s likely to come and go as they fight an arms race.
Nitter on the other hand has been doing fine on my end. Instances with heavy traffic, such as nitter.net, do frequently run into rate limiting errors. But if you use relatively more obscure instances, then almost nothing has changed.
nitter.nl/net work, but without RSS.
Many of the other instances have become unreliable.
[1] https://freetubeapp.io
It keeps everything in the browser while still being local to the machine
This however gives you the choice to open the pages you want in an alternative frontend.
My use case is basically I browse the YT homepage and Shift+click the videos I want to watch. Or if someone shares a link to a video, I access that page and Alt+J to redirect to the alternative frontend.
The default alternative frontend I have configured is https://piped.video , but you can use any different instance / service if it supports the same YouTube url scheme ({domain}/watch?v=...).
This is configurable in the add-on's options page, you can also access it by clicking on the add-on's icon
It sounds like there is some kind of instance/server which my client/with a cleaner frontend will talk to.
But how does that work and why can youtube not detect it and block it?
This describes how it works at least tiny bit:
>Invidious does not use the official YouTube API, but scrapes the website for video and metadata such as likes and views.[10]
- Piped [1] uses NewPipeExtractor [2] (which is also used by NewPipe) to parse YouTube responses. I assume this is somewhat similar to what yt-dlp [3] does ?
- Invidious states in their FAQ [4]: "By default, the video stream is fetched directly from Google's servers (googlevideo.com)".
[1]: https://github.com/TeamPiped/Piped
[2]: https://github.com/TeamNewPipe/NewPipeExtractor
[3]: https://github.com/yt-dlp/yt-dlp
[4]: https://docs.invidious.io/faq/#q-what-data-is-shared-with-yo...
Google uses DASH as the manifest file for streaming video. Each video has a corresponding DASH file. You can download the DASH manifest XML file from the Youtube page for the video. Then extract video segment URLs from the file. Those typically go to the googlevideo.com host. Google uses WebM as video container and VP9 for video encoding for the video segment, which most browsers support.
Most streaming players (alternative players) use the MSE API (Media Source Extensions) to feed the downloaded video segment data to the <video> tag to play the video. Most browsers support MSE these days.
This infuriating feature provides nothing useful and absolutely murders Apple Silicon GPUs, draining the battery very, very quickly.
[1]: https://www.youtube.com/watch?v=87h0nYi-i9o
edit: turns out there is something already: https://docdrop.org/
For those with ubO who still see them, cleaning the cache and updating the filters within ubO seems to help.
https://addons.mozilla.org/en-US/firefox/addon/ublock-origin...
Basically disable all current ad blockers, including YouTube enhancer ad blocker, reset filters to default, make sure there's no cosmetic filters either. And it should work L.
I just used the picker, removed the elements, saved it, and haven't looked back.
I also did this with the stack overflow nag.
Gonna try the ublock reset as outlined above, failing that I'll test uMatrix to turn off / lobotomise specific scripts.
As a side benefit, invidious can block comments and related videos so it's a better experience.
javascript:window.location=%22https://[your favorite invidious implementation]/watch%22+document.location.search
Somewhere along the path, we've made a terrible turn and allowed the browsers to become agents of the web developers instead, gatekeeping on behalf of web sites, rather than serving the user's interests.
My ideal browser would load up a site like YouTube, and, knowing my already-configured preference for ad-free, minimalist layout, would present it as a Craigslist-style list of links with thumbnails, ignoring the mess of JS and CSS that the site's developer futilely sends.
It was a variation of Eternal September that caused it. ;)
The majority of users became non-technical, so the focus had shifted as browser vendors needed to cater to different audiences.
And maybe more relevant, having this be default behavior would just cause the cat-and-mouse to get worse, when the majority of users are now blocking it with no effort, and the bean-counters notice the ad impression numbers suddenly dropping.
It's like an adult watching a child's idealism and knowing the child is right.
I'm not calling the OP a child, I'm saying the OP is right and the world sucks.
So firefox can't do much about it without actively trying to circumvent YT and YT specifically.
I don't think browsers made the turn you mention. It's more like browsers became more and more capable and web developers made use of it. Sometimes it's annoying because most websites are not websites anymore but apps (GUIs) that run in the browser and some of the web sites/apps people use could never work without it. Sure, we could all deploy those apps onto our machines (or have them deploy automatically in a sandbox) and there were actually technologies that did just that (think java web start or whatever the name ended up being) but they lost to what we have now: running these apps in the browser.
Also, you can't have an ad-free experience if the price of using a service is that the ad is delivered to you. On YT you can buy a subscription and you'll see no ads. But sure, most sites don't offer this.
Just to be very clear, those are not the only two possible options.
YouTube - and Facebook, Google, Whatsapp, etc - are extraordinarily simple concepts. We don't need private corporations running them for profit. In fact, it's turning out really bad for us.
The reason that hasn't happened yet is because whether or not you find YT an extraordinarily simple concept, the execution is tremendously difficult.
I'm not sure why you decided to interpret my comment in the least charitable way.
The fact that you can in fact execute (whatever you want to put in this) a YouTube alternative with a team of less than 100 is easily demonstrated by the fact that YouTube used to be this small at some point…
The cost per user to run most of those platforms is in the pennies range. Certainly under $4 / year / user.
Compare that to the cost of leaving our vulnerable minds - our parents and grandparents, or angry loners, etc - to the likes of Ben Shapiro or Jordan Peterson, who YouTube is weirdly obsessed with.
YouTube is a bit more expensive to run, sure... But the total cost is still a tiny fraction of the tax take, were we to fund a free and fair alternative ourselves.
Btw, expecting a fully viable alternative from a single person before you ever start exploring criticism or alternatives is wildly silly, imo.
Furthermore, in no way have I stated nor implied that I expect an alternative must be implemented by a single person. I think your least charitable interpretation of my comment is wildly silly.
There's no reason why Firefox couldn't do that.
> Also, you can't have an ad-free experience if the price of using a service is that the ad is delivered to you.
Sure I can, uBlock Origin provides exactly that. They are not entitled to my attention. If they have a problem with that, they can return 402 Payment Required.
Also, remember how Mozilla is funded.
Not to Google and its fellow corporations apparently.
https://news.ycombinator.com/item?id=29707078
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/pa...
They have site-specific fixes for their own sites. Instead of fixing their stuff, they fixed the browsers instead. We can obviously apply the exact same strategy to dealing with every single website out there. If a website is broken or generally annoying to use, just fix it by providing a site specific version of the browser.
They don't even need to reinvent the wheel. Port yt-dlp to Firefox. That will fix YouTube and literally every other video website out there. What yt-dlp does should be a core feature of every browser out there. It's that good. uBlock Origin too.
> Who decides what websites get "fixed", and how?
Whoever develops the browser or its extensions. Arguably the whole of uBlock Origin and its filter lists are just databases of site specific fixes. If people can maintain an extremely huge list of advertisers and blockers for every website out there, surely they can maintain something like this.
> Also, remember how Mozilla is funded.
I remember Mozilla has about a billion dollars in the bank. Who cares about their Google funding? I doubt they're gonna drop them anyway. I bet they pay them just to ward off risk of antitrust lawsuits.
> Sure I can, uBlock Origin provides exactly that.
Obviously, I meant that it doesn't work financially so there is no point being upset about it. If enough people block the ads then they'll do something about it. Actually it's not hypothetical anymore, I just started to see these warnings a few days ago. (I wasn't deliberately blocking the ads, I've been just using ghostery which, it seems, started blocking YT ads.) So yeah, in the end, as you also say, people in general can't consume ad supported services without paying with their attention. It just doesn't work business wise.
> Also, you can't have an ad-free experience if the price of using a service is that the ad is delivered to you. On YT you can buy a subscription and you'll see no ads. But sure, most sites don't offer this.
Websites have various models: non-profit, donation-based, advertising-based, tracked-based. A website like YouTube still has high profit margins as they do tracking as well.
One could say: "Google will keep my tracking data secure, because it is in their primary interest to do so in order to be the primary benefactor to their ad revenue." Sure, that holds some merit. Til Google figures a way to circumvent your ad blocker, til Google sells your data to a third party ("partner"), til Google gets hacked (and they were hacked by the NSA).
Data is a toxic asset; I rather give them nothing. But I do understand then they don't want me as customer. Which is why I do have YouTube Premium. But I pay an equivalent to ~2 EUR/month in Indian rupees to keep my family (especially my children; I got NewPipe x SponsorBlock x Return YouTube Dislike [1]) advertising free. And as much tracking free as possible while still using Android TV (too user-friendly to give up on) thanks to Pi-Hole and strict Google account settings [2].
Anyway, yeah, it is the creators problem. All too often creators do have a Patreon or Onlyfans or whatever, or they 'borrowed' the content anyway. Though they do get a hit, so it might be Google's problem. Cause they still get hosting and platform for free.
[1] https://github.com/polymorphicshade/NewPipe
[2] https://myactivity.google.com
The trouble is finding said content. There is a huge conflict of interest due to the most popular search engine also owning the most popular centralised content platform. This should never have been allowed to happen, but here we are.
But more to the point, yes, a browser is a client, but without the economic incentive of either ads or direct monetization from users, many sites, YouTube included, would simply not work. Storage and bandwith costs money. Unless we decided to somehow fund all of this through some sort of additional tax through the ISPs or governments, ads or subscriptions are a necessary evil.
All you are doing is laying down cover fire to support further advances by an abusive monopolist. YouTube's financials don't HAVE to add up. Google owns advertising for the entire Internet! The entirety of YT could be a loss leader just to suppress the growth of streaming video businesses outside of their control, and the Google monopoly would carry on.
Here are behaviors that are fairly unique to monopolies: raising prices while degrading their product. Many businesses try to do these, but monopolies, who have no significant competition, are more likely to succeed. Sure enough this monopolistic behavior is what Google has just exhibited: by banning people who use ad blockers, they have either degraded their product, or raised the price (from $0 to the cost of YouTube Premium for those users), depending on how you look at it.
They can do this because they are a monopoly.
Your subscription money doesn't go to the producers anyway, or only little of it, so the $14/mo is for a large part Google's profit.
I predict youtube will escalate this way:
- Pump up aggressive anti ad block measures.
- It will fail, so they will enforce DRM so that they have control.
- It will not be enough, so they will ask to only serve DRM to "trusted browsers".
- And it will not suffice, so the trusted browser will have to run on a trusted OS checked by hardware.
That will work since almost nobody will take the risk to jailbreak their expensive device.
And we will all have lost.
Or we will all be gone elsewhere ?
HN is the opposite of their market.
They will have no idea, and just assume that's how things are.
HN bubble strikes again.
If you wanted to say "youtube is not important enough for me" then your post reads weird - what is youtube going to get away with? Losing you personally? I think they'll get over it.
Spotify free offer is also proof of that.
That said I do like a well designed sponsor. Map Men for example, I'd rather not watch them.
And yes, the web sites will need to suck it up. You can't choose your visitors...which may occassionally be a bot or screen scraper.
I guess (?) it works for monetization, but the UX of YouTube and their pushing of clickbait content has become horrible over the past few years. I just wish they stopped trying to be "smart" about what I want to watch. I'm already paying for Premium, just give me an option to make Youtube stupid.
You can hide all the other sections using an extension like UnHook: https://unhook.app/
Unhook looks good indeed, I guess I am just a bit frustrated that I need external extensions, many of which are linked in this thread, and hacks to fight against services that try to monetize my attention. Especially when I already pay for them.
Then again, I curate my subscriptions. Nobody I follow posts more than once every couple of weeks or so. Most days my subscription page looks the same as it did yesterday, so when I do have a new video to watch it's more like a rare treat.
Like you said, I'm sure this works for engagement, but it's pretty evil. I know they don't care about being evil anymore; but it's still annoying.
https://support.google.com/youtube/thread/130441859/how-to-d...
Edit: not sure if the above page is up-to-date. On my side the setting is in "Settings - Playback and performance - Integrated playback" (setting name could be different, my interface is not in English so I translated the entry names)
Here's my Redirector rule:
As a parenting control trick, I also use Redirector to direct some of the more immersive gaming sites to about:blank for our 10yo son. Definitely proud of that hack, ha.1: https://addons.mozilla.org/en-US/firefox/addon/redirector/
Install mpv and yt-dlp.
Use play-with addon to open youtube or other video links directly in mpv.
Periodically convert youtube subscriptions into OPML using an userscript.
Import OPML into freetube or other RSS reader to check for new videos.
https://addons.mozilla.org/en-US/firefox/addon/play-with/
https://github.com/theborg3of5/Userscripts/tree/master/youtu...
https://github.com/Thann/play-with-mpv (chrome) https://github.com/Baldomo/open-in-mpv (chrome and firefox) https://github.com/MasterDevX/mpvnet (chrome and firefox)