From afd857055532beb8f8a38d546c30a5da39444b1c Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Sat, 6 Apr 2024 14:51:35 -0500 Subject: feat(mpv): enable newer drivers and add shaders --- mpv/.config/mpv/mpv.conf | 49 ++++++++++++----------------- mpv/.config/mpv/shaders.conf | 16 ++++++++++ mpv/.config/mpv/shaders/KrigBilateral.glsl | 0 mpv/.config/mpv/shaders/SSimDownscaler.glsl | 0 mpv/.config/mpv/shaders/SSimSuperRes.glsl | 0 5 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 mpv/.config/mpv/shaders.conf create mode 100644 mpv/.config/mpv/shaders/KrigBilateral.glsl create mode 100644 mpv/.config/mpv/shaders/SSimDownscaler.glsl create mode 100644 mpv/.config/mpv/shaders/SSimSuperRes.glsl (limited to 'mpv') 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 diff --git a/mpv/.config/mpv/shaders/SSimDownscaler.glsl b/mpv/.config/mpv/shaders/SSimDownscaler.glsl new file mode 100644 index 0000000..e69de29 diff --git a/mpv/.config/mpv/shaders/SSimSuperRes.glsl b/mpv/.config/mpv/shaders/SSimSuperRes.glsl new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3-70-g09d2