nixos/config/etc/mpv/mpv.conf

198 lines
6.5 KiB
Text
Raw Normal View History

2019-02-26 13:44:40 +01:00
###########
# General #
###########
input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket
load-stats-overlay=yes # use local stats.lua
2020-05-26 16:34:50 +02:00
#save-position-on-quit
2019-02-26 13:44:40 +01:00
fs
no-border # no window title bar
msg-module # prepend module name to log messages
msg-color # color log messages on terminal
#term-osd-bar # display a progress bar on the terminal
use-filedir-conf # look for additional config files in the directory of the opened file
#pause # no autoplay
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
2020-05-26 16:34:50 +02:00
#input-media-keys=no # enable/disable media keys on Windows and OSX
2019-02-26 13:44:40 +01:00
cursor-autohide=1000 # autohide the curser after 1s
prefetch-playlist=yes
load-unsafe-playlists=yes
force-seekable=yes
screenshot-format=png
screenshot-png-compression=9
screenshot-template='~/Desktop/%F (%P) %n'
hls-bitrate=max # use max quality for HLS streams
2020-05-26 16:34:50 +02:00
[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
2019-02-26 13:44:40 +01:00
[ytdl-desktop]
profile-desc=cond:is_desktop()
ytdl-format=bestvideo[height<=?1080]+bestaudio/best
[ytdl-laptop]
profile-desc=cond:is_laptop()
ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash_segments]+bestaudio/best
[default]
#########c
# Cache #
#########
cache=auto
2020-05-26 16:34:50 +02:00
# 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
2019-02-26 13:44:40 +01:00
demuxer-seekable-cache=yes
#############
# OSD / OSC #
#############
2020-05-26 16:34:50 +02:00
# I'm using the mpv thumbnailer plugin
# osc=no
2019-02-26 13:44:40 +01:00
#osd-level=1 # enable osd and display --osd-status-msg on interaction
2020-05-26 16:34:50 +02:00
osd-duration=1500 # hide the osd after x ms
2019-02-26 13:44:40 +01:00
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-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 " " "
#############
# Subtitles #
#############
sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload
sub-file-paths-append=ass # search for external subs in these relative subdirectories
sub-file-paths-append=srt
sub-file-paths-append=sub
sub-file-paths-append=subs
sub-file-paths-append=subtitles
sub-file-paths-append=ENG
2020-05-26 16:34:50 +02:00
sub-file-paths-append=Eng
sub-file-paths-append="ENG Subs"
2019-02-26 13:44:40 +01:00
sub-file-paths-append=CHI
2020-05-26 16:34:50 +02:00
sub-file-paths-append=Chi
sub-file-paths-append=RUS
sub-file-paths-append=Rus
2019-02-26 13:44:40 +01:00
demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking
embeddedfonts=yes # use embedded fonts for SSA/ASS subs
sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases)
sub-ass-force-style=Kerning=yes # allows you to override style parameters of ASS scripts
sub-use-margins
sub-ass-force-margins
# the following options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT)
sub-font="Source Sans Pro Semibold"
sub-font-size=36
sub-color="#FFFFFFFF"
sub-border-color="#FF262626"
sub-border-size=3.2
sub-shadow-offset=1
sub-shadow-color="#33000000"
sub-spacing=0.5
#############
# Languages #
#############
slang=enm,en,eng,de,deu,ger # automatically select these subtitles (decreasing priority)
alang=ja,jp,jpn,en,eng,de,deu,ger # automatically select these audio tracks (decreasing priority)
#########
# Audio #
#########
ao=pulse,alsa,jack
audio-file-auto=fuzzy # external audio doesn't has to match the file name exactly to autoload
audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed
volume-max=200 # maximum volume in %, everything above 100 results in amplification
volume=70 # default volume, 100 = unchanged
audio-channels=stereo
################
# Video Output #
################
# Active VOs (and some other options) are set conditionally
# See here for more information: https://github.com/wm4/mpv-scripts/blob/master/auto-profiles.lua
# on_battery(), is_laptop() and is_dektop() are my own additional functions imported from scripts/auto-profiles-functions.lua
# Defaults for all profiles
profile=opengl-hq
2020-05-26 16:34:50 +02:00
#gpu-context=wayland
2019-02-26 13:44:40 +01:00
vo=gpu
2020-05-26 16:34:50 +02:00
# set back to vaapi-copy once I've figured out how hw accerlation on wayland works...
2019-02-26 13:44:40 +01:00
hwdec=vaapi-copy
vd-lavc-threads = 2
2020-05-26 16:34:50 +02:00
video-aspect-override=16:9
2019-02-26 13:44:40 +01:00
opengl-early-flush=no
opengl-pbo=no # "yes" may cause mpv to crash: https://github.com/mpv-player/mpv/issues/4988
2020-05-26 16:34:50 +02:00
# icc-profile=~/.config/mpv/surface-srgb-enhanced.icc
2019-02-26 13:44:40 +01:00
###################################
# Protocol Specific Configuration #
###################################
[protocol.https]
cache=yes
user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0'
[protocol.http]
cache=yes
user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0'
[extension.flac]
2020-05-26 16:34:50 +02:00
video-aspect-override=no
############
# Profiles #
############
[wayland]
vo=gpu
gpu-context=wayland
hwdec=vaapi
no-interpolation
2019-02-26 13:44:40 +01:00
########################
# Plugin Configuration #
########################