Guest User

Untitled

a guest
Aug 20th, 2019
28,725
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.29 KB | None | 0 0
  1. # Details about configuring MPV for high quality video is covered here: https://freetime.mikeconnelly.com/archives/5371
  2. # The latest version of this file is here: https://github.com/classicjazz/mpv-config
  3.  
  4. # All options are covered here: https://github.com/mpv-player/mpv/blob/master/DOCS/man/options.rst
  5. # All upscaling calculations are based on a 4K resolution display
  6.  
  7.  
  8. ###########
  9. # General #
  10. ###########
  11.  
  12. ##vo=libmpv
  13.  
  14. volume=28
  15.  
  16. slang=eng
  17.  
  18. #profile=gpu-hq - This is a high quality profile but the settings below are an improved version
  19. scale=ewa_lanczossharp
  20. cscale=ewa_lanczossharp
  21. dscale=mitchell
  22. dither-depth=auto
  23. correct-downscaling=yes
  24. linear-downscaling=yes
  25. sigmoid-upscaling=yes
  26. deband=yes
  27.  
  28. vd-lavc-dr=yes
  29.  
  30. gpu-api=vulkan # if your PC/mobile device/STB supports Vulkan then you should uncomment these and comment out the opengl settings above
  31. vulkan-async-compute=yes
  32. vulkan-async-transfer=yes
  33. vulkan-queue-count=1
  34.  
  35. hwdec=auto # turn off for better quality with software decoding
  36.  
  37. ########
  38. # Misc #
  39. ########
  40.  
  41. border=yes # hide the window title bar
  42. msg-color=yes # color log messages on terminal
  43. term-osd-bar=yes # display a progress bar on the terminal
  44. no-hidpi-window-scale # used on 5K iMac to prevent OSX scaling
  45. force-window=immediate
  46. cursor-autohide=1000 # autohide the curser after 1s
  47. deinterlace=no # global reset of deinterlacing to off
  48.  
  49.  
  50. ##############
  51. # Resolution #
  52. ##############
  53.  
  54. geometry=3840x2160 # force 4k resolution output from on Macs, rather than using MacOS upscaling
  55. fullscreen = no# start in fullscreen mode by default
  56.  
  57.  
  58. ##############
  59. # Colorspace #
  60. ##############
  61.  
  62. # see https://github.com/mpv-player/mpv/wiki/Video-output---shader-stage-diagram
  63.  
  64. icc-contrast=1000 # hides warnings about ICC errors; disable for OLED displays
  65. # icc-profile-auto=yes # enable for OLED displays
  66. target-prim=auto
  67. # target-prim=bt.709
  68. # target-prim=bt.2020 # target Rec.2020 (wide color gamut) for HDR TVs
  69. target-trc=auto
  70. gamma-auto
  71. vf=format=colorlevels=full:colormatrix=auto
  72. video-output-levels=full
  73.  
  74.  
  75. ##########
  76. # Dither #
  77. ##########
  78.  
  79. dither-depth=auto
  80. temporal-dither=yes
  81.  
  82.  
  83. #############
  84. # Debanding #
  85. #############
  86.  
  87. deband=yes # enabled by default but disabled for 4K videos, below
  88. deband-iterations=4 # deband steps
  89. deband-threshold=20 # deband strength
  90. deband-range=16 # deband range
  91. deband-grain=0 # dynamic grain: set to "0" if using the static grain shader
  92.  
  93.  
  94. #############
  95. # Subtitles #
  96. #############
  97.  
  98. blend-subtitles=yes
  99.  
  100.  
  101. #########################
  102. # Motion Interpolation #
  103. #########################
  104.  
  105. video-sync=display-resample
  106. interpolation=yes
  107. tscale=oversample # smoothmotion
  108.  
  109.  
  110. ################
  111. # Anti-Ringing #
  112. ################
  113.  
  114. scale-antiring=0.7 # luma upscale deringing
  115. dscale-antiring=0.7 # luma downscale deringing
  116. cscale-antiring=0.7 # chroma upscale deringing
  117.  
  118.  
  119. #############################################################
  120. # Upscaling & Processing Based on Source Video's Resolution #
  121. #############################################################
  122.  
  123. # Chroma subsampling means that chroma information is encoded at lower resolution than luma
  124. # In MPV, chroma is upscaled to luma resolution (video size) and then the converted RGB is upscaled to target resolution (screen size)
  125.  
  126. fbo-format=rgba16f # use with gpu-api=opengl
  127. # fbo-format=rgba16hf # use with gpu-api=vulkan
  128. glsl-shaders-clr
  129. glsl-shaders="~/.config/mpv/shaders/noise_static_luma.hook"
  130. glsl-shaders-append="~/.config/mpv/shaders/noise_static_chroma.hook"
  131. # luma upscaling
  132. glsl-shaders-append="~/.config/mpv/shaders/FSRCNNX_x2_8-0-4-1.glsl"
  133. # glsl-shaders-append="~/.config/mpv/shaders/FSRCNNX_x2_16-0-4-1.glsl" # 3x slower than 8-0-4-1 & only modest improvement
  134. scale=ewa_lanczos
  135. # luma downscaling
  136. glsl-shaders-append="~/.config/mpv/shaders/SSimDownscaler.glsl"
  137. dscale=mitchell
  138. linear-downscaling=yes
  139. # chroma upscaling and downscaling
  140. glsl-shaders-append="~/.config/mpv/shaders/KrigBilateral.glsl"
  141. cscale=mitchell
  142. sigmoid-upscaling=yes
  143.  
  144.  
  145. ############
  146. # Profiles #
  147. ############
  148.  
  149. [4k60] # 4K @ 60fps (3840x2160 UHDTV)
  150. profile-desc=cond:((p["video-params/w"]>1920 and p["video-params/h"]>1080) and p["estimated-vf-fps"]>=31)
  151. deband=no # turn off debanding because presume wide color gamut
  152. interpolation=no # turn off interpolation because already 60fps
  153.  
  154. [4k30] # 4K @ 30fps (3840x2160 UHDTV)
  155. profile-desc=cond:((p["video-params/w"]>1920 and p["video-params/h"]>1080) and p["estimated-vf-fps"]<31)
  156. deband=no # turn off debanding because presume wide color gamut
  157.  
  158. [full-hd60] # 1920x1080 @ 60fps (progressive ATSC)
  159. profile-desc=cond:((p["video-params/w"]==1920 and p["video-params/h"]==1080) and not p["video-frame-info/interlaced"] and p["estimated-vf-fps"]>=31)
  160. interpolation=no # turn off interpolation because already 60fps
  161.  
  162. [full-hd30] # 1920x1080 @ 30fps (progressive Blu-ray)
  163. profile-desc=cond:((p["video-params/w"]==1920 and p["video-params/h"]==1080) and not p["video-frame-info/interlaced"] and p["estimated-vf-fps"]<31)
  164.  
  165. [full-hd-interlaced] # 1920x1080i @ 30fps (HDTV, interlaced Blu-rays)
  166. profile-desc=cond:((p["video-params/w"]==1920 and p["video-params/h"]==1080) and p["video-frame-info/interlaced"])
  167. vf=bwdif # apply FFMPEG's bwdif deinterlacer
  168.  
  169. [hd] # 1280x720 @ 60 fps (HDTV, Blu-ray - progressive)
  170. profile-desc=cond:(p["video-params/w"]==1280 and p["video-params/h"] == 720)
  171. interpolation=no # turn off interpolation because already 60fps
  172.  
  173. [sdtv-pal] # 352x576, 480x576, 544x576, 720x576 @ 30fps (PAL broadcast or DVD - interlaced)
  174. profile-desc=cond:((p["video-params/w"]==352 or p["video-params/w"]==480 or p["video-params/w"]==544 or p["video-params/w"]==720) and p["video-params/h"] == 576)
  175. vf=bwdif # apply FFMPEG's bwdif deinterlacer
  176.  
  177. [sdtv-ntsc] # 640x480, 704x480, 720x480 @ 30fps (NTSC DVD - interlaced)
  178. profile-desc=cond:((p["video-params/w"]==640 or p["video-params/w"]==704 or p["video-params/w"]==720) and p["video-params/h"]==480)
  179. vf=bwdif # apply FFMPEG's bwdif deinterlacer
  180.  
  181. [default]
  182.  
  183.  
  184. ###################################
  185. # Protocol Specific Configuration #
  186. ###################################
  187.  
  188. [protocol.http]
  189. hls-bitrate=max # use max quality for HLS streams
  190. cache=yes
  191. no-cache-pause # don't pause when the cache runs low
  192.  
  193. [protocol.https]
  194. profile=protocol.http
  195.  
  196. [protocol.ytdl]
  197. profile=protocol.http
Advertisement
Add Comment
Please, Sign In to add comment