From f5505cbac151cd83b1dc1a3b2ba079affc6f0b8f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 13 May 2020 16:50:28 +0200 Subject: [PATCH] [mpv] Add low/high quality profiles Added profiles for lq and hq playback in preparation for battery mode setting. Removed qutebrowser forcing ytdl options, since it is set in mpv.conf. --- mpv/.config/mpv/mpv.conf | 15 ++++++++++++++- qutebrowser/.config/qutebrowser/config.py | 5 ++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/mpv/.config/mpv/mpv.conf b/mpv/.config/mpv/mpv.conf index 9e2416e..a5baffc 100644 --- a/mpv/.config/mpv/mpv.conf +++ b/mpv/.config/mpv/mpv.conf @@ -125,7 +125,7 @@ force-window=immediate cache=yes # create a huge cache to buffer most of videos demuxer-max-bytes=3000MiB -demuxer-readahead-sec=500 +demuxer-readahead-secs=500 [protocol.http] profile=network @@ -143,3 +143,16 @@ loop-file=yes # for those yt playlists that are created in reverse order [reverse] ytdl-raw-options=playlist-reverse= + +[lowquality] +scale=bilinear +cscale=ewa_lanczossharp +video-sync=audio +interpolation=no + +[highquality] +scale=ewa_lanczossharp +cscale=ewa_lanczossharp +video-sync=display-resample +interpolation=yes +tscale=oversample diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index 2f4ccc9..b08e47c 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -91,9 +91,8 @@ config.bind(leader + 'tV', 'set tabs.position left') # [M]edia shortcuts - watch, queue, download media # bind mpv to play the current page/links, using a single instance which queues the next link passed -streamingformat = '--ytdl-format="bestvideo[height<=1080]+bestaudio/best[height<=1080]"' -config.bind(leader + 'M', 'spawn umpv ' + streamingformat + ' {url}') -config.bind(leader + 'm', 'hint links spawn umpv ' + streamingformat + ' {hint-url}') +config.bind(leader + 'M', 'spawn umpv {url}') +config.bind(leader + 'm', 'hint links spawn umpv {hint-url}') # bind youtube-dl to download the current page/links config.bind(leader + 'dM', 'spawn youtube-dl -o ~/videos/%(title)s.%(ext)s {url}') config.bind(leader + 'dm', 'hint --rapid links spawn youtube-dl -o ~/videos/%(title)s.%(ext)s {url}')