From ffbe824bb2e9e7a9008a423377864767e6a906e5 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 18 Jan 2024 10:38:31 +0900 Subject: Proof read --- .builds/shell.nix | 2 +- blog/youtu.md | 49 +++++++++++++++++++++++++++---------------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/.builds/shell.nix b/.builds/shell.nix index 3e4cfe0..5b50f03 100644 --- a/.builds/shell.nix +++ b/.builds/shell.nix @@ -1,7 +1,7 @@ with import {}; mkShell { nativeBuildInputs = [ - julia nodejs nodePackages.katex python3Packages.formbox + julia-bin nodejs nodePackages.katex python3Packages.formbox ]; shellHook = '' diff --git a/blog/youtu.md b/blog/youtu.md index 4be894b..6c188d2 100644 --- a/blog/youtu.md +++ b/blog/youtu.md @@ -8,7 +8,7 @@ tags = ["fun", "recipe", "net", "nix", "clipboard"] In today's episode of [guides nobody asked for and likely having been covered by someone more qualified][idgaf], lemme show you -the **correct** ways to view videos hosted on YouTube and other +the _correct_ ways to view videos hosted on YouTube and other hostile, tracker-riddled hellscapes. Whilst I despise Google's mass surveillance practices, it stores a large proportion of culturally significant videos and clips that would be difficult @@ -19,10 +19,10 @@ Because of YouTube's circumvention of advertisement blockers, the ad-blocking arm race finally caught mainstream media attention and tis kool to talk about that now. Hence I'm happy to jump on the bandwagon, albeit a wee bit late, but this ain't just that. -I feed you poison—over 4% of the pages linked from my site -are on YouTube—so the least I can do is sell you my cures. +Since I feed you poison—over 4% of the pages linked from my site +are on YouTube—the least I can do is sell you my cures. -## Using a Real Media Player +## Using a Proper Media Player The most popular solutions are either to use for a good blocker on a browser with (supposedly) long-term support for [Manifest V2] @@ -42,15 +42,15 @@ Just drop the URL into an mpv window and [boom], it werks! Either [drag-and-drop] or invoking `mpv $url` is quite convenient, but not that close to following an anchor, is it? You'd need -to first open mpv or a program launcher (or a terminal emulator), -then drag the URL there, or perhaps copy and paste it for the latter cases. +to first open mpv or a program launcher[^launch], then drag the URL there, +or perhaps copy and paste it for the latter cases. What if you [gotta go fast], aye? As a [hedgehog-maxxer] meself, of course I can do better, and here's how. ## With a Browser Add-on While drafting this article, I noticed that the _ff2mpv_ extension I was using -had technically been [non-free][pacifist] for a while. Although I understand +had [technically been non-free][pacifist] for a while. Albeit I understand and respect the author's noble intention against violence, I believe discrimination never ends up helping those oppressed due to the power imbalance for the exclusion false-positives to be worth it. @@ -100,11 +100,11 @@ an extension's ID and download URL, search for it in [Mozzarella]. ``` Even though Mozzarella is supposed to only show libre add-ons, be aware -that the metadata it crawls from addons.mozzila.org might not always +that the metadata it crawls from [addons.mozzila.org] might not always be [correct][ff2mpv]. Ideally, browser extensions should be packaged in the distribution's repository, but packaging discipline is not exactly NixOS's strong suit. I will probably post an update on how to declare -policies.json in Guix once I figure that out. +`policies.json` in Guix once I figure that out. ## From a Feed Reader @@ -116,23 +116,24 @@ YouTube still provide Atom [feeds] for syndication. Funny enough, they are advertised on the channel pages as RSS: ```html - ``` The referenced feed employ [Media RSS] to communicate the video URL. This extension is widely supported by feed readers, as well as the previously mentioned feed-discovery mechanism. I use [Liferea], -which allows me to directly paste the YouTube channel's URL -(`https://www.youtube.com/@…`) and displays each video's description, -thumbnail and enclosed media, e.g. +which allows me to directly paste the YouTube channel's URL[^ytc], +and displays each video's description, thumbnail and enclosed media, e.g. ![Liferea in action](/assets/liferea-youtube.png) For each MIME type to, enclosures can be configured to be opened by a user-preferred program. In this case, I set `mpv --ytdl-format=b` for `application/x-shockwave-flash` (a reminiscence of a time -when browsers needed [Flash] to play to play videos and animations) +when browsers needed [Flash] to play videos and animations) for the _second_ best quality to save some bandwidth. YouTube encodes the highest resolution video separate from the audio, so the best combined format `b` is one level lower than yt-dlp's default best video @@ -143,8 +144,7 @@ and best audio together. People also share videos with me via instant messaging. I find it cumbersome to open the URL in the browser then redirect it to the media player, so the clipboard is used as the bridge instead. -To do this, I simply create a key binding to the command below. -On [Wayland], replace `xclip` with something equivalent. +To do this, I simply create a key binding to the command below.[^wl] ```sh mpv --ytdl-format=b "$(xclip -out -selection clipboard)" @@ -155,26 +155,30 @@ mpv --ytdl-format=b "$(xclip -out -selection clipboard)" There, I shared how I do it so [you can too]! If they seem needlessly complex, you share my disappointment on the UX evolution of the mainstream web. I dream of a more semantic web, not necessarily -web 3.0, but perhaps just a more explicitly typed web, where e.g. -a YouTube URL for embedding would be a `video/webm` instead of a `text/html`. +web 3.0, perhaps just more explicitly typed, where e.g. a YouTube URL +for embedding would be a `video/webm` instead of a `text/html`. -If `mailto` URIs can open our email client, and social media pages +If `mailto` URIs can launch our email client, and social media pages can bug us to open the post in their own app, why can't we have -interoperable media handling? Maybe we should, but I'm not sure we can. +interoperable media handling? Maybe we should, but I'm not sure if we can. [Greed] stands in our way. Providers force us to use their proprietary [malware] to consume their service. [DRM] has become the foundation of media distribution. Grassroots movements like [Framasoft] might never reach mainstream status. -I don't mean to tell you to give up however, just to direct your energy +I don't mean to tell you to give up though, just to direct your energy to where it matters. Spend less on developing [alternative front-ends] than on ethical replacements, bridges and inviting people over. -We need more [videos], more [music], more [podcasts], more [knowledge] +We need more [videos], more [music], more [podcasts], more [knowledge], better [instant][xmpp] [messaging][matrix], better [search engines], better [translations], better [home] [automation][platypush], and whatnot. Against all odds, maybe things will finally start to improve even for those outside of our bubble. [Perchance.] +[^launch]: Or a terminal emulator +[^ytc]: Something starting with https://www.youtube.com/@ +[^wl]: On [Wayland], replace `xclip` with something equivalent + [idgaf]: https://www.alexmolas.com/2023/07/15/nobody-cares-about-your-blog.html [Manifest V2]: https://github.com/uBlockOrigin/uBlock-issues/issues/338#issuecomment-1332300191 [uBlock Origin]: https://ublockorigin.com @@ -196,6 +200,7 @@ even for those outside of our bubble. [Perchance.] [policies.json]: https://mozilla.github.io/policy-templates [Mozzarella]: https://gnuzilla.gnu.org/mozzarella [ff2mpv]: https://issues.guix.gnu.org/68361 +[addons.mozzila.org]: https://addons.mozilla.org [feeds]: https://en.wikipedia.org/wiki/Web_feed [Media RSS]: https://www.rssboard.org/media-rss -- cgit 1.4.1