Skip to content

Instantly share code, notes, and snippets.

@Hikari9
Last active May 4, 2024 21:45
Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Hikari9/15ae5d31664ef761df4aa70778c2c0a7 to your computer and use it in GitHub Desktop.
Save Hikari9/15ae5d31664ef761df4aa70778c2c0a7 to your computer and use it in GitHub Desktop.
MPV Config File for Ceylon (anime)
AXIS_UP ignore
AXIS_DOWN ignore
AXIS_LEFT ignore
AXIS_RIGHT ignore
MOUSE_BTN3 add volume 5
MOUSE_BTN4 add volume -5
MOUSE_BTN5 seek -5
MOUSE_BTN6 seek 5
# Rico's mpv configuration file for ceylon
###########
# General #
###########
save-position-on-quit
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
keep-open=yes # play the next file in folder, or exit
autofit-larger=70%x65% # resize window in case it's larger than W%xH% of the screen
# deinterlace=yes
cursor-autohide-fs-only # don't autohide the cursor in window mode, only fullscreen
cursor-autohide=1000 # autohide the curser after 1s
script-opts=osc-layout=box,osc-seekbarstyle=bar
video-output-levels=full
screenshot-format=png
screenshot-png-compression=8
screenshot-template='~/Desktop/%F (%P) %n'
hls-bitrate=max # use max quality for HLS streams
ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash_segments]+bestaudio/best #[protocol!=http_dash_segments][protocol!=rtmp]
#########
# Cache #
#########
cache=no
cache-default=1000000 # size in KB
cache-backbuffer=1000000 # size in KB
cache-initial=0 # start playback when your cache is filled up with x kB
cache-secs=5 # how many seconds of audio/video to prefetch if the cache is active
#############
# OSD / OSC #
#############
osd-level=1 # enable osd and display --osd-status-msg on interaction
osd-duration=1750 # 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'
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-use-margins
sub-ass-force-margins
demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking
sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload
sub-file-paths=ass:srt:sub:subs:subtitles # search for external subs in the listed subdirectories
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
# 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 #
#########
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=100 # default volume, 100 = unchanged
################
# Video Output #
################
# vo=opengl-hq
profile=opengl-hq
opengl-early-flush=auto
opengl-pbo=no
# target-trc=gamma2.4
# target-trc=gamma2.2
target-trc=bt.1886
# gamma=-6
saturation=26
# tv-saturation=26
#################
# Interpolation # [<sharp>, ..., <smooth>]
################# [oversample, linear (triangle), catmull_rom, mitchell, gaussian, bicubic], [spline36, robidoux, robidouxsharp]
# interpolation
interpolation=no
################# [oversample, linear (triangle), catmull_rom, mitchell, gaussian, bicubic], [spline36, robidoux, robidouxsharp]
# tscale=mitchell
# tscale-antiring=0.608
# tscale-clamp=1
# video-sync=display-resample
# NNEDI SETTINGS
# backend=dxinterop
# prescale=nnedi3
# prescale-passes=1
# nnedi3-neurons=128
# nnedi3-window=8x6
# blend-subtitles=yes
# target-prim=bt.709
############# see: https://github.com/mpv-player/mpv/wiki/Upscaling
# Upscaling #
#############
# [bilinear, lanczos, mitchell, spline16, spline36, spline64, ewa_lanczos (:scale-radius=float),
# ewa_lanczossharp, ewa_lanczossoft, robidoux, robidouxsharp, ewa_ginseng, ewa_hanning, bicubic,
# gaussian, catmull_rom, nearest, oversample, sharpen3, sharpen5, sinc:scale-radius=R]
scale=spline36
cscale=ewa_lanczossoft
# cscale=bicubic
# cscale-radius=10
dscale=catmull_rom
scale-antiring=0.0
cscale-antiring=0.0
# dither-depth=auto
dither-depth=no
correct-downscaling=yes
sigmoid-upscaling=yes
deband=no
# deband-grain=36f
# deband-range=12
# deband-threshold=32
# hwdec=auto
# hwdec=no
hwdec=auto-copy
# tweak interpolation
# no-correct-pts
# display-fps=59.934
# display-fps=59.94
# fps=23.976
# vapoursynth options
hwdec-codecs=all
input-ipc-server=/tmp/mpvsocket
hr-seek-framedrop=no
# no-resume-playback
# 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
# The script was modified to import functions from scripts/auto-profiles-functions.lua
###################################
# Protocol Specific Configuration #
###################################
[protocol.https]
cache=yes
cache-default=1000000 # size in KB
cache-backbuffer=400000 # size in KB
cache-secs=30 # how many seconds of audio/video to prefetch
user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'
[protocol.http]
cache=yes
cache-default=500000 # size in KB
cache-backbuffer=250000 # size in KB
cache-secs=30 # how many seconds of audio/video to prefetch
user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'
# [extension.gif]
# cache=no
# no-pause
# loop-file=yes
@tsukijin
Copy link

Thank you for this .conf file, but I get these errors:
Invalid parameter for deinterlace flag: auto Valid values are: yes no (passing nothing) Error parsing option deinterlace (option parameter could not be parsed) C:/Users/zhuayun/AppData/Roaming/mpv/mpv.conf:27: setting option deinterlace='auto' failed. Warning: option --sub-paths was replaced with --sub-file-paths and might be removed in the future. Error parsing option tv-saturation (option not found) C:/Users/zhuayun/AppData/Roaming/mpv/mpv.conf:126: setting option tv-saturation='26' failed. Invalid parameter for deinterlace flag: auto Valid values are: yes no (passing nothing) Error parsing option deinterlace (option parameter could not be parsed) C:\Users\zhuayun\AppData\Roaming/mpv/mpv.conf:27: setting option deinterlace='auto' failed. Error parsing option tv-saturation (option not found) C:\Users\zhuayun\AppData\Roaming/mpv/mpv.conf:126: setting option tv-saturation='26' failed.

Am I missing something, or are these features no longer supported by mpv?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment