summary refs log tree commit diff
path: root/.config/mpv/config
diff options
context:
space:
mode:
Diffstat (limited to '.config/mpv/config')
-rw-r--r--.config/mpv/config162
1 files changed, 56 insertions, 106 deletions
diff --git a/.config/mpv/config b/.config/mpv/config
index c0c6b21..65fadaf 100644
--- a/.config/mpv/config
+++ b/.config/mpv/config
@@ -1,49 +1,54 @@
 # MPV Configuration
 
-autoload-files=no
 input-ipc-server=/run/user/1000/mpv
 script-opts=ytdl_hook-ytdl_path=/usr/bin/yt-dlp,ytdl_hook-all_formats=yes
 
+cache=yes
+demuxer-max-back-bytes=100M
+demuxer-max-bytes=100M
+demuxer-readahead-secs=20
+
 #
 # Video
 #
 vo=gpu-next
-hwdec=auto-copy
+hwdec=auto # -copy
+# gpu-context=wayland
+gpu-api=vulkan
 # framedrop=decoder+vo
 video-sync=display-resample
 # interpolation
-window-maximized=yes # prevent wayland problems with buffer resize
+window-maximized=no # prevent wayland problems with buffer resize
 
 # colour shit
-hdr-compute-peak=no
 # icc-profile=~~/B140QAN02_0.icm
 # tone-mapping=mobius
+# inverse-tone-mapping
 # target-peak=500
 
+deband=yes
+
 #
 # Audio
 #
 alang=jpn,ja,eng,en,ger,de
-volume-max=200
+volume-max=120
 audio-channels=auto-safe
-audio-file-auto=fuzzy
-#af="acompressor=ration=4,loudnorm"
-# bs2b filter
-# af-add=lavfi=[bs2b=profile=jmeier] #default,cmoy
 
 #
 # Subtitles
 #
-slang=eng,en,ger,de
+slang=eng,en,ger,de,jpn,ja
 
-sub-font=Rosario
-sub-font-size=52
+# sub-font=Rosario
+sub-font=Luciole
+# sub-scale-by-window=no
 sub-blur=0.2
 sub-border-color=0.0/0.0/0.0/1.0
 sub-border-size=3.0
 sub-color=1.0/1.0/1.0
 sub-margin-x=100
-sub-margin-y=50
+sub-margin-y=10
 sub-shadow-color=0.0/0.0/0.0/0.25
 sub-shadow-offset=0
 
@@ -53,7 +58,7 @@ sub-ass-vsfilter-blur-compat=no
 
 # Some settings fixing VOB/PGS subtitles
 # (creating blur & changing yellow subs to gray)
-sub-gauss=1.0
+sub-gauss=0.6
 sub-gray=yes
 
 #Forces showing subtitles while seeking through the video
@@ -62,30 +67,25 @@ demuxer-mkv-subtitle-preroll=yes
 #
 # OSD
 #
-osc=no
-osd-bar=no
-border=no
-#
-keep-open=yes
-stop-screensaver=yes
+osc=no # we use uosc
+osd-bar=no # we use uosc
+border=no # needed for uosc decorations
+
+osd-font=Iosevka Etoile
 cursor-autohide=100
 cursor-autohide-fs-only
-#osd-font="Iosevka Aile"
-osd-font=monospace
-# osd-font-size=15
-# osd-border-size=2
-# osd-scale-by-window=yes
-# osd-fractions=yes
-hidpi-window-scale
+keep-open=yes
+stop-screensaver=yes
 load-stats-overlay=yes
 load-osd-console=yes
 keepaspect-window=yes
-autofit-larger=80%x90%
+autofit-larger=x50%
+osd-scale-by-window=no
 
 #
 # Misc.
 #
-screenshot-directory=~/Pictures/screenshots/mpv
+screenshot-directory=~/pictures/screenshots/mpv
 screenshot-template='%tY%tm%td-%tH%tM%tS-%F-%p'
 # screenshot-format=png
 # screenshot-jpeg-quality=100
@@ -95,6 +95,8 @@ ytdl-format=bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4,best
 #
 # PROFILES
 #
+[fullscreen]
+vo=dmabuf-wayland
 
 [protocol.http]
 profile-desc="Optimized for streaming video"
@@ -102,42 +104,22 @@ glsl-shaders-clr
 title="${media-title}"
 ytdl-format=bestvideo[height<=?1080]+bestaudio/best[height<=?1080]
 demuxer-seekable-cache=yes
-demuxer-max-bytes=2048MiB
-demuxer-max-back-bytes=1024MiB
-script=~/.config/mpv/scripts/mpv-plugin-streamcache/streamcache.lua
+cache-pause=no
+hls-bitrate=max
 
 [protocol.https]
 profile=protocol.http
 
-[url.googledrive.balena]
+# [url.ytcookies]
 # profile=protocol.http
-profile-cond=not not string.match(get('path'), 'drive.google.com')
-cookies-file=~/Downloads/cookies.balena_google_drive.txt
-ytdl-raw-options=cookies=~/Downloads/cookies.balena_google_drive.txt
-
-[url.youtube]
-profile=protocol.http
-profile-cond=not not string.match(get('path'), 'youtube.com')
-# ytdl-raw-options=cookies=~/Downloads/cookies.balena_google_drive.txt
+# profile-cond=not not string.match(get('path'), 'youtube.com')
+# # ytdl-raw-options=cookies=~/Downloads/cookies.balena_google_drive.txt
 
-[hq]
+[gpuhq]
 profile-desc="Optimized for HQ rendering"
-# profile-cond=height <= 1440
+profile-cond=height <= 1440
 profile=gpu-hq
 
-[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
-ordered-chapters-files=/tmp/mpv_ordered_chapters
-
-[cache]
-profile=protocol.http
-
 [scale]
 profile-desc="Use fancy scaling algorithms"
 glsl-shaders-clr
@@ -147,51 +129,13 @@ dscale=ewa_lanczossharp
 correct-downscaling=yes
 sigmoid-upscaling=yes
 
-# [gpuscale]
-# profile-desc="Use GLSL shaders to scale via GPU (FSRCNNX)"
-# profile=gpu-hq
-# hwdec=auto-copy
-# gpu-api=opengl
-# fbo-format=rgba16f
-# cscale=mitchell
-# dscale=mitchell
-# linear-downscaling=no
-# glsl-shaders-clr
-# glsl-shaders=~~/shaders/default-shader-pack/shaders/FSRCNNX_x2_8-0-4-1.glsl
-# glsl-shaders=~~/shaders/default-shader-pack/shaders/KrigBilateral.glsl
-# glsl-shaders=~~/shaders/default-shader-pack/shaders/SSimDownscaler.glsl
-
-# [gpuscale-high]
-# profile-desc="Use GLSL shaders to scale via GPU (FSRCNNX x16)"
+# [interpolate]
+# profile-desc="Increase framecount by interpolating (with vapoursynth)"
 # profile=gpu-hq
-# hwdec=auto-copy
-# gpu-api=opengl
-# fbo-format=rgba16f
-# cscale=mitchell
-# dscale=mitchell
-# linear-downscaling=no
-# glsl-shaders-clr
-# glsl-shaders=~~/shaders/default-shader-pack/shaders/FSRCNNX_x2_16-0-4-1.glsl
-# glsl-shaders=~~/shaders/default-shader-pack/shaders/KrigBilateral.glsl
-# glsl-shaders=~~/shaders/default-shader-pack/shaders/SSimDownscaler.glsl
-
-[interpolate]
-profile-desc="Increase framecount by interpolating (with vapoursynth)"
-profile=gpu-hq
-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"
-# Everything below here only applies to this profile until another profile is declared!
-input-ipc-server=/tmp/mpvsocket     # Receives input from SVP
-hr-seek-framedrop=no                # Fixes audio desync
-resume-playback=no                  # Not compatible with SVP
-hwdec=auto-copy
-hwdec-codecs=all
-autofit-larger=100%x100%
+# 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
 
 [reset]
 profile-desc="Reset everything to vanilla mpv"
@@ -201,7 +145,7 @@ osc=yes
 osd-bar=yes
 
 [3d]
-profile-desc="[irrelevant] Transform 3d video file to 2d"
+profile-desc="Transform 3d video file to 2d"
 vf-add='stereo3d:ab2l:ml'
 
 [skip-silence]
@@ -209,17 +153,23 @@ profile-desc="Skip over silent parts"
 af-add='silenceremove=0:0:0:-1:0.001:-45dB:0:rms'
 
 [webcam]
-profile-desc="Optimized for showing internal webcam feed"
+profile-desc="Optimized for showing real-time webcam feed"
+profile-cond=(not not string.match(get('path'), '/dev/video*'))
+load-scripts=no
 osc=no
 profile=low-latency
-# video-sync=display-desync # needed or external audio will fail
-# demuxer-lavf-o=input_format=mjpeg,video_size=848x480
-# framedrop=no
-# no-demuxer-thread
+untimed
+video-sync=display-resample
+no-demuxer-thread
 opengl-glfinish=yes
 opengl-swapinterval=0
 vf-add=hflip
 
+[webcam/local]
+profile-cond=(not not string.match(get('path'), '/dev/video0'))
+profile=webcam
+demuxer-lavf-o=input_format=mjpeg
+
 [downmix]
 ad-lavc-downmix=no
 # == pan ==