Hacker News new | ask | show | jobs
by ynak 3500 days ago
I'm taking a more drastic way; turning media.{mp4, webm, ...}.enabled into False never let YouTube and other media autoplay(even play nomally) without any addons. When I want to watch videos, download them by youtube-dl and watch locally.
4 comments

You download YT videos before watching them? Seriously? Sometimes the suggestions on HN are literally insane in the amount of effort people go through to avoid things that wouldn't be a problem in the first place if you did something simple like use adblock software.

I saw some other post where a guy hand edits tens of thousands of entries in his hosts file... yeah dude what an amazing use of time.

Watching later with youtube-dl is actually the recommended way to do YouTube on OpenBSD; various "OpenBSD as a desktop OS" tutorials mention it, and in practice it works very well. On that particular OS it is due to the lack of a native Flash plugin, but even with YouTube offering most of their videos via HTML5 it actually makes for a better experience to download and then view them. I'd imagine it could even be automated trivially, by calling youtube-dl via a browser plugin, or by writing a script to pass YouTube URLs to with a simple GUI thrown together in FLTK or TCL/TK.

As for the hosts file, a hand-edited file works great, and you don't have to do thousands of entries on your own. You can find some great examples all over the web, then tune them to your own needs, saving a lot of time. For example, there are at least two out there for Windows 10 users to block all communication with Microsoft's servers, avoiding any telemetry and tracking by the OS. If your router is smart enough, you can even upload your hosts file to it to block any device on your network from getting ads and being tracked.

> actually makes for a better experience to download and then view them.

Can you specify how? I was doing this when I didn't have enough RAM for the Youtube player with latest Firefox and it's not what I personally felt. The current player has size options (larger or full-screen), annotations and comments can be disabled (e.g. with Adblock lists). In the end it's always having the video canvas in front of your eyes. Maybe integration with a tiling WM?

> I'd imagine it could even be automated trivially, by calling youtube-dl via a browser plugin, or by writing a script to pass YouTube URLs to with a simple GUI thrown together in FLTK or TCL/TK.

Existing means for VLC integration aren't that bad either.

> Can you specify how?

For me it was because Firefox on OpenBSD, even on a modern, fast system (quad core AMD64 with 8GB RAM), is so slow and stuttery with any streaming video it was too painful. Using youtube-dl and playing it via mplayer worked much better, and you can customize mplayer's controls to mimic YouTube's if you like (though I never bothered).

VLC is another great option, it's designed for streaming so yes that would be a great alternative. I personally don't use VLC on non-Windows OSes except on Haiku.

I've used to employ a similar work flow to GP until a few years ago when video support finally got acceptable in web browsers. I still download talks rather than watch them on youtube or if I want to insure the future availability of the video.

If the current web works well for you then great, but it would be naive to think that it fits everyone's use case (Even more so to label what they need to do as "insane").

there are browser addons that directly pass the current site's URL to mpv, which in turn uses youtube-dl to fetch the contents. so it's pretty much 1-click playback.
> You download YT videos before watching them? Seriously?

I do this because the YouTube website (when the player is present) is too slow for my device. It adds about 5 seconds, nothing terrible.

the change to the hosts file is actually a really good idea. it is reliable and doesn't trip up ad blocking detectors. perhaps its greatest benefit is that it's a change that only has to happen once and everyone else who also wants to can benefit from it [0]. so your assertion is valid, even though it was sarcastic, that it is an amazing use of one's time.

[0] https://github.com/StevenBlack/hosts

Link to the guy who does this?
It might be this one from another comment

https://github.com/StevenBlack/hosts

    #!/bin/bash
    url=`xsel`
    notify-send "Downloading - $url"
    youtube-dl -o - "$url" -f 43 | mplayer -
Whatever is in your default xsel buffer gets streamed to mplayer, if you bind it a keyboard shortcut (I use alt+shift+y (for Youtube)).

Makes life a lot more convenient :)

Why would you want that?
One good reason for me personally is to insure future availability. As I type this, there are a couple of videos in my watch-later playlist that have been replaced with "video removed".
My Watch Later is like 100 videos long. Ain't nobody got time for that.
youtube-dl can download lists of videos.

It also automatically doesn't download things you already have, so it can be used periodically to sync the list if you want.

It only really matters if you expect videos to go down, but I also have my small collection of "videos that were obviously going to be taken down".

This is one of the best features (apart from channel backups).

I think because of its name people also don't realize that youtube-dl works for LOTS of other sites and it's relatively easy to add new sites in as well.

You're posting on HN, I would think you would find a way to automate it. ;-)
I believe youtube-dl is capable of downloading entire lists, but I don't know if the watch-later list behaves as a normal list. One way to find out.
I use butterflies to watch videos http://xkcd.com/378/