summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.config/mpv/config20
-rw-r--r--.config/mpv/input.conf56
-rw-r--r--.config/mpv/script-opts/uosc.conf2
-rw-r--r--.config/mpv/scripts/toggle-redshift-on-play.lua47
4 files changed, 38 insertions, 87 deletions
diff --git a/.config/mpv/config b/.config/mpv/config
index 3bcf317..a87495f 100644
--- a/.config/mpv/config
+++ b/.config/mpv/config
@@ -6,9 +6,9 @@ input-ipc-server=/run/user/1000/mpv
 #
 # Video
 #
-# framedrop=vo
-# video-sync=display-resample
-gpu-context=wayland
+# framedrop=decoder+vo
+video-sync=display-resample
+interpolation
 window-maximized=yes # prevent wayland problems with buffer resize
 hwdec=auto
 # color stuff
@@ -49,7 +49,7 @@ osd-font="Iosevka Aile"
 # osd-border-size=2
 # osd-scale-by-window=yes
 # osd-fractions=yes
-# hidpi-window-scale
+hidpi-window-scale
 load-stats-overlay=yes
 load-osd-console=yes
 keepaspect-window=yes
@@ -94,7 +94,7 @@ profile-cond=not not string.match(get('path'), 'youtube.com')
 ytdl-raw-options=cookies=~/Downloads/cookies.balena_google_drive.txt
 
 [hq]
-profile-desc="Optimized for watching high-resolution content"
+profile-desc="Optimized for HQ rendering"
 profile-cond=height <= 1440
 profile=gpu-hq
 
@@ -151,8 +151,10 @@ glsl-shaders=~~/shaders/default-shader-pack/shaders/SSimDownscaler.glsl
 [interpolate]
 profile-desc="Increase framecount by interpolating (with vapoursynth)"
 profile=gpu-hq
-vf=format=yuv420p,scale=w=-1:h=720,vapoursynth=~~/vapoursynth/interpolate.vpy:4:4
-video-sync=display-resample
+vf-toggle=@vsfmt:format=yuv420p
+vf-toggle=@vsscale:scale=w=-1:h=540
+vf-toggle=@vs:vapoursynth=~~/vapoursynth/interpolate.vpy:4:4
+sws-scaler=spline
 
 [svp]
 profile-desc="[irrelevant] Integrate with SVP"
@@ -163,8 +165,6 @@ resume-playback=no                  # Not compatible with SVP
 hwdec=auto-copy
 hwdec-codecs=all
 autofit-larger=100%x100%
-# video-sync=desync
-video-sync=display-resample
 
 [reset]
 profile-desc="Reset everything to vanilla mpv"
@@ -200,4 +200,4 @@ pulse-latency-hacks=yes
 # no-demuxer-thread
 opengl-glfinish=yes
 opengl-swapinterval=0
-vf=hflip
+vf-add=hflip
diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf
index a128c99..d517350 100644
--- a/.config/mpv/input.conf
+++ b/.config/mpv/input.conf
@@ -3,22 +3,27 @@
 # taken from the default config
 ESC set fullscreen no
 f cycle fullscreen
-SPACE cycle pause
-m cycle mute
+SPACE cycle pause  #! controls > pause/play
+m cycle mute  #! controls > mute
 
 # ARROW KEY BINDINGS
-RIGHT seek  10  # skip ahead
-LEFT  seek -10  # skip back
-UP    seek  60
-DOWN  seek -60
+LEFT  seek -10 exact
+RIGHT seek  10 exact
+DOWN  seek -60 exact
+UP    seek  60 exact
+
+h seek -10 keyframes
+j seek -60 keyframes
+k seek  60 keyframes
+l seek  10 keyframes
 
 HOME    seek 0 absolute-percent
 END     seek 100 absolute-percent
 
 Shift+RIGHT     playlist-next
-n playlist-next
+n playlist-next  #! controls > playlist next
 Shift+LEFT      playlist-prev
-p playlist-prev
+p playlist-prev  #! controls > playlist prev
 Alt+RIGHT       frame-step
 Alt+LEFT        frame-back-step
 
@@ -27,14 +32,12 @@ Shift+DOWN      add volume -10
 Alt+UP          add volume 5
 Alt+DOWN        add volume -5
 
-PGUP            add chapter 1
-PGDWN           add chapter -1
-# Meta+UP         add chapter 1
-# Meta+DOWN       add chapter -1
-Shift+PGUP      seek 600
-Shift+PGDWN     seek -600
+PGUP            add chapter 1  #! controls > chapter next
+PGDWN           add chapter -1  #! controls > chapter prev
+Shift+PGUP      seek  600 keyframes
+Shift+PGDWN     seek -600 keyframes
 Alt+PGUP        add sub-pos -1
-Alt+PGDWN      add sub-pos +1
+Alt+PGDWN       add sub-pos +1
 
 WHEEL_UP seek -5
 WHEEL_DOWN seek 5
@@ -88,35 +91,31 @@ Shift+- add volume -5
 } multiply speed 2.0            #! utils > speed > -50%
 BS set speed 1.0                #! utils > speed > reset
 
-l cycle-values loop-file yes no #! loop > file
-L ab-loop                       #! loop > A-B
+L cycle-values loop-file yes no #! loop > file
+Ctrl+l ab-loop                  #! loop > A-B
 
 # VAPOURSYNTH/FILTER BINDINGS
 # banding
 b cycle deband      #! fx > deband
 B vf toggle gradfun #! fx > gradfun
 # binaural correction
-h cycle-values af lavfi=[bs2b=profile=default] lavfi=[bs2b=profile=jmeier] lavfi=[bs2b=profile=cmoy] lavfi=[earwax] ""  #! fx > bs2b
+H cycle-values af lavfi=[bs2b=profile=default] lavfi=[bs2b=profile=jmeier] lavfi=[bs2b=profile=cmoy] lavfi=[earwax] ""  #! fx > bs2b
 
 MBTN_RIGHT script_binding uosc/menu
 U script_binding uosc/menu
 Enter script_binding uosc/menu
 P script-binding uosc/playlist  #! select > playlist
 C script-binding uosc/chapters  #! select > chapters
-Ctrl+space script-binding uosc/peek-timeline
-Alt+space script-binding uosc/flash-timeline
+Tab script-binding uosc/peek-timeline
 
 Alt+w script-binding webm/display-webm-encoder #! utils > webm encoder
 Alt+e script-binding slicing/slicing_audio     #! utils > slicing > audio
 Alt+r script-binding slicing/slicing_mark      #! utils > slicing > mark
 Alt+t script-binding autodeint                 #! utils > autodeint
 Alt+y script-binding autocrop/toggle_crop      #! utils > autocrop
-c script-binding contact-sheet-toggle          #! utils > contact sheet
-# g script-binding playlist-view-toggle          #! utils > playlist view
 Alt+m script-binding mouse_coords              #! utils > mouse coords
-
-K ignore
-J ignore
+# g script-message contact-sheet-close; script-message playlist-view-toggle #! utils > playlist view
+# c script-message playlist-view-close; script-message contact-sheet-toggle #! utils > contact sheet
 
 # 1 ignore
 # 2 ignore
@@ -129,12 +128,11 @@ J ignore
 9 ignore
 
 Ctrl+Shift+0 apply-profile reset         #! profiles > reset
-Ctrl+Shift+1 apply-profile anime         #! profiles > anime
+Ctrl+Shift+4 apply-profile interpolate   #! profiles > interpolate
 Ctrl+Shift+2 apply-profile cache         #! profiles > cache
 Ctrl+Shift+3 apply-profile scale         #! profiles > scale
-Ctrl+Shift+4 apply-profile interpolate   #! profiles > interpolate
 Ctrl+Shift+5 apply-profile 3d            #! profiles > 3d fix
-Ctrl+Shift+6 apply-profile anime4k       #! profiles > 3d fix
 Ctrl+Shift+7 apply-profile gpuscale      #! profiles > gpuscale x8
 Ctrl+Shift+8 apply-profile gpuscale-high #! profiles > gpuscale x16
-Ctrl+Shift+9 apply-profile resethq       #! profiles > reset hq
+Ctrl+Shift+1 apply-profile anime         #! profiles > anime
+Ctrl+Shift+6 apply-profile anime4k       #! profiles > anime4k
diff --git a/.config/mpv/script-opts/uosc.conf b/.config/mpv/script-opts/uosc.conf
index 5984480..fa49c85 100644
--- a/.config/mpv/script-opts/uosc.conf
+++ b/.config/mpv/script-opts/uosc.conf
@@ -50,7 +50,7 @@ menu_font_scale=1
 
 # top bar with window controls and media title shown only in no-border mode
 top_bar_size=40
-top_bar_size_fullscreen=46
+top_bar_size_fullscreen=0
 top_bar_controls=yes
 top_bar_title=yes
 
diff --git a/.config/mpv/scripts/toggle-redshift-on-play.lua b/.config/mpv/scripts/toggle-redshift-on-play.lua
deleted file mode 100644
index 5fe60f4..0000000
--- a/.config/mpv/scripts/toggle-redshift-on-play.lua
+++ /dev/null
@@ -1,47 +0,0 @@
--- Toggle redshift when viewing videos with mpv
--- When pausing redshift is reenabled (and disabled again when continuing)
--- This script assumes that redshift is running
-
-rs_enabled = true
-
-function rs_toggle()
-    os.execute("pkill -x -USR1 redshift")
-end
-
-function rs_disable()
-    if rs_enabled then
-        rs_toggle()
-        rs_enabled = false
-        mp.msg.log("info", "Disabling redshift")
-    end
-end
-
-function rs_enable()
-    if not rs_enabled then
-        rs_toggle()
-        rs_enabled = true
-        mp.msg.log("info", "Reenabling redshift")
-    end
-end
-
-function rs_handler()
-    if mp.get_property("video") ~= "no" then
-        rs_disable()
-    else
-        rs_enable()
-    end
-end
-
-
-function on_pause_change(name, value)
-    if value then  --pause started
-        rs_enable()
-    else
-        rs_disable()
-    end
-end
-
-
-mp.register_event("file-loaded", rs_handler)
-mp.register_event("shutdown", rs_enable)
-mp.observe_property("pause", "bool", on_pause_change)
\ No newline at end of file