# starting anew, sigh, with https://github.com/sentakuhm/Mpv-Windows/blob/master/portable_config/mpv.conf # once done, check for deprications etc here https://github.com/mpv-player/mpv/releases/tag/v0.37.0 ########### Other sources ############# ## https://samsantana.com/mpv-configuration-guide/ ## ClassyJazz 2022-07-02 https://github.com/classicjazz/mpv-config ####################################### ## All MPV options are covered here: https://github.com/mpv-player/mpv/blob/master/DOCS/man/options.rst ## All of my upscaling calculations assume a native 4K resolution display ## Additionally, my target displays all support HDR, so tone-mapping for SDR is not necessary ####################################### log-file=~~home/logs/mpv.log # If you want to see the log, uncomment this line. msg-level=ffmpeg=error,cplayer=warn,auto_profiles=warn,autoload=warn,autocrop=warn # print_perfdata_passes # no such option ########### # GPU API # ########### # Controls which type of graphics APIs will be accepted, switch to "d3d11" (on Windows) or "opengl" if you have issues # Uncomment one API only ###### Vulkan Linux, Windows (preferred) gpu-api=vulkan vulkan-async-compute=yes vulkan-async-transfer=yes vulkan-queue-count=1 vd-lavc-dr=yes target-prim=auto target-trc=auto #vf=format=colorlevels=full:colormatrix=auto # disable if you do not like your colors and compare video-output-levels=full # disable if you do not like your colors and compare ###### DirectX on Windows # gpu-api=d3d11 ###### OpenGL on Linux or macOS or Windows # gpu-api=opengl ########## # Player # ########## input-ipc-server=mpvpipe hr-seek-framedrop=no # no-resume-playback # uncomment this line to prevent video resume keep-open # https://github.com/natural-harmonia-gropius/mpv-config/blob/master/portable_config/mpv.conf save-position-on-quit resume-playback-check-mtime watch-later-options=start,vid,aid,sid reset-on-next-file=pause,loop-file,brightness,contrast,gamma,saturation,hue,deinterlace,vf,af border=no # recommended for ModernX OSC msg-color=yes msg-module=yes ###### General # fullscreen=yes # Always open the video player in full screen keep-open=no # (yes=Don't) Close the player after finishing the video autofit=45%x45% # Start mpv with a % smaller resolution of your screen cursor-autohide=100 # Cursor hide in ms ############### # Screenshots # ############### screenshot-directory=~~home/Screens/ # TODO figure out how to put screenshots here by default by editing the line below screenshot-template="%x\\Screens\\Screenshot-%F-T%wH.%wM.%wS.%wT-F%{estimated-frame-number}" screenshot-format=png # Set screenshot format screenshot-png-compression=0 # Range is 0 to 10. 0 being no compression. screenshot-tag-colorspace=yes screenshot-high-bit-depth=yes # Same output bitdepth as the video ########### # OSC/OSD # ########### osc=no # 'no' required for MordernX OSC osd-bar=yes # Do not remove/comment if mpv_thumbnail_script_client_osc.lua is being used. osd-font='Inter Tight Medium' # Set a font for OSC osd-font-size=30 # Set a font size osd-color='#CCFFFFFF' # ARGB format osd-border-color='#DD322640' # ARGB format osd-bar-align-y=-1 # progress bar y alignment (-1 top, 0 centered, 1 bottom) osd-border-size=2 # size for osd text and progress bar osd-bar-h=1 # height of osd bar as a fractional percentage of your screen height osd-bar-w=60 # width of " " " #osd-level=3 # Display time elapsed and playtime in the top left corner ######## # Subs # ######## #sub-color=1.0/0.0/0.0/1.0 # TESTING are your subs bright red? blend-subtitles=no # blend-subtitles=yes sub-ass-vsfilter-blur-compat=yes # Backward compatibility for vsfilter fansubs # sub-ass-style-overrides=Kerning=yes # allows you to override style parameters of ASS scripts sub-ass-scale-with-window=no # May have undesired effects with signs being misplaced. sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload # sub-gauss=0.6 # Some settings fixing VOB/PGS subtitles (creating blur & changing yellow subs to gray) sub-file-paths-append=ass # search for external subs in these relative subdirectories sub-file-paths-append=srt sub-file-paths-append=sub sub-file-paths-append=subs sub-file-paths-append=subtitles demuxer-mkv-subtitle-preroll=yes # try to correctly show embedded subs when seeking embeddedfonts=yes # use embedded fonts for SSA/ASS subs sub-scale=0.7 # scale percentage per https://unix.stackexchange.com/questions/362828/making-subtitles-srt-bigger-or-smaller-with-mpv #sub-font-size=50 sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases). Enable if there are scenebleeds. # sub-use-margins # sub-ass-force-margins ################# # Subs - Forced # ################# # the following forced options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT) # sub-font=Akhbar # sub-font-size=46 # sub-blur=0.3 # sub-border-color=0.0/0.0/0.0/0.8 # sub-border-size=3.2 # sub-color=0.9/0.9/0.9/1.0 # sub-margin-x=100 # sub-margin-y=50 # sub-shadow-color=0.0/0.0/0.0/0.25 # sub-shadow-offset=0 # sub-font='Arial Regular' #sub-font='Bitstream Vera Sans' #sub-font='Comic Sans MS' sub-font-size=40 # 36 is default https://github.com/wopian/mpv-config/blob/master/mpv.conf#L37 sub-blur=0.1 sub-spacing=0.5 sub-margin-x=100 sub-margin-y=50 #sub-color="#FFFFFFFF" sub-color='#CDCDCD' sub-border-color="#FF262626" sub-border-size=1 # sub-shadow=3 # no such option according to console, todo is check logs # sub-shadow-offset=1 sub-shadow-offset=2 #sub-shadow-color="#33000000" sub-shadow-color='#000000' sub-ass-override=force blend-subtitles ######### # Cache # ######### # Configure the cache to be really big (multiple GBs) # We have a lot of memory, so why not use it for something cache=yes demuxer-seekable-cache=yes #demuxer-max-bytes=1147483647 # ~1 GiB in bytes demuxer-max-bytes=2147483647 # ~2 GiB in bytes demuxer-max-back-bytes=1147483647 ######### # Audio # ######### volume-max=120 # maximum volume in %, everything above 100 results in amplification audio-stream-silence # fix audio popping on random seek 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 ad-lavc-downmix=no # https://github.com/wopian/mpv-config/blob/master/mpv.conf#L37 audio-channels=stereo # https://github.com/wopian/mpv-config/blob/master/mpv.conf#L37 af=dynaudnorm # https://github.com/wopian/mpv-config/blob/master/mpv.conf#L37 # # DTS-MA decoding ad=lavc:libdcadec autosync=30 # Default sub/audio # Languages # alang=ja,jp,jpn,enGB,en-GB,en,eng,enUS,en-US # Audio language priority slang=SDH,enSDH,en-SDH,CC,enCC,en-CC,engCC,eng-CC,enGB,en-GB,en,eng,enUS,en-US,unknown,und,undefined # Subtitle language priority ytdl-raw-options=sub-lang="enGB,en-GB,en,eng,enUS,en-US",write-sub= # YouTube DownLoader ################## # Video Profiles # ################## profile=gpu-hq # no such option as 'show-profile=gpu-hq' hwdec=vulkan # if you want to try gpu decoding #hwdec=auto-copy-safe # enable hardware decoding, defaults to 'no' # gpu-next profile # for future use # the future is now https://github.com/Artoriuz/glsl-joint-bilateral # vo=gpu-next # GPU-Next: https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPU ###### Dither dither-depth=auto temporal-dither=yes dither=error-diffusion # preferable... mpv will fallback on fruit if compute shaders are not supported dither=fruit ###### Debanding deband=yes # enabled by default deband-iterations=4 # deband steps #deband-threshold=35 deband-threshold=48 # deband strength deband-range=16 # deband range #deband-grain=4 deband-grain=48 # dynamic grain: set to "0" if using the static grain shader ######################### # Motion Interpolation # ######################### display-fps-override=60 video-sync=display-resample interpolation=yes # tscale=oversample # smoothmotion tscale=sphinx tscale-blur=0.6991556596428412 tscale-radius=1.05 tscale-clamp=0.0 ###### SDR tone-mapping=bt.2446a # tends to be dark, disable this option if you think the image is too dark ###### HDR # d3d11-output-csp=pq # if you use d3d11 instead of Vulkan target-colorspace-hint=yes # https://www.reddit.com/r/mpv/comments/s11ub3/mpv_with_hdr/ ############## # Colorspace # ############## ### https://video.matrox.com/en/media/guides-articles/introduction-color-spaces-video # see https://github.com/mpv-player/mpv/wiki/Video-output---shader-stage-diagram # target-prim=auto # https://mpv.io/manual/master/#options-target-prim # already enabled above # target-prim=bt.709 # target Rec.709 for SDR TVs #target-prim=bt.2020 # default is enabled # disable if colours are too gray # target Rec.2020 (wide color gamut) for HDR TVs # https://github.com/mpv-player/mpv/wiki/FAQ#hdr-doesnt-work-on-my-monitor #target-trc=auto # gamma-auto # obsolete option ###### https://github.com/mpv-player/mpv/issues/12483 ## The order of the shaders absolutely matters, specially when using LUMA prescalers like FSRCNNX or RAVU and CHROMA scalers like Krig or Joint. ## You want the LUMA prescaler first so the CHROMA scaler can interpolate the information from the scaled LUMA plane dscale=catmull_rom correct-downscaling=yes linear-downscaling=no # Different shaders: a quick introduction: https://github.com/mpv-player/mpv/wiki/User-Scripts#user-shaders # I made this config with a 4k HDR screen in mind. If your screen is smaller, do take a look at the above links for downscaling! ###### Luma prescalers first (test one of the option sets below) (Also see: https://artoriuz.github.io/blog/mpv_upscaling.html) #### FSR*** shaders... How What Where When? https://gist.github.com/agyild/82219c545228d70c5604f865ce0b0ce5#comments . Quote: #### "use FSRSCNNX for content up to 720p. Anything higher resolution than that (e.g., 1080p), use FSR. In the end it is a personal preference". TIP: use auto load profiles ### https://gist.github.com/agyild has 3 FSR shaders: 1 for NVIDIA (NVScaler.glsl) and 2 for AMD/OTHERS (zoom to max 4 + sharpening) (FSR.glsl + CAS-SCALED.glsl) ### Made to directly operate on LUMA plane, this is faster since the original shaders were operating on LUMA by deriving it from RGB ### https://www.antixforum.com/forums/topic/mpv-hwdecauto/page/2/: luma upscalers with max. 2x zoom are ravu, FSRCNN, SSimSuperRes ### SO, in short, CHOSE between OPTION SET 1, OPTION SET 2, OPTION SET 3, OPTION SET 4, OPTION SET 5, OPTION SET 6, ..., ... ### How to chose? Test. Also: https://www.reddit.com/r/shaders/comments/giptkj/ai_upscale_shaders_in_realtime_mpv_video_player/ ### ################## BEGIN of AMD FSR / NVidia AGYILD ############################### OPTION SET 1 ### FSR: Pick either NVScaler OR FSR/CAS-scaled below. Selecting more is allowed but that wouldn't be advised. Download from: https://gist.github.com/agyild ### Per AMD's guidelines only upscales content up to 4x (e.g., 1080p -> 2160p, 720p -> 1440p etc.) and everything else in between, ### that means CAS will scale up to 4x at maximum, and any further scaling will be processed by mpv's scalers #1# glsl-shader="~~/shaders/NVScaler.glsl" # NVIDIA Scaler from https://gist.github.com/agyild # sharpens and blows up source to output resolution screen (max 4x zoom) #2A# glsl-shader="~~/shaders/FSR.glsl" # AMD FidelityFX Super Resolution v1.0.2 for mpv #2B# glsl-shader="~~/shaders/CAS-scaled.glsl" # AMD FidelityFX Contrast Adaptive Sharpening v1.0.2 for mpv ################## BEGIN of FSRCNNX IGV ############################## OPTION SET 2 ### FSRSCNNX is FSRCNN but extended with local residual neural network learning and recursive blocks ### Download from https://github.com/igv/FSRCNN-TensorFlow/releases/ ### Requires "fbo-format=rgba16f" (rgba16hf for vulkan and d3d11) ### The bigger the numbers the more your computer will heat the room. Pick only 1. You probably want to disable the NVScaler or FSR and CAS-scaled shaders above #1# glsl-shader="~~/shaders/FSRCNNX_x2_8-0-4-1.glsl" #2# glsl-shader="~~/shaders/FSRCNNX_x2_16-0-4-1.glsl" # lots of dropped frames on NVidia GTX 1050ti despite GPU Task Manager not being maxed out ### There is a THIRD IGV version of this network trained to remove strong compression artifacts https://github.com/HelpSeeker/FSRCNN-TensorFlow/releases/tag/1.1_distort ### They aren't as sharp and will remove small details. Don't use these shaders for high quality footage! If you use 1 of these 2 options, disable x2_8 + x2_16 above! #3A# glsl-shader="~~/shaders/FSRCNNX_x2_16-0-4-1_enhance.glsl" ## OR ## #3B# even stronger compression artifact removal, not suited for real life content, unless you feel like your videos lack a certain pastel painting look #3B# glsl-shader="~~/shaders/FSRCNNX_x2_16-0-4-1_anime_enhance.glsl" ################## BEGIN of TSUBA UP/DOWN SENTAKUHM ########################### OPTION SET 3 ### I had a hard time even finding these two files... So it's not popular at all! ### Download https://github.com/sentakuhm/Mpv-Windows/tree/master/portable_config/shaders ### You may enable both options at the same time. One is for UPscaling, the other is for DOWNscaling :) ### TsubaUP / TsubaDS don't show up with its names in (shift) I-2 overview. You know it loaded because there are more processes active ### glsl-shader="~~/shaders/TsubaUP.glsl" ### glsl-shader="~~/shaders/TsubaDS.glsl" ################## BEGIN of SSim UP/DOWN IGV ########################### OPTION SET 4 ### Download https://gist.github.com/igv ### You may enable both options at the same time. ### glsl-shader="~~/shaders/SSimSuperRes.glsl" # Basically it's an accurate sharpener + antiringing ### glsl-shader="~~/shaders/SSimDownscaler.glsl" # Tuned for "linear-downscaling=no". ################## BEGIN of RAVU BJIN ########################### OPTION SET 5A ### All shaders are for one pass only. If you want to have 4x upscaling, trigger the same shader twice. For 4x luma prescaling, use #### shaders="~~/shaders/nnedi3-nns32-win8x4.hook,~~/shaders/nnedi3-nns32-win8x4.hook" ### ravu shaders background and downloads: https://github.com/bjin/mpv-prescalers/blob/master/README.md (So... READ IT!!) #### gather/ shaders uses textureGather() functions, and are usually faster for luma upscalers (nnedi3, ravu, ravu-lite and ravu-zoom). #### compute/ shaders are compute shaders, and are faster for -yuv and -rgb upscalers. #### Shaders in root folder are safe fallback option with minimal requirement for GPU driver or OpenGL version ### ravu and ravu-lite upscale only luma plane (of a YUV video), which means chroma planes will be handled by --cscale later. ravu-lite is ### faster and sharper. It also introduces no half pixel offset. ### r4 has a larger filter radius, it's slower and sharper. If you are not sure, just use r3 https://github.com/bjin/mpv-prescalers/issues/48 ### Ravu-lite is 4x upscaling (FACT CHECK DETAILS: ALWAYS 4x OR POSSIBLE UP TO 4x AUTOMATICALLY?) #glsl-shader="~~home/shaders/ravu/gather/ravu-lite-r3.hook" #glsl-shader="~~home/shaders/ravu/gather/ravu-lite-ar-r3.hook" # ar = anti-ringing #glsl-shader="~~home/shaders/ravu/gather/ravu-lite-r4.hook" #glsl-shader="~~home/shaders/ravu/gather/ravu-lite-ar-r4.hook" # best luma-doubler according to https://artoriuz.github.io/blog/mpv_upscaling.html # ar = anti-ringing #glsl-shader="~~home/shaders/ravu/gather/ravu-r3.hook" #glsl-shader="~~home/shaders/ravu/gather/ravu-r4.hook" #glsl-shader="~~home/shaders/ravu/gather/ravu-zoom-r3.hook" #glsl-shader="~~home/shaders/ravu/gather/ravu-zoom-ar-r3.hook" # ravu-zoom-ar-r3.hook might be a better option for zoom factors > 2x (? FACT CHECK PLEASE) ################## BEGIN of RAVU RGB and RAVU YUV BJIN ########################### OPTION SET 5B (chose EITHER 5A ** OR ** 5B, don't mix both!!) ### All shaders are for one pass only. If you want to have 4x upscaling, trigger the same shader twice. For 4x luma prescaling, use #### shaders="~~/shaders/nnedi3-nns32-win8x4.hook,~~/shaders/nnedi3-nns32-win8x4.hook" ### Also Upscaling + Sharpening, like OPTION SET 5A ### They upscale video after all planes are merged. This happens after --cscale (or other chroma prescaler) is applied. ravu-yuv assumes YUV video and ### will fail on others (for example, PNG picture) ### WARNING Ravu "RGB" and "YUV" work on both luma + chroma in one shader # https://www.reddit.com/r/mpv/comments/184f4bk/comment/kbk841m ### ravu-zoom is able to upscale video to arbitrary ratio directly (i.e. a drop-in replacement of --scale). Its sharpness is ### close to ravu-lite. But it renders at target resolution, so expect it to be much slower than ravu and ravu-lite above for perfect 2x upscaling ### ### Huh? YUV? RGB? What?? Read: https://dexonsystems.com/blog/rgb-yuv-color-spaces ### ### Suffix in the filename indicates the type of planes shader is hooked on (ravu supports only luma and chroma planes) ### FROM: https://github.com/bjin/mpv-prescalers/tree/1fb1c079405b674d54206ff2c52fd520db63ff10 ### Without any suffix: Triggered on luma plane only (like prescale-luma=... option in mpv). ### -chroma: Triggered on chroma plane only. ### -yuv: Triggered on both luma and chroma planes. ### -all: Triggered on all source planes (including non-YUV formats). #glsl-shader="~~/shaders/ravu/compute/ravu-r3-rgb.hook" # Note that evaluation results shows that improvement by radius=4 is #glsl-shader="~~/shaders/ravu/compute/ravu-r4-rgb.hook" # minimal (less than 0.1dB in PSNR), radius=3 should be enough for daily purpose #glsl-shader="~~/shaders/ravu/compute/ravu-zoom-r3-rgb.hook" # start with this one enabled first # good balance between performance and quality #glsl-shader="~~/shaders/ravu/compute/ravu-zoom-ar-r3-rgb.hook" # ar = anti ring #glsl-shader="~~/shaders/ravu/compute/ravu-3x-r3-rgb.hook" #glsl-shader="~~/shaders/ravu/compute/ravu-3x-r4-rgb.hook" # glsl-shader="~~/shaders/ravu-zoom-r3-yuv.hook" ########### BEGIN of NEDI3 BJIN ########################### OPTION SET 6 ### All shaders are for one pass only. If you want to have 4x upscaling, trigger the same shader twice. For 4x luma prescaling, use #### shaders="~~/shaders/nnedi3-nns32-win8x4.hook,~~/shaders/nnedi3-nns32-win8x4.hook" ### RAVU is more like EWA scalers in general. it won't produce sharp upscaled image like nnedi3 and super-xbr, but it produces fewer ### artifacts like aliasing. It also seems to connect #edges well. Anyway, I think it's not strictly better than either NNEID3 or superxbr. ### From: https://github.com/bjin/mpv-prescalers/issues/8 ### For nnedi3 prescaler, neurons and window settings are indicated in the filename. ### Known Issue Dec. 2024: nnedi3-nns32-win8x6-{chroma,yuv,all}.hook are extremely slow with certain version of nvidia driver #glsl-shader="~~home/shaders/nnedi3/gather/nnedi3-nns16-win8x4.hook" #glsl-shader="~~home/shaders/nnedi3/gather/nnedi3-nns32-win8x6.hook" #glsl-shader="~~home/shaders/nnedi3/gather/nnedi3-nns128-win8x4.hook" # dropped frames on GTX 1050ti #glsl-shader="~~home/shaders/nnedi3/gather/nnedi3-nns256-win8x6.hook" # allround bad experience on my NVidia Geforce GTX 1050ti ########### BEGIN of SuperXBR BJIN (and HOOKE007) ########################## OPTION SET 7 ### All shaders are for one pass only. If you want to have 4x upscaling, trigger the same shader twice. For 4x luma prescaling, use #### shaders="~~/shaders/nnedi3-nns32-win8x4.hook,~~/shaders/nnedi3-nns32-win8x4.hook" ### ### {superxbr,ravu*}-native.hook are native implementations of superxbr and ravu, that will do the upscaling on RGB, and is most likely the one you ### want to use. {superxbr,ravu*}-native-yuv.hook are similar shaders but require the original source to be YUV. # super-xbr discussion: https://github.com/mpv-player/mpv/issues/3226 # Official download: https://github.com/bjin/mpv-prescalers/tree/1fb1c079405b674d54206ff2c52fd520db63ff10 # Unofficial Download: https://github.com/hooke007/MPV_lazy/tree/bfea2cd24f34c0eb695eec44b25355db9bfb3d6d/portable_config/shaders # BUT ISSUE: https://github.com/hooke007/MPV_lazy/issues/392 so manually add //!DESC from original sources #glsl-shader="~~home/shaders/superxbr/superxbr-chroma.hook" # #glsl-shader="~~home/shaders/superxbr/superxbr-native.hook" # will do the upscaling on RGB, and is most likely the one you want use #glsl-shader="~~home/shaders/superxbr/super-xbr--rgb--1.2-sharpness.hook" #glsl-shader="~~home/shaders/superxbr/superxbr.hook" #glsl-shader="~~home/shaders/superxbr/superxbr-all.hook" #glsl-shader="~~home/shaders/superxbr/superxbr-yuv.hook" ########### BEGIN of Anime4K HOOKE007 ########################## OPTION SET 8 # Feel free to go to https://github.com/hooke007/MPV_lazy/tree/bfea2cd24f34c0eb695eec44b25355db9bfb3d6d/portable_config/shaders # do share the results back to me! :) # Interesting read: https://github.com/the-database/mpv-upscale-2x_animejanai (as to why people are creating all these shaders) ########### BEGIN of ACNet by HOOKE007 ########################## OPTION SET 9 ### ACNet is a CNN algorithm, implemented by Anime4KCPP ### Author: https://github.com/TianZerL/ACNetGLSL ### Downloaded from: https://github.com/hooke007/MPV_lazy/tree/bfea2cd24f34c0eb695eec44b25355db9bfb3d6d/portable_config/shaders ### HDN shaders can better denoise, HDN level is from 1 to 3, higher for better denoising but may cause blur and lack of detail. #glsl-shader="~~home/shaders/ACNet/ACNet.glsl" # use this (default) #glsl-shader="~~home/shaders/ACNet/ACNet_HDN_L1.glsl" #glsl-shader="~~home/shaders/ACNet/ACNet_HDN_L2.glsl" #glsl-shader="~~home/shaders/ACNet/ACNet_HDN_L3.glsl" ########### BEGIN of AIUPSCALE v1.2.0 by Alexkral ########################## OPTION SET 10 ### Source + readme: https://github.com/Alexkral/AviSynthAiUpscale/tree/master (folder mpv user shaders) ### Independent luma/chroma upscaling and chroma resampling. ### Two modes for Video/Photography and Line Art. ### Can be used with KrigBilateral shader for chroma upscaling/resampling (FACT CHECK) ### ### All models are based on FSRCNNX but with multiple changes, the most important being Global Residual Learning with Lanczos interpolation. ### The "Sharp" variants were made by playing with the image formation, trying to "match" the sharpness of the reference image without ### introducing too much distortion. This usually results in a better perceptual quality, but also a worse result in metrics that ### take into account distortion, such as PSNR. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_Fast_2x_Photo.glsl" # option 6 (increase gamma) increased dropped frames dramatically #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_Fast_2x_LineArt.glsl" #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_Fast_Sharp_2x_Photo.glsl" #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_2x_Photo.glsl" #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_3x_Photo.glsl" # Read me https://github.com/hooke007/MPV_lazy/issues/394 #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_4x_Photo.glsl" # forced upscaling factors are given in the filenames. 4x is >3.2 upscaling ONLY #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_Sharp_2x_Photo.glsl" #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_Sharp_3x_Photo.glsl" #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_Sharp_4x_Photo.glsl" #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_4x_LineArt.glsl" # ISSUE: FOLLOW UP https://github.com/hooke007/MPV_lazy/issues/394 #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_Sharp_4x_LineArt.glsl" # ISSUE: https://github.com/Alexkral/AviSynthAiUpscale/issues/8 FOLLOW UP ### Sharpen (optional, uncomment to use it) # https://github.com/sentakuhm/Mpv-Windows/tree/master/portable_config/shaders #glsl-shader="~~/shaders/adaptive-sharpen4k.glsl" # dropped frames on GTX 1050ti # shouldn't be needed for RAVU, SSim (but you may) ### accurate sharpener + antiringing # https://gist.github.com/igv ### Can be applied only to luma channel #glsl-shader="~~/shaders/adaptive-sharpen.glsl" # dropped frames on GTX 1050ti ### To use it on-demand add the following line to input.conf: n change-list glsl-shaders toggle "~~/shaders/adaptive-sharpen.glsl" ### Comment from https://3dns-2.reddit.com/r/mpv/comments/17qhe5a/how_to_activate_ssimsuperres_on_1080p_video/ : ### "You can of course just use adaptive-sharpen only, the upscaling will be done by the internal shader of mpv." ########## check what kind of shader RAVU is... And check original .conf because hopefully they know what they are doing scale=ewa_lanczos scale-blur=0.981251 ###### Chroma up + down (optional, uncomment one shader line only if your hardware can support it) # glsl-shader="~~/shaders/KrigBilateral.glsl" #glsl-shader="~~/shaders/ravu-zoom-r3-chroma.hook" # download here https://github.com/sentakuhm/Mpv-Windows/tree/master/portable_config/shaders cscale=lanczos sigmoid-upscaling=yes ################ # Anti-Ringing # ################ scale-antiring=0.7 # luma upscale deringing dscale-antiring=0.7 # luma downscale deringing cscale-antiring=0.7 # chroma upscale deringing ###### Interpolation hdr-compute-peak=auto video-sync=display-resample #video-sync=display-resample-vdrop # https://www.reddit.com/r/mpv/comments/t47rzd/what_config_has_vrr_match_the_video_refresh_rate/ # lots of dropped frames on 4k 60Hz screen interpolation=yes tscale=sphinx tscale-blur=0.6991556596428412 tscale-radius=1.05 tscale-clamp=0.0 ###### SDR ## next 2 lines are obsolete https://github.com/sentakuhm/Mpv-Windows/issues/1#issuecomment-1823949924 #tone-mapping=bt.2446a #tone-mapping-mode=luma ###### HDR target-colorspace-hint=yes ############ # Playback # ############ deinterlace=no # global reset of deinterlacing to off correct-pts=yes # Fit fps to movies https://manpages.ubuntu.com/manpages/xenial/man1/mpv.1.html # Output some video stats # default used 'fps' instead of 'display-fps-override' term-playing-msg='Resolution: ${width}x${height}, Framerate: ${display-fps-override} Hz' ############################################################# # 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) # For detailed analysis of upscaler/downscaler quality, see https://artoriuz.github.io/blog/mpv_upscaling.html #fbo-format=rgba16f # use with gpu-api=opengl fbo-format=rgba16hf # use with gpu-api=vulkan #TESTING https://github.com/igv/FSRCNN-TensorFlow/releases # fbo-format is not not supported in gpu-next profile https://github.com/mpv-player/mpv/issues/12342 # NOTE FOR FUTURE ME: https://github.com/zhxie/mpv-config/ IS OLD BUUUUT INTERESTING PROFILE USE FOR DIFFERENT HARDWARE! ############ # Profiles # ############ ############################ # Protocol Specific Config # ############################ [protocol.http] hls-bitrate=max # use max quality for HLS streams cache=yes no-cache-pause # don't pause when the cache runs low cache-secs=100 # how many seconds of audio/video to prefetch user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0' [protocol.https] profile=protocol.http cache-secs=100 # how many seconds of audio/video to prefetch user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0' [protocol.ytdl] profile=protocol.http [extension.gif] cache=no no-pause loop-file=yes [extension.webm] no-pause loop-file=yes ####################### SOME FINAL THOUGHTS ########################### # Details about configuring MPV for high quality video are covered here: https://freetime.mikeconnelly.com/archives/5371 # The latest version of this file is located here: https://github.com/classicjazz/mpv-config # https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPU # 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 # I incorporated more from https://gist.github.com/shabbir-hasan/2b096ebb554e029faa476728f3b5c741 ######################################################################## ### if you don't feel like editing and testing the mpv.conf, GIVE THIS PROJECT A LOOK! ####### https://github.com/jellyfin/jellyfin-mpv-shim and https://github.com/iwalton3/default-shader-pack/issues/3 then read the readme's ### Note to self: another nice looking mpv.conf based on performance (6yo though!) https://github.com/bardisty/dotfiles/blob/master/mpv/.config/mpv/mpv.conf