Advertisement
mosaid

mpv config

Aug 5th, 2019
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.25 KB | None | 0 0
  1. # vim: syntax=config
  2.  
  3. # ~/.mpv/config
  4.  
  5. ###########
  6. # General #
  7. ###########
  8.  
  9. #load-scripts=yes
  10. #force-window=yes
  11.  
  12.  
  13. #no-border # no window title bar
  14. msg-module # prepend module name to log messages
  15. msg-color # color log messages on terminal
  16. term-osd-bar # display a progress bar on the terminal
  17. #use-filedir-conf # look for additional config files in the directory of the opened file
  18. #pause # no autoplay
  19. #keep-open # keep the player open when a file's end is reached
  20. autofit-larger=90%x90%
  21. autofit-smaller=40%x40%
  22. cursor-autohide-fs-only # don't autohide the cursor in window mode, only fullscreen
  23. input-media-keys=yes # enable/disable OSX media keys
  24. cursor-autohide=1000 # autohide the curser after 1s
  25. prefetch-playlist=yes
  26. loop-playlist=inf
  27. force-seekable=yes
  28.  
  29. input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket
  30. load-stats-overlay=no # use local stats.lua
  31. save-position-on-quit # handled by a script
  32.  
  33.  
  34. screenshot-format=png
  35. screenshot-png-compression=8
  36. screenshot-template='~/Pictures/%F (%P) %n'
  37.  
  38. hls-bitrate=max # use max quality for HLS streams
  39.  
  40. ytdl=yes
  41.  
  42. [ytdl-desktop]
  43. profile-desc=cond:is_desktop()
  44. ytdl-format=bestvideo[height<=?2160]+bestaudio/best
  45.  
  46. [ytdl-laptop]
  47. profile-desc=cond:is_laptop()
  48. ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash_segments]+bestaudio/best
  49.  
  50. [default]
  51.  
  52.  
  53. #########c
  54. # Cache #
  55. #########
  56.  
  57. # Configure the cache to be really big (multiple GBs)
  58. # We have a lot of memory, so why not use it for something
  59.  
  60. cache=yes
  61. cache-default=4000000 # size in KB
  62. cache-backbuffer=250000 # size in KB
  63. demuxer-max-bytes=114748364 # ~100 MiB in bytes
  64. #demuxer-thread=yes
  65. #demuxer-readahead-secs=200.0
  66.  
  67.  
  68. #############
  69. # OSD / OSC #
  70. #############
  71.  
  72. osd-level=1 # enable osd and display --osd-status-msg on interaction
  73. osd-duration=2500 # hide the osd after x ms
  74. 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}}'
  75.  
  76. osd-font='Source Sans Pro'
  77. osd-font-size=32
  78. osd-color='#CCFFFFFF' # ARGB format
  79. osd-border-color='#DD322640' # ARGB format
  80. #osd-shadow-offset=1 # pixel width for osd text and progress bar
  81. osd-bar-align-y=0 # progress bar y alignment (-1 top, 0 centered, 1 bottom)
  82. osd-border-size=2 # size for osd text and progress bar
  83. osd-bar-h=2 # height of osd bar as a fractional percentage of your screen height
  84. osd-bar-w=60 # width of " " "
  85.  
  86.  
  87. #############
  88. # Subtitles #
  89. #############
  90.  
  91. sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload
  92. sub-file-paths-append=ass # search for external subs in these relative subdirectories
  93. sub-file-paths-append=srt
  94. sub-file-paths-append=sub
  95. sub-file-paths-append=subs
  96. sub-file-paths-append=subtitles
  97.  
  98. demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking
  99. embeddedfonts=yes # use embedded fonts for SSA/ASS subs
  100. sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases)
  101. sub-ass-force-style=Kerning=yes # allows you to override style parameters of ASS scripts
  102. sub-use-margins
  103. sub-ass-force-margins
  104.  
  105. # the following options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT)
  106. sub-font="Source Sans Pro Semibold"
  107. sub-font-size=72
  108. sub-color="#FFFFFFFF"
  109. sub-border-color="#FF262626"
  110. sub-border-size=3.2
  111. sub-shadow-offset=1
  112. sub-shadow-color="#33000000"
  113. sub-spacing=0.5
  114.  
  115.  
  116. #############
  117. # Languages #
  118. #############
  119.  
  120. slang=enm,en,eng,de,deu,ger # automatically select these subtitles (decreasing priority)
  121. alang=ja,jp,jpn,en,eng,de,deu,ger # automatically select these audio tracks (decreasing priority)
  122.  
  123.  
  124. #########
  125. # Audio #
  126. #########
  127.  
  128. audio-file-auto=fuzzy # external audio doesn't has to match the file name exactly to autoload
  129. audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed
  130. volume-max=200 # maximum volume in %, everything above 100 results in amplification
  131. volume=30 # default volume, 100 = unchanged
  132.  
  133.  
  134. ################
  135. # Video Output #
  136. ################
  137.  
  138. # Active VOs (and some other options) are set conditionally
  139. # See here for more information: https://github.com/wm4/mpv-scripts/blob/master/auto-profiles.lua
  140. # on_battery(), is_laptop() and is_dektop() are my own additional functions imported from scripts/auto-profiles-functions.lua
  141.  
  142. # Defaults for all profiles
  143. #vo=gpu
  144. #gpu-api=opengl
  145. tscale=oversample # [sharp] oversample <-> linear (triangle) <-> catmull_rom <-> mitchell <-> gaussian <-> bicubic [smooth]
  146. opengl-early-flush=no
  147. opengl-pbo=no # "yes" is currently bugged: https://github.com/mpv-player/mpv/issues/4988
  148. icc-profile-auto
  149. #icc-contrast=1000 # silence some warning because the profile is bad
  150. hwdec=no
  151.  
  152.  
  153. [high-quality]
  154. profile-desc=cond:is_high(get('width', 0), get('height', 0), get('estimated-vf-fps', 0))
  155. # hanning with this radius is broken on OSX due to OpenGL driver bug
  156. #scale=ewa_hanning
  157. #scale-radius=3.2383154841662362
  158. scale=ewa_lanczossharp
  159. cscale=ewa_lanczossoft
  160. dscale=mitchell
  161. scale-antiring=0
  162. cscale-antiring=0
  163. dither-depth=auto
  164. correct-downscaling=yes
  165. sigmoid-upscaling=yes
  166. deband=yes
  167. glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook"
  168. glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook"
  169. glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook"
  170.  
  171.  
  172. [mid-quality]
  173. profile-desc=cond:is_mid(get('width', 0), get('height', 0), get('estimated-vf-fps', 0))
  174. scale=spline36
  175. cscale=spline36
  176. dscale=mitchell
  177. scale-antiring=1.0
  178. cscale-antiring=1.0
  179. dither-depth=auto
  180. correct-downscaling=yes
  181. sigmoid-upscaling=yes
  182. deband=yes
  183. glsl-shaders-set=""
  184.  
  185. [low-quality]
  186. profile-desc=cond:is_low(get('width', 0), get('height', 0), get('estimated-vf-fps', 0))
  187. scale=bilinear
  188. cscale=bilinear
  189. dscale=bilinear
  190. scale-antiring=0
  191. cscale-antiring=0
  192. dither-depth=no
  193. correct-downscaling=no
  194. sigmoid-upscaling=no
  195. deband=no
  196. glsl-shaders-set=""
  197.  
  198. [4K-lavc-threads]
  199. profile-desc=cond:get('width', -math.huge) >= 3840
  200. vd-lavc-threads=32
  201.  
  202. [4K-lavc-threads-inverted]
  203. profile-desc=cond:get('width', math.huge) < 3840
  204. vd-lavc-threads=0
  205.  
  206.  
  207.  
  208. ###################################
  209. # Protocol Specific Configuration #
  210. ###################################
  211.  
  212. [protocol.https]
  213. cache=yes
  214. user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0'
  215.  
  216. [protocol.http]
  217. cache=yes
  218. user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement