Skip to content

Commit

Permalink
qutebrowser: use yt-dlp to view video in MPV
Browse files Browse the repository at this point in the history
This goes around:

ytdl-org/youtube-dl#29326

The ~/bin/qutebrowser_bin/mpv part is done through a wrapper script (in
another commit).
  • Loading branch information
sim590 committed Oct 13, 2021
1 parent 0a4c237 commit 3d77ab7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions qutebrowser/keys.py
Expand Up @@ -68,12 +68,9 @@
# downloads
config.bind('ed', 'download-open')
# videos (mpv, castnow, youtube-dl)
MPV_FLAGS="--force-window --no-terminal --keep-open=yes --ytdl --script-opts=ytdl_hook-ytdl_path=yt-dlp --ytdl-format='ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9]+bestaudio/best'"
config.bind('xv', 'spawn --userscript ~/bin/qutebrowser_bin/mpv')

config.bind(';xv', "hint links spawn %s {hint-url}"
% "mpv --force-window --no-terminal --keep-open=yes --ytdl "
"--ytdl-format="
"'ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9]+bestaudio/best'")
config.bind(';xv', "hint links spawn mpv %s {hint-url}" % MPV_FLAGS)
config.bind('xc', 'spawn --userscript ~/bin/qutebrowser_bin/cast {url}')
config.bind(';xc', 'hint links spawn --userscript ~/bin/qutebrowser_bin/cast {hint-url}')
## unbinding for preventing shadowing ;Yd and ;Ym
Expand Down

0 comments on commit 3d77ab7

Please sign in to comment.