Fix mpv config detection.

This commit is contained in:
Kevin Baensch 2020-05-26 16:34:50 +02:00
parent aa292f3a42
commit 3ee8c1eee3
Signed by: derped
GPG key ID: C0F1D326C7626543
3 changed files with 51 additions and 32 deletions

View file

@ -14,6 +14,7 @@ with lib;
environment.variables = mkIf (elem "etcvars" config.machine.conffiles) { environment.variables = mkIf (elem "etcvars" config.machine.conffiles) {
LC_CTYPE = "zh_CN.UTF-8"; LC_CTYPE = "zh_CN.UTF-8";
MANPAGER = "sh -c 'col -bx | bat -l man -p'"; MANPAGER = "sh -c 'col -bx | bat -l man -p'";
MPV_HOME = "/etc/mpv";
NIXPKGS_ALLOW_UNFREE = "1"; NIXPKGS_ALLOW_UNFREE = "1";
WINEDLLOVERRIDES = "winemenubuilder.exe=d"; WINEDLLOVERRIDES = "winemenubuilder.exe=d";
# This breaks a lot of applications # This breaks a lot of applications

View file

@ -1,3 +1,4 @@
b cycle deband
ALT+LEFT add video-pan-x -0.01 ALT+LEFT add video-pan-x -0.01
ALT+DOWN add video-pan-y +0.01 ALT+DOWN add video-pan-y +0.01
ALT+UP add video-pan-y -0.01 ALT+UP add video-pan-y -0.01

View file

@ -4,7 +4,7 @@
input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket
load-stats-overlay=yes # use local stats.lua load-stats-overlay=yes # use local stats.lua
#save-position-on-quit # handled by a script #save-position-on-quit
fs fs
no-border # no window title bar 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 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 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 #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 cursor-autohide=1000 # autohide the curser after 1s
prefetch-playlist=yes prefetch-playlist=yes
load-unsafe-playlists=yes load-unsafe-playlists=yes
@ -28,6 +28,26 @@ screenshot-template='~/Desktop/%F (%P) %n'
hls-bitrate=max # use max quality for HLS streams 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] [ytdl-desktop]
profile-desc=cond:is_desktop() profile-desc=cond:is_desktop()
ytdl-format=bestvideo[height<=?1080]+bestaudio/best 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 ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash_segments]+bestaudio/best
[default] [default]
#########c #########c
# Cache # # 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=auto
cache-default=4000000 # size in KB # those have been ?renamed/removed?, will look up what they are when I feel like it
cache-backbuffer=250000 # size in KB #cache-default=1048576 # size in KB
demuxer-max-bytes=1147483647 # ~1 GiB in bytes #cache-backbuffer=50000 # size in KB
demuxer-max-bytes=647483647 # size in bytes
demuxer-seekable-cache=yes demuxer-seekable-cache=yes
############# #############
# OSD / OSC # # 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-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-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' #osd-font='Source Sans Pro'
@ -84,7 +101,12 @@ sub-file-paths-append=sub
sub-file-paths-append=subs sub-file-paths-append=subs
sub-file-paths-append=subtitles sub-file-paths-append=subtitles
sub-file-paths-append=ENG 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=Chi
sub-file-paths-append=RUS
sub-file-paths-append=Rus
demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking
embeddedfonts=yes # use embedded fonts for SSA/ASS subs embeddedfonts=yes # use embedded fonts for SSA/ASS subs
@ -133,30 +155,15 @@ audio-channels=stereo
# Defaults for all profiles # Defaults for all profiles
profile=opengl-hq profile=opengl-hq
#gpu-context=wayland
vo=gpu vo=gpu
# set back to vaapi-copy once I've figured out how hw accerlation on wayland works...
hwdec=vaapi-copy hwdec=vaapi-copy
vd-lavc-threads = 2 vd-lavc-threads = 2
video-aspect=16:9 video-aspect-override=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
opengl-early-flush=no opengl-early-flush=no
opengl-pbo=no # "yes" may cause mpv to crash: https://github.com/mpv-player/mpv/issues/4988 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' user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0'
[extension.flac] [extension.flac]
video-aspect=no video-aspect-override=no
############
# Profiles #
############
[wayland]
vo=gpu
gpu-context=wayland
hwdec=vaapi
no-interpolation
######################## ########################