Automatically setting the relevant title for YouTube videos in mpv
by Hund | October 20, 2018
I was annoyed with the static title “mpv” when I watch YouTube videos via mpv, so I made this little script that automatically sets the relevant title in mpv for me.
#!/bin/bash
title=$(curl -Ss $1 | grep -oE "<title>.*</title>" | sed 's/<title>/img/;s/- YouTube<\/title>/img/')
mpv $1 --ytdl --title "mpv -- $title"
I named it p.sh and you call it with p.sh <url>.
Comments
There's no comments for this post. Use this e-mail form if you would like to leave a /public/ comment on this post. Or simply send me a private e-mail message if you have any feedback, or just want to say hello.