diff options
Diffstat (limited to '.config/mpv')
| -rw-r--r-- | .config/mpv/config | 97 | ||||
| -rw-r--r-- | .config/mpv/input.conf | 101 | ||||
| -rw-r--r-- | .config/mpv/script-opts/console.conf | 2 | ||||
| -rw-r--r-- | .config/mpv/script-opts/osc.conf | 23 | ||||
| -rw-r--r-- | .config/mpv/script-opts/stats.conf | 4 | ||||
| -rw-r--r-- | .config/mpv/scripts/mouse_coords.lua | 31 |
6 files changed, 258 insertions, 0 deletions
diff --git a/.config/mpv/config b/.config/mpv/config new file mode 100644 index 0000000..23e9637 --- /dev/null +++ b/.config/mpv/config @@ -0,0 +1,97 @@ +# MPV Configuration +# clean up input config (helps with iina, gnome-mpv etc.) +# no-input-default-bindings +autoload-files=no +input-ipc-server=/var/run/user/1000/mpv + +# +# Video +# +framedrop=vo +video-sync=display-resample +gpu-context=wayland + +# +# Audio +# +alang=jpn,ja,eng,en,ger,de +volume-max=200 +audio-channels=auto-safe +# bs2b filter +# af-add=lavfi=[bs2b=profile=jmeier] #default,cmoy + +# +# Subtitles +# +slang=eng,en,ger,de +sub-font="Rosario" +sub-bold=yes +sub-ass-force-style=Kerning=yes + +# +# OSD +# +#osc=no +keep-open=yes +stop-screensaver=yes +cursor-autohide-fs-only +osd-font="Iosevka Sparkle" +# osd-font=monospace +osd-font-size=14 +osd-scale-by-window=yes +osd-fractions=yes +geometry=50%:50% +hidpi-window-scale +load-stats-overlay=yes +load-osd-console=yes + +# +# Misc. +# +screenshot-directory=~/Pictures/screenshots/mpv +screenshot-template='%tY%tm%td-%tH%tM%tS-%F-%p' +# screenshot-format=png +# screenshot-jpeg-quality=100 +# user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:42.0) Gecko/20100101 Firefox/42.0" +# ytdl-format=bestvideo+bestaudio,best + +# +# PROFILES +# + +[anime] +profile-desc="Optimized for watching anime with ASS subtitles" +sub-auto=fuzzy +# deband=yes +# sub-border-size=2 +# sub-font-size=45 +# sub-margin-y=50 +# sub-spacing=1 + +[cache] +profile-desc="Optimized for streaming web video" +cache=yes +cache-secs=36000 +script=~/.config/mpv/scripts/mpv-plugin-streamcache/streamcache.lua +ytdl-format='bestvideo[ext=mp4]+bestaudio' + +[3d] +profile-desc="Convert 3d to 2d" +hwdec=no +vf-add=stereo3d=sbs2l:mono + +[webcam] +profile-desc="Optimized for showing internal webcam feed" +osc=no +profile=low-latency +video-sync=display-desync # needed or external audio will fail +pulse-latency-hacks=yes +demuxer-lavf-o=input_format=mjpeg,video_size=848x480 +framedrop=no +# no-demuxer-thread +opengl-glfinish=yes +opengl-swapinterval=0 +vf=hflip + +[sharp] +glsl-shaders="~/.config/mpv/shaders/finesharp/FineSharp.glsl" diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf new file mode 100644 index 0000000..3323ca0 --- /dev/null +++ b/.config/mpv/input.conf @@ -0,0 +1,101 @@ +# MPV INPUT CONFIG + +# taken from the default config +ESC set fullscreen no +f cycle fullscreen +SPACE cycle pause +m cycle mute + +# ARROW KEY BINDINGS +RIGHT seek 10 # skip ahead +LEFT seek -10 # skip back +UP seek 60 +DOWN seek -60 + +HOME seek 0 absolute-percent +END seek 100 absolute-percent + +Shift+RIGHT playlist-next +Shift+LEFT playlist-prev +Alt+RIGHT frame-step +Alt+LEFT frame-back-step + +Shift+UP add volume 10 +Shift+DOWN add volume -10 +Alt+UP add volume 5 +Alt+DOWN add volume -5 + +PGUP add chapter 1 # Fn-UP; skip to next chapter +PGDWN add chapter -1 # Fn-DOWN; skip to previous chapter +# Meta+UP add chapter 1 +# Meta+DOWN add chapter -1 +Shift+PGUP seek 600 +Shift+PGDWN seek -600 +Alt+PGUP add sub-pos -1 +Alt+PGDWN add sub-pos +1 + +C script_binding autocrop # crop black bars from movies (should be activated on scenes with max. contrast to the black bars) +Ctrl+c script_binding slicing/slicing_mark +Ctrl+a script_binding slicing/slicing_audio +W ignore +Ctrl+W script_binding webm/display-webm-encoder + +# A/V/S BINDINGS +a cycle audio +v cycle video +Y cycle-values vf stereo3d=sbs2l:mono stereo3d=ab2l:mono "" # cycle methods to display 3d movie as 2d +D cycle deinterlace + +s cycle sub +S cycle sub down +e add sub-scale +0.1 # increase subtitle font size +w add sub-scale -0.1 # decrease subtitle font size +t add sub-pos -1 +r add sub-pos +1 + +z add sub-delay -0.1 +Z add audio-delay -0.100 +x add sub-delay +0.1 +X add audio-delay 0.100 + +u cycle-values sub-ass-override "force" "strip" "no" +U cycle sub-visibility +Meta+s cycle sub-ass-force-margins + +# PLAYER BINDINGS +O cycle osc +i script-binding stats/display-stats-toggle +g screenshot # take a screenshot +G screenshot video # ...without subtitles + +T cycle ontop +H cycle-values hwdec auto no +A cycle-values video-aspect "16:9" "4:3" "21:9" "2.35:1" "-1" +c cycle-values audio-channels "auto-safe" "auto" "stereo" + +q quit +Q quit-watch-later # saves playback position to resume later + += add volume 10 +Shift+= add volume 5 +- add volume -10 +Shift+- add volume -5 + +> frame-step +< frame-back-step + +# VAPOURSYNTH/FILTER BINDINGS +# banding +b cycle deband +B vf toggle gradfun +# interpolation +P vf toggle format=yuv420p,vapoursynth=~/.dotfiles/scripts/motioninterpolation.vpy:4:4 +# binaural correction +h cycle-values af lavfi=[bs2b=profile=default] lavfi=[bs2b=profile=jmeier] lavfi=[bs2b=profile=cmoy] lavfi=[earwax] "" + +WHEEL_UP seek -5 +WHEEL_DOWN seek 5 + +0 script_binding mouse_coords +# 8 script_binding mouse_coords/set +# 9 script_binding mouse_coords/measure diff --git a/.config/mpv/script-opts/console.conf b/.config/mpv/script-opts/console.conf new file mode 100644 index 0000000..26581d1 --- /dev/null +++ b/.config/mpv/script-opts/console.conf @@ -0,0 +1,2 @@ +font="Iosevka Sparkle" +font_size=18 diff --git a/.config/mpv/script-opts/osc.conf b/.config/mpv/script-opts/osc.conf new file mode 100644 index 0000000..c99b867 --- /dev/null +++ b/.config/mpv/script-opts/osc.conf @@ -0,0 +1,23 @@ +# +# MPV LUA SETTINGS +# + +layout=bottombar +# layout=topbar +# layout=slimbox +# layout=box + +boxalpha=90 +# valign=-1 +# hidetimeout=1000 +# fadeduration=100 +seekbarstyle=bar +# seekbarstyle=slider +# seekbarstyle=knob + +# use native mpv values and disable OSC internal track list management (and some functions that depend on it) +iamaprogrammer=yes +# display total time instead of remaining time? +# timetotal=no +# display timecodes with milliseconds +# timems=yes diff --git a/.config/mpv/script-opts/stats.conf b/.config/mpv/script-opts/stats.conf new file mode 100644 index 0000000..d9f699f --- /dev/null +++ b/.config/mpv/script-opts/stats.conf @@ -0,0 +1,4 @@ +font="Iosevka Sparkle" +font_mono="Iosevka Sparkle" +font_size=8 +border_size=0.6 diff --git a/.config/mpv/scripts/mouse_coords.lua b/.config/mpv/scripts/mouse_coords.lua new file mode 100644 index 0000000..dae6239 --- /dev/null +++ b/.config/mpv/scripts/mouse_coords.lua @@ -0,0 +1,31 @@ +local msg = require('mp.msg') + +-- local x, y = 0, 0 + +-- function set_marker() +-- x, y = mp.get_mouse_pos() +-- end + +-- function measure() +-- x2, y2 = mp.get_mouse_pos() +-- w = x2-x +-- h = y2-y + +-- pos = "x: " .. x .. ", y:" .. y +-- dimensions = "w: " .. h .. ", h:" .. h +-- output = pos .. " | " .. dimensions + +-- mp.msg.warn(output) +-- mp.osd_message(output) +-- end + +function print_pos() + x, y = mp.get_mouse_pos() + pos = "x: " .. x .. ", y: " .. y + mp.msg.warn(pos) + mp.osd_message(pos) +end + +mp.add_key_binding("0", mp.get_script_name(), print_pos) +-- mp.add_key_binding("8", mp.get_script_name().."/set", set_marker) +-- mp.add_key_binding("9", mp.get_script_name().."/measure", measure) |