/mpv-youtube-notify

mpv youtube notification, notify-send youtube video title being watched

Primary LanguageLua

mpv-youtube-notify

⚠ Note: This script is originaly from mpv-notify, I just modify it a little :)


Description

Add desktop notifications to the mpv media player when streaming from youtube, which show cover album and title when the playlist changes.

Features

  • shows youtube video title
  • tries to find load cover art from coverartarchive.org and caches it locally.

Requirements

On recent Debians, do a sudo apt install lua-socket lua-sec lua-posix libnotify-bin imagemagick

How to use

Copy this lua script to ~/.config/mpv/scripts/ so MPV will automatic load it or use direct load like the example below.

Play youtube from list with additional option:

mpv --script=/path/to/youtube-notify.lua --playlist=/path/to/youtube/playlist.lst --term-playing-msg='Title: ${media-title}' --ytdl-format="bestvideo[height<=?1080][vcodec!=vp9]+bestaudio/best" --no-video --shuffle --slang=id,en

Play youtube directly with additional option:

mpv --script=/path/to/youtube-notify.lua https://www.youtube.com/watch?v=SlPhMPnQ58k --term-playing-msg='Title: ${media-title}' --ytdl-format="bestvideo[height<=?1080][vcodec!=vp9]+bestaudio/best" --no-video --slang=id,en

License

mpv-notify was written by Roland Hieber , you can use it under the terms of the MIT license.