-- Leo's gemini proxy

-- Connecting to jacksonchen666.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en

YouTube With mpv

2023-07-20 19:49:16Z (last updated 2024-03-03 22:08:50Z)

NOTE: This post is outdated. Information/opinions may not be current.


I am currently watching a 30 minute video. The video is on YouTube. I am watching it with mpv. How?

mpv


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.


mpv_sponsorblock_minimal


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:

Switching resolution?

Feed of videos?


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...


vore


(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.


NewPipe with SponsorBlock


public inbox (comments and discussions)

public inbox archives

(mailing list etiquette for public inbox)

-- Response ended

-- Page fetched on Fri May 10 11:16:55 2024