Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Details about configuring MPV for high quality video is covered here: https://freetime.mikeconnelly.com/archives/5371
- # The latest version of this file is here: https://github.com/classicjazz/mpv-config
- # All options are covered here: https://github.com/mpv-player/mpv/blob/master/DOCS/man/options.rst
- # All upscaling calculations are based on a 4K resolution display
- ###########
- # General #
- ###########
- ##vo=libmpv
- volume=28
- slang=eng
- #profile=gpu-hq - This is a high quality profile but the settings below are an improved version
- scale=ewa_lanczossharp
- cscale=ewa_lanczossharp
- dscale=mitchell
- dither-depth=auto
- correct-downscaling=yes
- linear-downscaling=yes
- sigmoid-upscaling=yes
- deband=yes
- vd-lavc-dr=yes
- gpu-api=vulkan # if your PC/mobile device/STB supports Vulkan then you should uncomment these and comment out the opengl settings above
- vulkan-async-compute=yes
- vulkan-async-transfer=yes
- vulkan-queue-count=1
- hwdec=auto # turn off for better quality with software decoding
- ########
- # Misc #
- ########
- border=yes # hide the window title bar
- msg-color=yes # color log messages on terminal
- term-osd-bar=yes # display a progress bar on the terminal
- no-hidpi-window-scale # used on 5K iMac to prevent OSX scaling
- force-window=immediate
- cursor-autohide=1000 # autohide the curser after 1s
- deinterlace=no # global reset of deinterlacing to off
- ##############
- # Resolution #
- ##############
- geometry=3840x2160 # force 4k resolution output from on Macs, rather than using MacOS upscaling
- fullscreen = no# start in fullscreen mode by default
- ##############
- # Colorspace #
- ##############
- # see https://github.com/mpv-player/mpv/wiki/Video-output---shader-stage-diagram
- icc-contrast=1000 # hides warnings about ICC errors; disable for OLED displays
- # icc-profile-auto=yes # enable for OLED displays
- target-prim=auto
- # target-prim=bt.709
- # target-prim=bt.2020 # target Rec.2020 (wide color gamut) for HDR TVs
- target-trc=auto
- gamma-auto
- vf=format=colorlevels=full:colormatrix=auto
- video-output-levels=full
- ##########
- # Dither #
- ##########
- dither-depth=auto
- temporal-dither=yes
- #############
- # Debanding #
- #############
- deband=yes # enabled by default but disabled for 4K videos, below
- deband-iterations=4 # deband steps
- deband-threshold=20 # deband strength
- deband-range=16 # deband range
- deband-grain=0 # dynamic grain: set to "0" if using the static grain shader
- #############
- # Subtitles #
- #############
- blend-subtitles=yes
- #########################
- # Motion Interpolation #
- #########################
- video-sync=display-resample
- interpolation=yes
- tscale=oversample # smoothmotion
- ################
- # Anti-Ringing #
- ################
- scale-antiring=0.7 # luma upscale deringing
- dscale-antiring=0.7 # luma downscale deringing
- cscale-antiring=0.7 # chroma upscale deringing
- #############################################################
- # Upscaling & Processing Based on Source Video's Resolution #
- #############################################################
- # Chroma subsampling means that chroma information is encoded at lower resolution than luma
- # In MPV, chroma is upscaled to luma resolution (video size) and then the converted RGB is upscaled to target resolution (screen size)
- fbo-format=rgba16f # use with gpu-api=opengl
- # fbo-format=rgba16hf # use with gpu-api=vulkan
- glsl-shaders-clr
- glsl-shaders="~/.config/mpv/shaders/noise_static_luma.hook"
- glsl-shaders-append="~/.config/mpv/shaders/noise_static_chroma.hook"
- # luma upscaling
- glsl-shaders-append="~/.config/mpv/shaders/FSRCNNX_x2_8-0-4-1.glsl"
- # glsl-shaders-append="~/.config/mpv/shaders/FSRCNNX_x2_16-0-4-1.glsl" # 3x slower than 8-0-4-1 & only modest improvement
- scale=ewa_lanczos
- # luma downscaling
- glsl-shaders-append="~/.config/mpv/shaders/SSimDownscaler.glsl"
- dscale=mitchell
- linear-downscaling=yes
- # chroma upscaling and downscaling
- glsl-shaders-append="~/.config/mpv/shaders/KrigBilateral.glsl"
- cscale=mitchell
- sigmoid-upscaling=yes
- ############
- # Profiles #
- ############
- [4k60] # 4K @ 60fps (3840x2160 UHDTV)
- profile-desc=cond:((p["video-params/w"]>1920 and p["video-params/h"]>1080) and p["estimated-vf-fps"]>=31)
- deband=no # turn off debanding because presume wide color gamut
- interpolation=no # turn off interpolation because already 60fps
- [4k30] # 4K @ 30fps (3840x2160 UHDTV)
- profile-desc=cond:((p["video-params/w"]>1920 and p["video-params/h"]>1080) and p["estimated-vf-fps"]<31)
- deband=no # turn off debanding because presume wide color gamut
- [full-hd60] # 1920x1080 @ 60fps (progressive ATSC)
- 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)
- interpolation=no # turn off interpolation because already 60fps
- [full-hd30] # 1920x1080 @ 30fps (progressive Blu-ray)
- 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)
- [full-hd-interlaced] # 1920x1080i @ 30fps (HDTV, interlaced Blu-rays)
- profile-desc=cond:((p["video-params/w"]==1920 and p["video-params/h"]==1080) and p["video-frame-info/interlaced"])
- vf=bwdif # apply FFMPEG's bwdif deinterlacer
- [hd] # 1280x720 @ 60 fps (HDTV, Blu-ray - progressive)
- profile-desc=cond:(p["video-params/w"]==1280 and p["video-params/h"] == 720)
- interpolation=no # turn off interpolation because already 60fps
- [sdtv-pal] # 352x576, 480x576, 544x576, 720x576 @ 30fps (PAL broadcast or DVD - interlaced)
- 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)
- vf=bwdif # apply FFMPEG's bwdif deinterlacer
- [sdtv-ntsc] # 640x480, 704x480, 720x480 @ 30fps (NTSC DVD - interlaced)
- 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)
- vf=bwdif # apply FFMPEG's bwdif deinterlacer
- [default]
- ###################################
- # Protocol Specific Configuration #
- ###################################
- [protocol.http]
- hls-bitrate=max # use max quality for HLS streams
- cache=yes
- no-cache-pause # don't pause when the cache runs low
- [protocol.https]
- profile=protocol.http
- [protocol.ytdl]
- profile=protocol.http
Advertisement
Add Comment
Please, Sign In to add comment