diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-04-21 23:12:25 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-04-21 23:12:25 -0700 |
commit | 4f0d99e04c15e999afbe73af3b685a9704927918 (patch) | |
tree | 6bdf6ad7545ff546e17013cb3c47e1a659d1d37d /sh/mpvsel_douyu | |
parent | f7b6653c92b6e20760b79eea49fe21194a7f3e4b (diff) |
add new archive files
Diffstat (limited to 'sh/mpvsel_douyu')
-rwxr-xr-x | sh/mpvsel_douyu | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sh/mpvsel_douyu b/sh/mpvsel_douyu new file mode 100755 index 0000000..a5625f0 --- /dev/null +++ b/sh/mpvsel_douyu @@ -0,0 +1,10 @@ +#!/bin/sh +# references: +# https://www.rockyourcode.com/til-how-to-watch-youtube-videos-with-mpv-and-keyboard-shortcuts/ +# https://github.com/mpv-player/mpv/issues/7792 + +url=$(xsel -ob) +case $url in + *'douyu'*) alacritty -e mpv "$(basename "$url" | python "$HOME/programs/real-url/douyu.py" | tail -1)" & ;; + *) mpv --ytdl-format='bestvideo[height<=?900][fps<=?60][vcodec!^=?vp9][vcodec!^=?av01]+bestaudio/bestbestvideo[height<=?900][fps<=?60][vcodec!^=?vp9][vcodec!^=?av01]' --ytdl-raw-options='write-sub=,sub-lang="en,en-US,en-GB,zh-CN,zh-Hans,zh-Hant,zh-HK,zh-SG,zh-TW"' --fs --speed=2 --af=rubberband=pitch-scale=0.981818181818181 "$url" ;; +esac |