diff --git a/config/etc.nix b/config/etc.nix index e541613..8215bf3 100644 --- a/config/etc.nix +++ b/config/etc.nix @@ -14,6 +14,7 @@ with lib; environment.variables = mkIf (elem "etcvars" config.machine.conffiles) { LC_CTYPE = "zh_CN.UTF-8"; MANPAGER = "sh -c 'col -bx | bat -l man -p'"; + MPV_HOME = "/etc/mpv"; NIXPKGS_ALLOW_UNFREE = "1"; WINEDLLOVERRIDES = "winemenubuilder.exe=d"; # This breaks a lot of applications diff --git a/config/etc/mpv/input.conf b/config/etc/mpv/input.conf index 7e15c8e..8e4e68d 100644 --- a/config/etc/mpv/input.conf +++ b/config/etc/mpv/input.conf @@ -1,3 +1,4 @@ +b cycle deband ALT+LEFT add video-pan-x -0.01 ALT+DOWN add video-pan-y +0.01 ALT+UP add video-pan-y -0.01 diff --git a/config/etc/mpv/mpv.conf b/config/etc/mpv/mpv.conf index 343d3e5..b0bd23f 100644 --- a/config/etc/mpv/mpv.conf +++ b/config/etc/mpv/mpv.conf @@ -4,7 +4,7 @@ input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket load-stats-overlay=yes # use local stats.lua -#save-position-on-quit # handled by a script +#save-position-on-quit fs no-border # no window title bar @@ -16,7 +16,7 @@ use-filedir-conf # look for additional config files in th keep-open # keep the player open when a file's end is reached autofit-larger=100%x95% # resize window in case it's larger than W%xH% of the screen #cursor-autohide-fs-only # don't autohide the cursor in window mode, only fullscreen -#input-media-keys=no # enable/disable OSX media keys +#input-media-keys=no # enable/disable media keys on Windows and OSX cursor-autohide=1000 # autohide the curser after 1s prefetch-playlist=yes load-unsafe-playlists=yes @@ -28,6 +28,26 @@ screenshot-template='~/Desktop/%F (%P) %n' hls-bitrate=max # use max quality for HLS streams +[hq] +# without hardware accerlation interpolation does not work +interpolation +video-sync=display-resample +deband=no +deinterlace=no +vf=lavfi="gradfun" +#scale=ewa_lanczossharp +scale=catmull_rom +cscale=spline64 +dscale=mitchell +#dscale-param1= +#dscale-param2= +tscale=sinc +scale-antiring=0 +cscale-antiring=0 +dither-depth=auto +correct-downscaling=yes +sigmoid-upscaling=yes + [ytdl-desktop] profile-desc=cond:is_desktop() ytdl-format=bestvideo[height<=?1080]+bestaudio/best @@ -37,29 +57,26 @@ profile-desc=cond:is_laptop() ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash_segments]+bestaudio/best [default] - - #########c # Cache # ######### -# Configure the cache to be really big (multiple GBs) -# We have a lot of memory, so why not use it for something - cache=auto -cache-default=4000000 # size in KB -cache-backbuffer=250000 # size in KB -demuxer-max-bytes=1147483647 # ~1 GiB in bytes +# those have been ?renamed/removed?, will look up what they are when I feel like it +#cache-default=1048576 # size in KB +#cache-backbuffer=50000 # size in KB +demuxer-max-bytes=647483647 # size in bytes demuxer-seekable-cache=yes ############# # OSD / OSC # ############# -osc=no +# I'm using the mpv thumbnailer plugin +# osc=no #osd-level=1 # enable osd and display --osd-status-msg on interaction -#osd-duration=2500 # hide the osd after x ms +osd-duration=1500 # hide the osd after x ms osd-status-msg='${time-pos} / ${duration}${?percent-pos: (${percent-pos}%)}${?frame-drop-count:${!frame-drop-count==0: Dropped: ${frame-drop-count}}}\n${?chapter:Chapter: ${chapter}}' #osd-font='Source Sans Pro' @@ -84,7 +101,12 @@ sub-file-paths-append=sub sub-file-paths-append=subs sub-file-paths-append=subtitles sub-file-paths-append=ENG +sub-file-paths-append=Eng +sub-file-paths-append="ENG Subs" sub-file-paths-append=CHI +sub-file-paths-append=Chi +sub-file-paths-append=RUS +sub-file-paths-append=Rus demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking embeddedfonts=yes # use embedded fonts for SSA/ASS subs @@ -133,30 +155,15 @@ audio-channels=stereo # Defaults for all profiles profile=opengl-hq +#gpu-context=wayland vo=gpu +# set back to vaapi-copy once I've figured out how hw accerlation on wayland works... hwdec=vaapi-copy vd-lavc-threads = 2 -video-aspect=16:9 -interpolation -video-sync=display-resample -deband=no -deinterlace=no -vf=lavfi="gradfun" -#scale=ewa_lanczossharp -scale=catmull_rom -cscale=spline64 -dscale=mitchell -#dscale-param1= -#dscale-param2= -tscale=sinc -scale-antiring=0 -cscale-antiring=0 -dither-depth=auto -correct-downscaling=yes -sigmoid-upscaling=yes +video-aspect-override=16:9 opengl-early-flush=no opengl-pbo=no # "yes" may cause mpv to crash: https://github.com/mpv-player/mpv/issues/4988 -#icc-profile=~/.config/mpv/sufrace.icc +# icc-profile=~/.config/mpv/surface-srgb-enhanced.icc ################################### @@ -172,7 +179,17 @@ cache=yes user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0' [extension.flac] -video-aspect=no +video-aspect-override=no + +############ +# Profiles # +############ + +[wayland] +vo=gpu +gpu-context=wayland +hwdec=vaapi +no-interpolation ########################