Skip to content

Instantly share code, notes, and snippets.

@nicolasegp
Created November 22, 2018 21:55
Show Gist options
  • Save nicolasegp/0593a6bcd0d5bbf1f17516e6d9793ed3 to your computer and use it in GitHub Desktop.
Save nicolasegp/0593a6bcd0d5bbf1f17516e6d9793ed3 to your computer and use it in GitHub Desktop.
Youtube MPV
#!/bin/bash
# zenity for GTK
# qarma for QT
Pack="qarma"
Url=$($Pack --title "Youtube" --entry --text "Url YouTube")
OP=$($Pack --title "Youtube" --list --text "Select Option" --column "#" --column "Desc." "1" "Only Audio" "2" "Video 480p" "3" "Video 720p" "4" "Video 1080p")
case $OP in
1)
mpv --profile=pseudo-gui --no-video $Url
;;
2)
mpv --ytdl-format="best[height<=?480]" $Url
;;
3)
mpv --ytdl-format="best[height<=?720]" $Url
;;
4)
mpv --ytdl-format="best[height<=?1080]" $Url
;;
*)
$Pack --title "Youtube" --error --text "Cancel Options :("
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment