Facebook
From devnullius, 4 Months ago, written in PHP.
Embed
Download Paste or View Raw
Hits: 215
  1. # starting anew, sigh, with https://github.com/sentakuhm/Mpv-Windows/blob/master/portable_config/mpv.conf
  2. # once done, check for deprications etc here https://github.com/mpv-player/mpv/releases/tag/v0.37.0
  3. ########### Other sources #############
  4. ## https://samsantana.com/mpv-configuration-guide/
  5. ## ClassyJazz 2022-07-02 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. log-file=~~home/logs/mpv.log # If you want to see the log, uncomment this line.
  12. msg-level=ffmpeg=error,cplayer=warn,auto_profiles=warn,autoload=warn,autocrop=warn
  13. # print_perfdata_passes # no such option
  14.  
  15. ###########
  16. # GPU API #
  17. ###########
  18. # Controls which type of graphics APIs will be accepted, switch to "d3d11" (on Windows) or "opengl" if you have issues
  19. # Uncomment one API only
  20.  
  21. ###### Vulkan Linux, Windows (preferred)
  22. gpu-api=vulkan
  23. vulkan-async-compute=yes
  24. vulkan-async-transfer=yes
  25. vulkan-queue-count=1
  26. vd-lavc-dr=yes
  27. target-prim=auto
  28. target-trc=auto
  29. #vf=format=colorlevels=full:colormatrix=auto # disable if you do not like your colors and compare
  30. video-output-levels=full # disable if you do not like your colors and compare
  31.  
  32.  
  33. ###### DirectX on Windows
  34. # gpu-api=d3d11
  35.  
  36. ###### OpenGL on Linux or macOS or Windows
  37. # gpu-api=opengl
  38.  
  39. ##########
  40. # Player #
  41. ##########
  42.  
  43. input-ipc-server=mpvpipe
  44. hr-seek-framedrop=no
  45. # no-resume-playback # uncomment this line to prevent video resume
  46. keep-open # https://github.com/natural-harmonia-gropius/mpv-config/blob/master/portable_config/mpv.conf
  47. save-position-on-quit
  48. resume-playback-check-mtime
  49. watch-later-options=start,vid,aid,sid
  50. reset-on-next-file=pause,loop-file,brightness,contrast,gamma,saturation,hue,deinterlace,vf,af
  51. border=no    # recommended for ModernX OSC
  52. msg-color=yes
  53. msg-module=yes
  54.  
  55. ###### General
  56. # fullscreen=yes   # Always open the video player in full screen
  57. keep-open=no    # (yes=Don't) Close the player after finishing the video
  58. autofit=45%x45%    # Start mpv with a % smaller resolution of your screen
  59. cursor-autohide=100   # Cursor hide in ms
  60.  
  61. ###############
  62. # Screenshots #
  63. ###############
  64.  
  65. screenshot-directory=~~home/Screens/ # TODO figure out how to put screenshots here by default by editing the line below
  66. screenshot-template="%x\\Screens\\Screenshot-%F-T%wH.%wM.%wS.%wT-F%{estimated-frame-number}"
  67. screenshot-format=png   # Set screenshot format
  68. screenshot-png-compression=0  # Range is 0 to 10. 0 being no compression.
  69. screenshot-tag-colorspace=yes
  70. screenshot-high-bit-depth=yes  # Same output bitdepth as the video
  71.  
  72.  
  73. ###########
  74. # OSC/OSD #
  75. ###########
  76.  
  77. osc=no      # 'no' required for MordernX OSC
  78. osd-bar=yes     # Do not remove/comment if mpv_thumbnail_script_client_osc.lua is being used.
  79. osd-font='Inter Tight Medium'   # Set a font for OSC
  80. osd-font-size=30    # Set a font size
  81. osd-color='#CCFFFFFF'    # ARGB format
  82. osd-border-color='#DD322640'   # ARGB format
  83. osd-bar-align-y=-1    # progress bar y alignment (-1 top, 0 centered, 1 bottom)
  84. osd-border-size=2    # size for osd text and progress bar
  85. osd-bar-h=1     # height of osd bar as a fractional percentage of your screen height
  86. osd-bar-w=60     # width of " " "
  87. #osd-level=3      # Display time elapsed and playtime in the top left corner
  88.  
  89.  
  90. ########
  91. # Subs #
  92. ########
  93.  
  94. #sub-color=1.0/0.0/0.0/1.0    # TESTING are your subs bright red?
  95. blend-subtitles=no
  96. # blend-subtitles=yes
  97. sub-ass-vsfilter-blur-compat=yes  # Backward compatibility for vsfilter fansubs
  98. # sub-ass-style-overrides=Kerning=yes      # allows you to override style parameters of ASS scripts
  99. sub-ass-scale-with-window=no   # May have undesired effects with signs being misplaced.
  100. sub-auto=fuzzy                           # external subs don't have to match the file name exactly to autoload
  101. # sub-gauss=0.6     # Some settings fixing VOB/PGS subtitles (creating blur & changing yellow subs to gray)
  102. sub-file-paths-append=ass                # search for external subs in these relative subdirectories
  103. sub-file-paths-append=srt
  104. sub-file-paths-append=sub
  105. sub-file-paths-append=subs
  106. sub-file-paths-append=subtitles
  107. demuxer-mkv-subtitle-preroll=yes         # try to correctly show embedded subs when seeking
  108. embeddedfonts=yes    # use embedded fonts for SSA/ASS subs
  109. sub-scale=0.7     # scale percentage per https://unix.stackexchange.com/questions/362828/making-subtitles-srt-bigger-or-smaller-with-mpv
  110. #sub-font-size=50
  111. sub-fix-timing=no                        # do not try to fix gaps (which might make it worse in some cases). Enable if there are scenebleeds.
  112. # sub-use-margins
  113. # sub-ass-force-margins
  114. #################
  115. # Subs - Forced #
  116. #################
  117. # the following forced options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT)
  118. # sub-font=Akhbar
  119. # sub-font-size=46
  120. # sub-blur=0.3
  121. # sub-border-color=0.0/0.0/0.0/0.8
  122. # sub-border-size=3.2
  123. # sub-color=0.9/0.9/0.9/1.0
  124. # sub-margin-x=100
  125. # sub-margin-y=50
  126. # sub-shadow-color=0.0/0.0/0.0/0.25
  127. # sub-shadow-offset=0
  128. #
  129. sub-font='Arial Regular'
  130. #sub-font='Bitstream Vera Sans'
  131. #sub-font='Comic Sans MS'
  132. sub-font-size=40 # 36 is default https://github.com/wopian/mpv-config/blob/master/mpv.conf#L37
  133. sub-blur=0.1
  134. sub-spacing=0.5
  135. sub-margin-x=100
  136. sub-margin-y=50
  137. #sub-color="#FFFFFFFF"
  138. sub-color='#CDCDCD'
  139. sub-border-color="#FF262626"
  140. sub-border-size=1
  141. # sub-shadow=3 # no such option according to console, todo is check logs
  142. # sub-shadow-offset=1
  143. sub-shadow-offset=2
  144. #sub-shadow-color="#33000000"
  145. sub-shadow-color='#000000'
  146. sub-ass-override=force
  147. blend-subtitles
  148.  
  149. #########
  150. # Cache #
  151. #########
  152. # Configure the cache to be really big (multiple GBs)
  153. # We have a lot of memory, so why not use it for something
  154. cache=yes
  155. demuxer-seekable-cache=yes
  156. #demuxer-max-bytes=1147483647            # ~1 GiB in bytes
  157. demuxer-max-bytes=2147483647   # ~2 GiB in bytes
  158. demuxer-max-back-bytes=1147483647
  159.  
  160.  
  161. #########
  162. # Audio #
  163. #########
  164.  
  165. volume-max=120                          # maximum volume in %, everything above 100 results in amplification
  166. audio-stream-silence                    # fix audio popping on random seek
  167. audio-file-auto=fuzzy                   # external audio doesn't has to match the file name exactly to autoload
  168. audio-pitch-correction=yes              # automatically insert scaletempo when playing with higher speed
  169. ad-lavc-downmix=no   # https://github.com/wopian/mpv-config/blob/master/mpv.conf#L37
  170. audio-channels=stereo   # https://github.com/wopian/mpv-config/blob/master/mpv.conf#L37
  171. af=dynaudnorm    # https://github.com/wopian/mpv-config/blob/master/mpv.conf#L37
  172. #
  173. # DTS-MA decoding
  174. ad=lavc:libdcadec
  175. autosync=30
  176.  
  177.  
  178. # Default sub/audio # Languages
  179. # alang=ja,jp,jpn,enGB,en-GB,en,eng,enUS,en-US     # Audio language priority
  180. 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
  181. ytdl-raw-options=sub-lang="enGB,en-GB,en,eng,enUS,en-US",write-sub=  # YouTube DownLoader
  182.  
  183.  
  184. ##################
  185. # Video Profiles #
  186. ##################
  187.  
  188. profile=gpu-hq   # no such option as 'show-profile=gpu-hq'
  189. hwdec=vulkan                    # if you want to try gpu decoding
  190. #hwdec=auto-copy-safe  # enable hardware decoding, defaults to 'no'
  191. # gpu-next profile # for future use # the future is now https://github.com/Artoriuz/glsl-joint-bilateral
  192. #
  193. vo=gpu-next   # GPU-Next: https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPU
  194.  
  195. ###### Dither
  196. dither-depth=auto
  197. temporal-dither=yes
  198. dither=error-diffusion # preferable... mpv will fallback on fruit if compute shaders are not supported
  199. dither=fruit
  200.  
  201. ###### Debanding
  202. deband=yes # enabled by default
  203. deband-iterations=4 # deband steps
  204. #deband-threshold=35
  205. deband-threshold=48 # deband strength
  206. deband-range=16 # deband range
  207. #deband-grain=4
  208. deband-grain=48 # dynamic grain: set to "0" if using the static grain shader
  209.  
  210. #########################
  211. # Motion Interpolation  #
  212. #########################
  213. display-fps-override=60
  214. video-sync=display-resample
  215. interpolation=yes
  216. #   tscale=oversample # smoothmotion
  217. tscale=sphinx
  218. tscale-blur=0.6991556596428412
  219. tscale-radius=1.05
  220. tscale-clamp=0.0
  221.  
  222. ###### SDR
  223. tone-mapping=bt.2446a # tends to be dark, disable this option if you think the image is too dark
  224.  
  225. ###### HDR
  226. # d3d11-output-csp=pq # if you use d3d11 instead of Vulkan
  227. target-colorspace-hint=yes # https://www.reddit.com/r/mpv/comments/s11ub3/mpv_with_hdr/
  228.  
  229. ##############
  230. # Colorspace #
  231. ##############
  232. ### https://video.matrox.com/en/media/guides-articles/introduction-color-spaces-video
  233. # see https://github.com/mpv-player/mpv/wiki/Video-output---shader-stage-diagram
  234. # target-prim=auto # https://mpv.io/manual/master/#options-target-prim # already enabled above
  235. # target-prim=bt.709 # target Rec.709 for SDR TVs
  236. #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
  237. #target-trc=auto
  238. # gamma-auto # obsolete option
  239.  
  240. ###### https://github.com/mpv-player/mpv/issues/12483
  241. ## The order of the shaders absolutely matters, specially when using LUMA prescalers like FSRCNNX or RAVU and CHROMA scalers like Krig or Joint.
  242. ## You want the LUMA prescaler first so the CHROMA scaler can interpolate the information from the scaled LUMA plane
  243. dscale=catmull_rom
  244. correct-downscaling=yes
  245. linear-downscaling=no
  246.  
  247. # Different shaders: a quick introduction: https://github.com/mpv-player/mpv/wiki/User-Scripts#user-shaders
  248. # 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!
  249.  
  250. ###### Luma prescalers first (test one of the option sets below) (Also see: https://artoriuz.github.io/blog/mpv_upscaling.html)
  251. #### FSR*** shaders... How What Where When? https://gist.github.com/agyild/82219c545228d70c5604f865ce0b0ce5#comments . Quote:
  252. #### "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
  253. ### 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)
  254. ### Made to directly operate on LUMA plane, this is faster since the original shaders were operating on LUMA by deriving it from RGB
  255. ### https://www.antixforum.com/forums/topic/mpv-hwdecauto/page/2/: luma upscalers with max. 2x zoom are ravu, FSRCNN, SSimSuperRes  
  256. ### SO, in short, CHOSE between OPTION SET 1, OPTION SET 2, OPTION SET 3, OPTION SET 4, OPTION SET 5, OPTION SET 6, ..., ...
  257. ### How to chose? Test. Also: https://www.reddit.com/r/shaders/comments/giptkj/ai_upscale_shaders_in_realtime_mpv_video_player/
  258. ###
  259. ################## BEGIN of AMD FSR / NVidia AGYILD ############################### OPTION SET 1
  260. ### 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
  261. ### Per AMD's guidelines only upscales content up to 4x (e.g., 1080p -> 2160p, 720p -> 1440p etc.) and everything else in between,
  262. ### that means CAS will scale up to 4x at maximum, and any further scaling will be processed by mpv's scalers
  263. #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)
  264. #2A# glsl-shader="~~/shaders/FSR.glsl" # AMD FidelityFX Super Resolution v1.0.2 for mpv
  265. #2B# glsl-shader="~~/shaders/CAS-scaled.glsl" # AMD FidelityFX Contrast Adaptive Sharpening v1.0.2 for mpv
  266. ################## BEGIN of FSRCNNX IGV ############################## OPTION SET 2
  267. ### FSRSCNNX is FSRCNN but extended with local residual neural network learning and recursive blocks
  268. ### Download from https://github.com/igv/FSRCNN-TensorFlow/releases/
  269. ### Requires "fbo-format=rgba16f" (rgba16hf for vulkan and d3d11)
  270. ### 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
  271. #1# glsl-shader="~~/shaders/FSRCNNX_x2_8-0-4-1.glsl"
  272. #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
  273. ### 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
  274. ### 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!
  275. #3A# glsl-shader="~~/shaders/FSRCNNX_x2_16-0-4-1_enhance.glsl"
  276. ## OR ##
  277. #3B# even stronger compression artifact removal, not suited for real life content, unless you feel like your videos lack a certain pastel painting look
  278. #3B# glsl-shader="~~/shaders/FSRCNNX_x2_16-0-4-1_anime_enhance.glsl"
  279. ################## BEGIN of TSUBA UP/DOWN SENTAKUHM ########################### OPTION SET 3
  280. ### I had a hard time even finding these two files... So it's not popular at all!
  281. ### Download https://github.com/sentakuhm/Mpv-Windows/tree/master/portable_config/shaders
  282. ### You may enable both options at the same time. One is for UPscaling, the other is for DOWNscaling :)
  283. ### TsubaUP / TsubaDS don't show up with its names in (shift) I-2 overview. You know it loaded because there are more processes active
  284. ### glsl-shader="~~/shaders/TsubaUP.glsl"
  285. ### glsl-shader="~~/shaders/TsubaDS.glsl"
  286. ################## BEGIN of SSim UP/DOWN IGV ########################### OPTION SET 4
  287. ### Download https://gist.github.com/igv
  288. ### You may enable both options at the same time.
  289. ### glsl-shader="~~/shaders/SSimSuperRes.glsl" # Basically it's an accurate sharpener + antiringing
  290. ### glsl-shader="~~/shaders/SSimDownscaler.glsl" # Tuned for "linear-downscaling=no".
  291. ################## BEGIN of RAVU BJIN ########################### OPTION SET 5A
  292. ### All shaders are for one pass only. If you want to have 4x upscaling, trigger the same shader twice. For 4x luma prescaling, use
  293. #### shaders="~~/shaders/nnedi3-nns32-win8x4.hook,~~/shaders/nnedi3-nns32-win8x4.hook"
  294. ### ravu shaders background and downloads: https://github.com/bjin/mpv-prescalers/blob/master/README.md (So... READ IT!!)
  295. #### gather/ shaders uses textureGather() functions, and are usually faster for luma upscalers (nnedi3, ravu, ravu-lite and ravu-zoom).
  296. #### compute/ shaders are compute shaders, and are faster for -yuv and -rgb upscalers.
  297. #### Shaders in root folder are safe fallback option with minimal requirement for GPU driver or OpenGL version
  298. ### 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
  299. ### faster and sharper. It also introduces no half pixel offset.
  300. ### 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
  301. ### Ravu-lite is 4x upscaling (FACT CHECK DETAILS: ALWAYS 4x OR POSSIBLE UP TO 4x AUTOMATICALLY?)
  302. #glsl-shader="~~home/shaders/ravu/gather/ravu-lite-r3.hook"
  303. #glsl-shader="~~home/shaders/ravu/gather/ravu-lite-ar-r3.hook" # ar = anti-ringing
  304. #glsl-shader="~~home/shaders/ravu/gather/ravu-lite-r4.hook"
  305. #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
  306. #glsl-shader="~~home/shaders/ravu/gather/ravu-r3.hook"
  307. #glsl-shader="~~home/shaders/ravu/gather/ravu-r4.hook"
  308. #glsl-shader="~~home/shaders/ravu/gather/ravu-zoom-r3.hook"
  309. #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)
  310. ################## BEGIN of RAVU RGB and RAVU YUV BJIN ########################### OPTION SET 5B (chose EITHER 5A ** OR ** 5B, don't mix both!!)
  311. ### All shaders are for one pass only. If you want to have 4x upscaling, trigger the same shader twice. For 4x luma prescaling, use
  312. #### shaders="~~/shaders/nnedi3-nns32-win8x4.hook,~~/shaders/nnedi3-nns32-win8x4.hook"
  313. ### Also Upscaling + Sharpening, like OPTION SET 5A
  314. ### They upscale video after all planes are merged. This happens after --cscale (or other chroma prescaler) is applied. ravu-yuv assumes YUV video and
  315. ### will fail on others (for example, PNG picture)
  316. ### WARNING Ravu "RGB" and "YUV" work on both luma + chroma in one shader # https://www.reddit.com/r/mpv/comments/184f4bk/comment/kbk841m
  317. ### ravu-zoom is able to upscale video to arbitrary ratio directly (i.e. a drop-in replacement of --scale). Its sharpness is
  318. ### 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
  319. ###
  320. ### Huh? YUV? RGB? What?? Read: https://dexonsystems.com/blog/rgb-yuv-color-spaces
  321. ###
  322. ### Suffix in the filename indicates the type of planes shader is hooked on (ravu supports only luma and chroma planes)
  323. ### FROM: https://github.com/bjin/mpv-prescalers/tree/1fb1c079405b674d54206ff2c52fd520db63ff10
  324. ### Without any suffix: Triggered on luma plane only (like prescale-luma=... option in mpv).
  325. ### -chroma: Triggered on chroma plane only.
  326. ### -yuv: Triggered on both luma and chroma planes.
  327. ### -all: Triggered on all source planes (including non-YUV formats).
  328. #glsl-shader="~~/shaders/ravu/compute/ravu-r3-rgb.hook" # Note that evaluation results shows that improvement by radius=4 is
  329. #glsl-shader="~~/shaders/ravu/compute/ravu-r4-rgb.hook" # minimal (less than 0.1dB in PSNR), radius=3 should be enough for daily purpose
  330. #glsl-shader="~~/shaders/ravu/compute/ravu-zoom-r3-rgb.hook"     # start with this one enabled first # good balance between performance and quality
  331. #glsl-shader="~~/shaders/ravu/compute/ravu-zoom-ar-r3-rgb.hook"  # ar = anti ring
  332. #glsl-shader="~~/shaders/ravu/compute/ravu-3x-r3-rgb.hook"
  333. #glsl-shader="~~/shaders/ravu/compute/ravu-3x-r4-rgb.hook"
  334. # glsl-shader="~~/shaders/ravu-zoom-r3-yuv.hook"          
  335. ########### BEGIN of NEDI3 BJIN ########################### OPTION SET 6
  336. ### All shaders are for one pass only. If you want to have 4x upscaling, trigger the same shader twice. For 4x luma prescaling, use
  337. #### shaders="~~/shaders/nnedi3-nns32-win8x4.hook,~~/shaders/nnedi3-nns32-win8x4.hook"
  338. ### RAVU is more like EWA scalers in general. it won't produce sharp upscaled image like nnedi3 and super-xbr, but it produces fewer
  339. ### artifacts like aliasing. It also seems to connect #edges well. Anyway, I think it's not strictly better than either NNEID3 or superxbr.
  340. ### From: https://github.com/bjin/mpv-prescalers/issues/8
  341. ### For nnedi3 prescaler, neurons and window settings are indicated in the filename.
  342. ### Known Issue Dec. 2024: nnedi3-nns32-win8x6-{chroma,yuv,all}.hook are extremely slow with certain version of nvidia driver
  343. #glsl-shader="~~home/shaders/nnedi3/gather/nnedi3-nns16-win8x4.hook"
  344. #glsl-shader="~~home/shaders/nnedi3/gather/nnedi3-nns32-win8x6.hook"
  345. #glsl-shader="~~home/shaders/nnedi3/gather/nnedi3-nns128-win8x4.hook" # dropped frames on GTX 1050ti
  346. #glsl-shader="~~home/shaders/nnedi3/gather/nnedi3-nns256-win8x6.hook" # allround bad experience on my NVidia Geforce GTX 1050ti
  347. ########### BEGIN of SuperXBR BJIN (and HOOKE007) ########################## OPTION SET 7
  348. ### All shaders are for one pass only. If you want to have 4x upscaling, trigger the same shader twice. For 4x luma prescaling, use
  349. #### shaders="~~/shaders/nnedi3-nns32-win8x4.hook,~~/shaders/nnedi3-nns32-win8x4.hook"
  350. ###
  351. ### {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
  352. ### want to use. {superxbr,ravu*}-native-yuv.hook are similar shaders but require the original source to be YUV.
  353. # super-xbr discussion: https://github.com/mpv-player/mpv/issues/3226
  354. # Official download: https://github.com/bjin/mpv-prescalers/tree/1fb1c079405b674d54206ff2c52fd520db63ff10
  355. # Unofficial Download: https://github.com/hooke007/MPV_lazy/tree/bfea2cd24f34c0eb695eec44b25355db9bfb3d6d/portable_config/shaders
  356. # BUT ISSUE: https://github.com/hooke007/MPV_lazy/issues/392 so manually add //!DESC from original sources
  357. #glsl-shader="~~home/shaders/superxbr/superxbr-chroma.hook" #
  358. #glsl-shader="~~home/shaders/superxbr/superxbr-native.hook" # will do the upscaling on RGB, and is most likely the one you want use
  359. #glsl-shader="~~home/shaders/superxbr/super-xbr--rgb--1.2-sharpness.hook"
  360. #glsl-shader="~~home/shaders/superxbr/superxbr.hook"
  361. #glsl-shader="~~home/shaders/superxbr/superxbr-all.hook"
  362. #glsl-shader="~~home/shaders/superxbr/superxbr-yuv.hook"
  363. ########### BEGIN of Anime4K HOOKE007 ########################## OPTION SET 8
  364. # Feel free to go to https://github.com/hooke007/MPV_lazy/tree/bfea2cd24f34c0eb695eec44b25355db9bfb3d6d/portable_config/shaders
  365. # do share the results back to me! :)
  366. # Interesting read: https://github.com/the-database/mpv-upscale-2x_animejanai (as to why people are creating all these shaders)
  367. ########### BEGIN of ACNet by HOOKE007 ########################## OPTION SET 9
  368. ### ACNet is a CNN algorithm, implemented by Anime4KCPP
  369. ### Author: https://github.com/TianZerL/ACNetGLSL
  370. ### Downloaded from: https://github.com/hooke007/MPV_lazy/tree/bfea2cd24f34c0eb695eec44b25355db9bfb3d6d/portable_config/shaders
  371. ### HDN shaders can better denoise, HDN level is from 1 to 3, higher for better denoising but may cause blur and lack of detail.
  372. #glsl-shader="~~home/shaders/ACNet/ACNet.glsl"  # use this (default)
  373. #glsl-shader="~~home/shaders/ACNet/ACNet_HDN_L1.glsl"
  374. #glsl-shader="~~home/shaders/ACNet/ACNet_HDN_L2.glsl"
  375. #glsl-shader="~~home/shaders/ACNet/ACNet_HDN_L3.glsl"
  376. ########### BEGIN of AIUPSCALE v1.2.0 by Alexkral ########################## OPTION SET 10
  377. ### Source + readme: https://github.com/Alexkral/AviSynthAiUpscale/tree/master (folder mpv user shaders)
  378. ### Independent luma/chroma upscaling and chroma resampling.
  379. ### Two modes for Video/Photography and Line Art.
  380. ### Can be used with KrigBilateral shader for chroma upscaling/resampling (FACT CHECK)
  381. ###
  382. ### All models are based on FSRCNNX but with multiple changes, the most important being Global Residual Learning with Lanczos interpolation.
  383. ### The "Sharp" variants were made by  playing with the image formation, trying to "match" the sharpness of the reference image without
  384. ### introducing too much distortion. This usually results in a better perceptual quality, but also a worse result in metrics that
  385. ### take into account distortion, such as PSNR.
  386. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_Fast_2x_Photo.glsl" # option 6 (increase gamma) increased dropped frames dramatically
  387. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_Fast_2x_LineArt.glsl"
  388. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_Fast_Sharp_2x_Photo.glsl"
  389. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_2x_Photo.glsl"
  390. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_3x_Photo.glsl" # Read me https://github.com/hooke007/MPV_lazy/issues/394
  391. #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
  392. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_Sharp_2x_Photo.glsl"
  393. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_Sharp_3x_Photo.glsl"
  394. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_Sharp_4x_Photo.glsl"
  395. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_4x_LineArt.glsl" # ISSUE: FOLLOW UP https://github.com/hooke007/MPV_lazy/issues/394
  396. #glsl-shader="~~home/shaders/AI_upscale/AiUpscale_HQ_Sharp_4x_LineArt.glsl"
  397. # ISSUE: https://github.com/Alexkral/AviSynthAiUpscale/issues/8 FOLLOW UP    
  398.  
  399.  
  400.  
  401.  
  402.  
  403. ### Sharpen (optional, uncomment to use it) # https://github.com/sentakuhm/Mpv-Windows/tree/master/portable_config/shaders
  404. #glsl-shader="~~/shaders/adaptive-sharpen4k.glsl" # dropped frames on GTX 1050ti # shouldn't be needed for RAVU, SSim (but you may)
  405.  
  406. ### accurate sharpener + antiringing # https://gist.github.com/igv
  407. ### Can be applied only to luma channel
  408. #glsl-shader="~~/shaders/adaptive-sharpen.glsl" # dropped frames on GTX 1050ti
  409. ### To use it on-demand add the following line to input.conf: n change-list glsl-shaders toggle "~~/shaders/adaptive-sharpen.glsl"
  410. ### Comment from https://3dns-2.reddit.com/r/mpv/comments/17qhe5a/how_to_activate_ssimsuperres_on_1080p_video/ :
  411. ### "You can of course just use adaptive-sharpen only, the upscaling will be done by the internal shader of mpv."
  412.  
  413.  
  414. ########## check what kind of shader RAVU is... And check original .conf because hopefully they know what they are doing
  415.  
  416.  
  417.  
  418.  
  419.  
  420. scale=ewa_lanczos
  421. scale-blur=0.981251
  422.  
  423.  
  424.  
  425.  
  426. ###### Chroma up + down (optional, uncomment one shader line only if your hardware can support it)
  427. # glsl-shader="~~/shaders/KrigBilateral.glsl"
  428. #glsl-shader="~~/shaders/ravu-zoom-r3-chroma.hook" # download here https://github.com/sentakuhm/Mpv-Windows/tree/master/portable_config/shaders
  429. cscale=lanczos
  430. sigmoid-upscaling=yes
  431.  
  432.  
  433.  
  434. ################
  435. # Anti-Ringing #
  436. ################
  437. scale-antiring=0.7 # luma upscale deringing
  438. dscale-antiring=0.7 # luma downscale deringing
  439. cscale-antiring=0.7 # chroma upscale deringing
  440.  
  441. ###### Interpolation
  442. hdr-compute-peak=auto
  443. video-sync=display-resample
  444. #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
  445. interpolation=yes
  446. tscale=sphinx
  447. tscale-blur=0.6991556596428412
  448. tscale-radius=1.05
  449. tscale-clamp=0.0
  450.  
  451. ###### SDR
  452. ## next 2 lines are obsolete https://github.com/sentakuhm/Mpv-Windows/issues/1#issuecomment-1823949924
  453. #tone-mapping=bt.2446a
  454. #tone-mapping-mode=luma
  455.  
  456. ###### HDR
  457. target-colorspace-hint=yes
  458.  
  459. ############
  460. # Playback #
  461. ############
  462.  
  463. deinterlace=no # global reset of deinterlacing to off
  464. correct-pts=yes # Fit fps to movies https://manpages.ubuntu.com/manpages/xenial/man1/mpv.1.html
  465. # Output some video stats # default used 'fps' instead of 'display-fps-override'
  466. term-playing-msg='Resolution: ${width}x${height}, Framerate: ${display-fps-override} Hz'
  467.  
  468. #############################################################
  469. # Upscaling & Processing Based on Source Video's Resolution #
  470. #############################################################
  471.  
  472. # Chroma subsampling means that chroma information is encoded at lower resolution than luma
  473. # In MPV, chroma is upscaled to luma resolution (video size) and then the converted RGB is upscaled to target resolution (screen size)
  474. # For detailed analysis of upscaler/downscaler quality, see https://artoriuz.github.io/blog/mpv_upscaling.html
  475. #fbo-format=rgba16f # use with gpu-api=opengl
  476. fbo-format=rgba16hf # use with gpu-api=vulkan #TESTING https://github.com/igv/FSRCNN-TensorFlow/releases
  477. # fbo-format is not not supported in gpu-next profile https://github.com/mpv-player/mpv/issues/12342
  478. # NOTE FOR FUTURE ME: https://github.com/zhxie/mpv-config/ IS OLD BUUUUT INTERESTING PROFILE USE FOR DIFFERENT HARDWARE!
  479.  
  480. ############
  481. # Profiles #
  482. ############
  483.  
  484.  
  485.  
  486.  
  487.  
  488. ############################
  489. # Protocol Specific Config #
  490. ############################
  491.  
  492. [protocol.http]
  493. hls-bitrate=max # use max quality for HLS streams
  494. cache=yes
  495. no-cache-pause # don't pause when the cache runs low
  496. cache-secs=100                          # how many seconds of audio/video to prefetch
  497. user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0'
  498.  
  499. [protocol.https]
  500. profile=protocol.http
  501. cache-secs=100                          # how many seconds of audio/video to prefetch
  502. user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0'
  503.  
  504. [protocol.ytdl]
  505. profile=protocol.http
  506.  
  507. [extension.gif]
  508. cache=no
  509. no-pause
  510. loop-file=yes
  511.  
  512. [extension.webm]
  513. no-pause
  514. loop-file=yes
  515.  
  516.  
  517.  
  518. ####################### SOME FINAL THOUGHTS ###########################
  519. # Details about configuring MPV for high quality video are covered here: https://freetime.mikeconnelly.com/archives/5371
  520. # The latest version of this file is located here: https://github.com/classicjazz/mpv-config
  521.  
  522. # https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPU
  523.  
  524. # 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
  525.  
  526. # I incorporated more from https://gist.github.com/shabbir-hasan/2b096ebb554e029faa476728f3b5c741
  527. ########################################################################
  528. ### if you don't feel like editing and testing the mpv.conf, GIVE THIS PROJECT A LOOK!
  529. ####### https://github.com/jellyfin/jellyfin-mpv-shim and https://github.com/iwalton3/default-shader-pack/issues/3 then read the readme's
  530. ### 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