dotfiles/.mpv/mpv.conf

245 lines
6.3 KiB
Plaintext

# mpv configuration file
ontop
osd-fractions
msg-color
osd-msg3="${!speed==1.00:[x${speed}] }${=playback-time} / ${=duration} ${!estimated-frame-number==0:(${estimated-frame-number}) }[${=demuxer-cache-duration}]"
#save-position-on-quit
vo=gpu
gpu-api=vulkan
dither-depth=auto
sigmoid-upscaling
correct-downscaling
scale=ewa_lanczos
dscale=mitchell
cscale=sinc
cscale-window=blackman
cscale-radius=3
# deband
deband=no
deband-iterations=2
deband-threshold=32
deband-range=18
deband-grain=24
deinterlace=no
msg-module
ytdl-format=((bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec^=vp9]/bestvideo)[height<=?1080])+(bestaudio[ext=opus]/bestaudio)/best
ytdl-raw-options=no-cache-dir=
x11-bypass-compositor=yes
fullscreen=yes
#video-sync=display-resample
#opengl-early-flush=yes
#interpolation
#tscale=oversample
#scale=lanczos
icc-profile-auto
prefetch-playlist=yes
# Shaders
# if only my computer wasn't a potato
# glsl-shader=~~/shaders/FSRCNNX_x2_16-0-4-1.glsl
# glsl-shader=~~/shaders/KrigBilateral.glsl
###############
# Screenshots #
###############
screenshot-format=webp
screenshot-template="%{?demuxer-via-network==yes:${media-title}%{!demuxer-via-network==yes:${filename/no-ext} (%P) %n"
screenshot-directory="~/Pictures/mpv"
screenshot-jpeg-quality=95
screenshot-webp-quality=95
screenshot-png-compression=9
#########
# Cache #
#########
cache=yes
demuxer-max-bytes=500MiB
demuxer-max-back-bytes=200MiB
demuxer-readahead-secs=20
#############
# OSD / OSC #
#############
osd-level=1 # enable osd and display --osd-status-msg on interaction
osd-duration=2500 # hide the osd after x ms
osd-status-msg='${time-pos} / ${duration}${?percent-pos: (${percent-pos}%)}${?vo-drop-frame-count:${!vo-drop-frame-count==0: Dropped: ${vo-drop-frame-count}}}\n${?chapter:Chapter: ${chapter}}'
osd-font='Sans Serif'
osd-font-size=32
osd-color='#CCFFFFFF' # ARGB format
osd-border-color='#DD322640' # ARGB format
#osd-shadow-offset=1 # pixel width for osd text and progress bar
osd-bar-align-y=0 # progress bar y alignment (-1 top, 0 centered, 1 bottom)
osd-border-size=2 # size for osd text and progress bar
osd-bar-h=2 # height of osd bar as a fractional percentage of your screen height
osd-bar-w=60 # width of " " "
########
# Subs #
########
sub-auto=fuzzy
demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking
demuxer-mkv-subtitle-preroll-secs=15
embeddedfonts=yes
sub-ass-vsfilter-blur-compat=no
sub-ass-vsfilter-aspect-compat=no
sub-fix-timing=no # note: applies to ass subs when sub-ass-override != no
sub-gray=yes
sub-gauss=0.7
blend-subtitles=yes # useful when using an icc profile to match the colors of the video (or interpolation but...)
sub-ass-override=yes
sub-ass-force-style=Kerning=yes
# the following options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT)
sub-font="Gandhi Sans"
sub-font-size=50
sub-color="#FFFFFFFF"
sub-border-color="#FF262626"
sub-border-size=2.4
sub-shadow-offset=1
sub-shadow-color="#33000000"
#############
# Languages #
#############
slang=enm,en,eng,fr,fra,fre # automatically select these subtitles (decreasing priority)
alang=ja,jp,jpn,en,eng,fr,fra,fre # automatically select these
# audio tracks (decreasing priority)
#########
# Audio #
#########
audio-pitch-correction=yes # automatically insert scaletempo
# when playing with higher speed
############
# Profiles #
############
[default]
profile-desc="defaults"
profile-cond=true # defaults reapplied for each new video
deband=no
hwdec=no
[remove_scaletempo]
profile-desc="automatically remove scaletempo2"
profile-cond=get("speed", 1.00) == 1.00
af-remove=scaletempo2
# for mpv <=0.33
# [scaletempo2]
# profile-desc="automatically add scaletempo2"
# profile-cond=get("speed", 1.00) ~= 1.00
# af-add=scaletempo2
[bad_source]
glsl-shaders-remove=~~/shaders/noise_static_luma.hook.glsl # might get applied several times otherwise
glsl-shader=~~/shaders/noise_static_luma.hook.glsl
deband=yes
[subsplz]
profile-cond=(string.match(get("filename", ""), "SubsPlease")~=nil)
profile-restore=copy
# PlayResY=360
sub-ass-force-style=FontName=Gandhi Sans,Default.FontSize=25,Top.FontSize=25,MarginL=40,MarginR=40,Default.MarginV=18,Top.MarginV=18,Outline=1.2,Shadow=0.5,Bold=1,Kerning=yes
[erai]
profile-cond=(string.match(get("filename", ""), "Erai-Raws")~=nil)
profile-restore=copy
# PlayResY=720
sub-ass-force-style=FontName=Gandhi Sans,FontSize=50,MarginL=80,MarginR=80,MarginV=36,Outline=2.4,Shadow=1.0,Bold=1,Kerning=yes
[hs_etc]
profile-desc="hs and co"
profile-restore=copy
profile-cond=(string.match(get("filename", ""), "HorribleSubs")~=nil) or (string.match(get("filename", ""), "Erai%-raws")~=nil) or (string.match(get("filename", ""), "SubsPlease")~=nil)
profile=bad_source
sub-ass-override=yes
[yt]
profile-desc="youtube and other trash"
profile-cond=(string.match(get("path", ""), "^https://youtu.be")~=nil) or (string.match(get("path", ""), "^https://.*youtube.com")~=nil) or (string.match(get("path", ""), "bilibili.com")~=nil)
profile=bad_source
rebase-start-time=no
# save-position-on-quit=yes
[yuyuko]
profile-desc="yuyuko"
profile-cond=(string.match(get("path", ""), "yuyuko.butaishoujo.moe")~=nil) or (string.match(get("path", ""), "^fubuki.aidoru.agency")~=nil)
profile-restore=copy
screenshot-template="%F (%P) %n"
[vs]
profile-desc="png screenshots with vs"
profile-restore=copy
profile-cond=p.filename=="-" # most likely playing with vapoursynth
screenshot-format=png
screenshot-directory="~/Pictures/vs"
screenshot-template="%ts"
scale=box
cscale=box
[syncplay]
rebase-start-time=no
x11-name=syncplay-mpv
resume-playback=no
[high_fps]
profile-desc="high fps videos get a bilinear scaler and no deband"
profile-cond=p.estimated_vf_fps>31
profile-restore=copy
deband=no
scale=bilinear
cscale=bilinear
dscale=bilinear
[mpv_queue]
fullscreen=no
keep-open=yes
idle=yes
terminal=no
force-window=immediate
###################################
# Protocol Specific Configuration #
###################################
[protocol.http]
cache=yes
[protocol.https]
cache=yes
[extension.gif]
cache=no
no-pause
loop-file=yes
[extension.webm]
cache=yes
#no-pause
#loop-file=yes