Advertisement
Guest User

2. from the guy

a guest
May 5th, 2022
1,393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.44 KB | None | 0 0
  1. # MPV - mpv.conf
  2. # classicjazz - 2022-04-19
  3.  
  4. # Details about configuring MPV for high quality video are covered here: https://freetime.mikeconnelly.com/archives/5371
  5. # The latest version of this file is located here: https://github.com/classicjazz/mpv-config
  6.  
  7. # All MPV options are covered here: https://github.com/mpv-player/mpv/blob/master/DOCS/man/options.rst
  8. # All of my upscaling calculations assume a native 4K resolution display
  9. # Additionally, my target displays all support HDR, so tone-mapping for SDR is not necessary
  10.  
  11. # I am slowly incorporating changes anticipating using vo=gpu-next in the future
  12. # https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPU
  13.  
  14. # This config file assumes that you are using a version of MPV that supports Conditional Profiles (i.e. auto-profiles.lau is no longer required). Tested with mpv v0.34.1
  15.  
  16. ###########
  17. # General #
  18. ###########
  19.  
  20.  
  21.  
  22. profile=gpu-hq # used for any other OS on modern hardware
  23. # profile=gpu-next # for future use
  24.  
  25. # Selected API: select either Vulkan (preferred) or OpenGL
  26. # Note: MacOS devices are currently limited to OpenGL v4.1 (which is deprecated). For iOS/tvOS/MacOS devices, Metal v2 would be preferred but there is not currently a Metal backend. In the future, a workaround may be to use mpv + libplacebo + MoltenVK
  27.  
  28.  
  29.  
  30. # Vulkan settings
  31. gpu-api=vulkan
  32. vulkan-async-compute=yes
  33. vulkan-async-transfer=yes
  34. vulkan-queue-count=1
  35. vd-lavc-dr=yes
  36.  
  37. hwdec=auto # enable best HW decoder; turn off for software decoding
  38. reset-on-next-file=audio-delay,mute,pause,speed,sub-delay,video-aspect-override,video-pan-x,video-pan-y,video-rotate,video-zoom,volume
  39.  
  40.  
  41. ######
  42. # UI #
  43. ######
  44.  
  45. border=no # hide the window title bar
  46. macos-title-bar-material=dark
  47. msg-color=yes # color log messages on terminal
  48. term-osd-bar=yes # display a progress bar on the terminal
  49. no-hidpi-window-scale # used on 5K iMac to prevent scaling by OSX
  50. force-window=immediate
  51. cursor-autohide=1000 # autohide the curser after 1s
  52. geometry=3840x2160 # force 4k resolution output from on Macs, rather than using MacOS upscaling
  53. # fullscreen = yes # start in fullscreen mode by default
  54.  
  55.  
  56. ############
  57. # Playback #
  58. ############
  59.  
  60. deinterlace=no # global reset of deinterlacing to off
  61.  
  62.  
  63. ##############
  64. # Colorspace #
  65. ##############
  66.  
  67. # see https://github.com/mpv-player/mpv/wiki/Video-output---shader-stage-diagram
  68. target-prim=auto
  69. # target-prim=bt.709 # target Rec.709 for SDR TVs
  70. # target-prim=bt.2020 # target Rec.2020 (wide color gamut) for HDR TVs
  71. target-trc=auto
  72. gamma-auto
  73. vf=format=colorlevels=full:colormatrix=auto
  74. video-output-levels=full
  75.  
  76.  
  77. ##########
  78. # Dither #
  79. ##########
  80.  
  81. dither-depth=auto
  82. temporal-dither=yes
  83. # dither=error-diffusion # preferable... mpv will fallback on fruit if compute shaders are not supported
  84. dither=fruit
  85.  
  86. #############
  87. # Debanding #
  88. #############
  89.  
  90. deband=yes # enabled by default
  91. deband-iterations=4 # deband steps
  92. deband-threshold=48 # deband strength
  93. deband-range=16 # deband range
  94. deband-grain=48 # dynamic grain: set to "0" if using the static grain shader
  95.  
  96.  
  97. #############
  98. # Subtitles #
  99. #############
  100.  
  101. blend-subtitles=yes
  102.  
  103. #########################
  104. # Motion Interpolation #
  105. #########################
  106.  
  107.  
  108. video-sync=display-resample
  109. interpolation=yes
  110. tscale=oversample # smoothmotion
  111.  
  112.  
  113. ################
  114. # Anti-Ringing #
  115. ################
  116.  
  117. scale-antiring=0.7 # luma upscale deringing
  118. dscale-antiring=0.7 # luma downscale deringing
  119. cscale-antiring=0.7 # chroma upscale deringing
  120.  
  121.  
  122. #############################################################
  123. # Upscaling & Processing Based on Source Video's Resolution #
  124. #############################################################
  125.  
  126. # Chroma subsampling means that chroma information is encoded at lower resolution than luma
  127. # In MPV, chroma is upscaled to luma resolution (video size) and then the converted RGB is upscaled to target resolution (screen size)
  128. # For detailed analysis of upscaler/downscaler quality, see https://artoriuz.github.io/blog/mpv_upscaling.html
  129.  
  130.  
  131. fbo-format=rgba16hf # use with gpu-api=vulkan
  132. # fbo-format is not not supported in gpu-next profile
  133. glsl-shaders-clr
  134. # luma upscaling
  135. # note: any FSRCNNX above FSRCNNX_x2_8-0-4-1 is not worth the additional computional overhead
  136. glsl-shaders="~/.config/mpv/shaders/FSRCNNX_x2_8-0-4-1.glsl"
  137. scale=ewa_lanczos
  138. # luma downscaling
  139. # note: ssimdownscaler is tuned for mitchell and downscaling=no
  140. glsl-shaders-append="~/.config/mpv/shaders/SSimDownscaler.glsl"
  141. dscale=mitchell
  142. linear-downscaling=no
  143. # chroma upscaling and downscaling
  144. glsl-shaders-append="~/.config/mpv/shaders/KrigBilateral.glsl"
  145. cscale=mitchell # ignored with gpu-next
  146. sigmoid-upscaling=yes
  147.  
  148.  
  149. ############
  150. # Profiles #
  151. ############
  152.  
  153. [4k60] # 2160p @ 60fps (3840x2160 UHDTV)
  154. profile-desc=4k60
  155. profile-cond=((width ==3840 and height ==2160) and p["estimated-vf-fps"]>=31)
  156. # deband=yes # necessary to avoid blue screen with KrigBilateral.glsl
  157. deband=no # turn off debanding because presume wide color gamut
  158. interpolation=no # turn off interpolation because presume 60fps
  159. # UHD videos are already 4K so no luma upscaling is needed
  160. # UHD videos are YUV420 so chroma upscaling is still needed
  161. glsl-shaders-clr
  162. # glsl-shaders="~/.config/mpv/shaders/KrigBilateral.glsl" # enable if your hardware can support it
  163. interpolation=no # no motion interpolation required because 60fps is hardware ceiling
  164. # no deinterlacer required because progressive
  165.  
  166. [4k30] # 2160p @ 24-30fps (3840x2160 UHDTV)
  167. profile-cond=((width ==3840 and height ==2160) and p["estimated-vf-fps"]<31)
  168. # deband=yes # necessary to avoid blue screen with KrigBilateral.glsl
  169. deband=no # turn off debanding because presume wide color gamut
  170. # UHD videos are already 4K so no luma upscaling is needed
  171. # UHD videos are YUV420 so chroma upscaling is still needed
  172. glsl-shaders-clr
  173. # glsl-shaders="~/.config/mpv/shaders/KrigBilateral.glsl" # enable if your hardware can support it
  174. # apply motion interpolation
  175. # no deinterlacer required because progressive
  176.  
  177. [full-hd60] # 1080p @ 60fps (progressive ATSC)
  178. profile-desc=full-hd60
  179. profile-cond=((width ==1920 and height ==1080) and not p["video-frame-info/interlaced"] and p["estimated-vf-fps"]>=31)
  180. # apply all luma and chroma upscaling and downscaling settings
  181. interpolation=no # no motion interpolation required because 60fps is hardware ceiling
  182. # no deinterlacer required because progressive
  183.  
  184. [full-hd30] # 1080p @ 24-30fps (NextGen TV/ATSC 3.0, progressive Blu-ray)
  185. profile-desc=full-hd30
  186. profile-cond=((width ==1920 and height ==1080) and not p["video-frame-info/interlaced"] and p["estimated-vf-fps"]<31)
  187. # apply all luma and chroma upscaling and downscaling settings
  188. # apply motion interpolation
  189. # no deinterlacer required because progressive
  190.  
  191. [full-hd-interlaced] # 1080i @ 24-30fps (HDTV, interlaced Blu-rays)
  192. profile-desc=full-hd-interlaced
  193. profile-cond=((width ==1920 and height ==1080) and p["video-frame-info/interlaced"] and p["estimated-vf-fps"]<31)
  194. # apply all luma and chroma upscaling and downscaling settings
  195. # apply motion interpolation
  196. vf=bwdif # apply FFMPEG's bwdif deinterlacer
  197.  
  198. [hd] # 720p @ 60 fps (HDTV, Blu-ray - progressive)
  199. profile-desc=hd
  200. profile-cond=(width ==1280 and height ==720)
  201. # apply all luma and chroma upscaling and downscaling settings
  202. interpolation=no # no motion interpolation required because 60fps is hardware ceiling
  203. # no deinterlacer required because progressive
  204.  
  205. [sdtv-ntsc] # 640x480, 704x480, 720x480 @ 30fps (NTSC DVD - interlaced)
  206. profile-desc=sdtv-ntsc
  207. profile-cond=((width ==640 and height ==480) or (width ==704 and height ==480) or (width ==720 and height ==480))
  208. # apply all luma and chroma upscaling and downscaling settings
  209. # apply motion interpolation
  210. vf=bwdif # apply FFMPEG's bwdif deinterlacer
  211.  
  212. [sdtv-pal] # 352x576, 480x576, 544x576, 720x576 @ 30fps (PAL broadcast or DVD - interlaced)
  213. profile-desc=sdtv-pal
  214. profile-cond=((width ==352 and height ==576) or (width ==480 and height ==576) or (width ==544 and height ==576) or (width ==720 and height ==576))
  215. # apply all luma and chroma upscaling and downscaling settings
  216. # apply motion interpolation
  217. vf=bwdif # apply FFMPEG's bwdif deinterlacer
  218.  
  219. [default]
  220.  
  221.  
  222. ###################################
  223. # Protocol Specific Configuration #
  224. ###################################
  225.  
  226. [protocol.http]
  227. hls-bitrate=max # use max quality for HLS streams
  228. cache=yes
  229. no-cache-pause # don't pause when the cache runs low
  230.  
  231. [protocol.https]
  232. profile=protocol.http
  233.  
  234. [protocol.ytdl]
  235. profile=protocol.http
  236.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement