aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mpv
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-04-06 14:51:35 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-04-06 14:52:23 -0500
commitafd857055532beb8f8a38d546c30a5da39444b1c (patch)
tree46a0f07dc45f3b3094dfb57602aef2743cd067c1 /mpv
parent7bd19d8547ebd422ae25fe6a7022179451f7d5f0 (diff)
feat(mpv): enable newer drivers and add shaders
Diffstat (limited to 'mpv')
-rwxr-xr-xmpv/.config/mpv/mpv.conf49
-rw-r--r--mpv/.config/mpv/shaders.conf16
-rw-r--r--mpv/.config/mpv/shaders/KrigBilateral.glsl0
-rw-r--r--mpv/.config/mpv/shaders/SSimDownscaler.glsl0
-rw-r--r--mpv/.config/mpv/shaders/SSimSuperRes.glsl0
5 files changed, 36 insertions, 29 deletions
diff --git a/mpv/.config/mpv/mpv.conf b/mpv/.config/mpv/mpv.conf
index 5aa3d8a..8290745 100755
--- a/mpv/.config/mpv/mpv.conf
+++ b/mpv/.config/mpv/mpv.conf
@@ -1,53 +1,44 @@
# Profile
profile=gpu-hq
-profile-restore=copy-equal
-
-# Smoother video
-interpolation
-tscale=oversample
-
-# HD audio passthrough
-audio-spdif=ac3,eac3,dts-hd,truehd
# Window
border=no
-force-window=yes
+force-window=immediate
snap-window
# Terminal
-msg-color=yes
-term-osd-bar=yes
-cursor-autohide=1000
+term-osd=auto
-# Caching
-cache=yes
-demuxer-max-bytes=1800M
-demuxer-max-back-bytes=1200M
+# video
+vo=dmabuf-wayland
# Audio
+ao=pipewire
volume=50
-audio-pitch-correction=yes
-
-# Lang
-slang=eng,en,enUS,en-US
-alang=jpn,jp,eng,en,enUS,en-US
+alang=eng,en,enUS,en-US
# Subtitles
-demuxer-mkv-subtitle-preroll
sub-auto=fuzzy
sub-file-paths=ass:srt:sub:subs:subtitles
-embeddedfonts=yes
sub-font-size=18
+slang=eng,en,enUS,en-US
# Playback
script-opts=ytdl_hook-try_ytdl_first=yes
save-position-on-quit=yes
+# Caching
+cache=yes
+demuxer-max-bytes=20M
+demuxer-max-back-bytes=1200M
+
+include="~~/shaders.conf"
+include="~~/upscale.conf"
+
[stream]
-profile-cond=get("media-title", ""):find("twitch.tv/[^ /]+") ~= nil or string.match(p.filename, "%.m3u8$") ~= nil
-profile-restore=copy-equal
+profile-desc=Enable better performance for streaming live video
+profile-cond=p.path:match("twitch.tv/") ~= nil or get("media-title", ""):match("twitch.tv/") ~= nil or filename:match("[.]m3u8$") ~= nil
demuxer-max-bytes=8192k
-force-seekable=yes
-hr-seek=yes
-hr-seek-framedrop=yes
-no-taskbar-progress
+save-position-on-quit=no
+resume-playback=no
+taskbar-progress=no
diff --git a/mpv/.config/mpv/shaders.conf b/mpv/.config/mpv/shaders.conf
new file mode 100644
index 0000000..ab64a3d
--- /dev/null
+++ b/mpv/.config/mpv/shaders.conf
@@ -0,0 +1,16 @@
+# Clears all shaders from the list
+glsl-shaders-clr
+
+# ===== igv shaders ======
+# REF: https://gist.github.com/igv
+
+# SSimDownscaler: Perceptually based downscaler.
+linear-downscaling=no
+glsl-shaders-append="~~/shaders/SSimDownscaler.glsl" # https://gist.github.com/igv/36508af3ffc84410fe39761d6969be10
+
+# SSimSuperRes: Make corrections to the image upscaled by mpv built-in scaler
+# (removes ringing artifacts and restores original sharpness).
+glsl-shaders-append="~~/shaders/SSimSuperRes.glsl" # https://gist.github.com/igv/2364ffa6e81540f29cb7ab4c9bc05b6b
+
+# KrigBilateral: Chroma scaler that uses luma information for high quality upscaling.
+glsl-shaders-append="~~/shaders/KrigBilateral.glsl" # https://gist.github.com/igv/a015fc885d5c22e6891820ad89555637
diff --git a/mpv/.config/mpv/shaders/KrigBilateral.glsl b/mpv/.config/mpv/shaders/KrigBilateral.glsl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mpv/.config/mpv/shaders/KrigBilateral.glsl
diff --git a/mpv/.config/mpv/shaders/SSimDownscaler.glsl b/mpv/.config/mpv/shaders/SSimDownscaler.glsl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mpv/.config/mpv/shaders/SSimDownscaler.glsl
diff --git a/mpv/.config/mpv/shaders/SSimSuperRes.glsl b/mpv/.config/mpv/shaders/SSimSuperRes.glsl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mpv/.config/mpv/shaders/SSimSuperRes.glsl