💾 Archived View for jacksonchen666.com › posts › 2023-07-20 › 19-49-16 captured on 2024-08-18 at 17:09:46. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-03-21)
-=-=-=-=-=-=-
2023-07-20 19:49:16Z (last updated 2024-03-03 22:08:50Z)
WARNING: This blog post has been marked as outdated. This means that this blog post has not been updated to reflect current information or opinions. It might never be updated as well.
If in doubt, don't rely on the information or opinions in this blog post.
I am currently watching a 30 minute video. The video is on YouTube. I am watching it with mpv. How?
Well, first I asked on the Fediverse about how to use mpv with YouTube, then I got a response for the question.
Here's the mpv configuration that I have, located at `~/.config/mpv/mpv.conf`:
script-opts=ytdl_hook-ytdl_path=yt-dlp ytdl-raw-options=ignore-config=,sub-format=en,sub-langs="en,auto",write-sub= script-opts=sponsorblock_minimal-hash=true script-opts=sponsorblock_minimal-categories=["sponsor","intro","outro","selfpromo","interaction","preview"]
The first line is the most important part. OK maybe not so important. OK actually completely unimportant, because you can just throw mpv a YouTube link and it will play it, even if you have `yt-dlp` but no `youtube-dl` installed.
Yes, you need some kind of YouTube downloader installed. I'd recommend `yt-dlp` since it's much more alive than `youtube-dl` (which had no more releases since 2021).
The second line just allows captions to be turned on. Not sure why the `sub-format` option is given a language, it's for a format in `yt-dlp`.
3rd and 4th lines are related to mpv_sponsorblock_minimal but don't seem to apply. I modified the script to do the same, but the configuration is pretty much the same in my config file and the modified script.
You can install mpv_sponsorblock_minimal by dropping the repo into a folder located in `~/.config/mpv/scripts/`, so the files in that repo would probably be located in `~/.config/mpv/scripts/mpv_sponsorblock_minimal`.
(A test video to test your SponsorBlock setup (warning: nonsense): <https://www.youtube.com/watch?v=Slwai2Jhy_A>)
Also some disadvantages:
The last thing is *getting* videos to watch, since I do still subscribe to a few things.
That... I thought about RSS/Atom feeds but the last piece of the puzzle seems to be finding clients. I thought about vore, but I'm not sure if I want to settle on it...
(Tip: Append channel ID to this URL to get RSS/Atom feed: `https://www.youtube.com/feeds/videos.xml?channel_id=`)
Or you know, I could just use NewPipe SponsorBlock.