Skip to content

Instantly share code, notes, and snippets.

@AzimsTech
Created May 29, 2026 10:39
Show Gist options
  • Select an option

  • Save AzimsTech/979be6ce0dd13e6d69eb05203c9629c8 to your computer and use it in GitHub Desktop.

Select an option

Save AzimsTech/979be6ce0dd13e6d69eb05203c9629c8 to your computer and use it in GitHub Desktop.
My MPV Player Setup

My MPV Player Setup

Platform: Windows
MPV version: Latest MPV (UOSC UI) -
Config location: ~\AppData\Roaming\mpv\portable_config


Scripts

Script Purpose

Notes

  • no notes
# ========== https://MPV.ROCKS RECOMMENDED DEFAULT CONFIG ==========
# Based on: https://iamscum.wordpress.com/guides/videoplayback-guide/mpv-conf/
# ========== VIDEO OUTPUT & DECODING ==========
profile=high-quality # Allows for higher quality playback on mpv. Uses scaling methods that are significantly better than default mpv, VLC and MPC
vo=gpu-next # https://mpv.io/manual/stable/#video-output-drivers-gpu https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPU
priority=high # Makes PC prioritize MPV for allocating resources (Windows only)
gpu-context=auto # https://mpv.io/manual/master/#options-gpu-context
gpu-api=auto # https://mpv.io/manual/stable/#options-gpu-api - For displaying HDR content (not HDR -> SDR) "d3d11" is recommended (Windows only)
hwdec=nvdec-copy,auto
# ========== GENERAL SETTINGS ==========
save-position-on-quit=no # Saving playback position on quit
fullscreen=no # Start in fullscreen
keep-open=always # Don't close the player after finishing the video
reset-on-next-file=pause # After playing the next file in the playlist, it will automatically play the file instead of a paused state
taskbar-progress=no # Disable playback progress rendering in taskbar
force-seekable=yes # If the player thinks that the media is not seekable, force enable seeking
autofit-larger=30%x30%
# ========== LANGUAGE PRIORITY ==========
alang=ja,en # Audio language priority
slang=en # Subtitle language priority
# ========== SCREENSHOT ==========
# https://mpv.io/manual/stable/#options-screenshot-format
screenshot-directory="~/Pictures/mpv-screenshots" # Screenshot Image Output directory
screenshot-template="%f-%wH.%wM.%wS.%wT" # Name format (filename-hour-minute-second-milisecond-number) -#%#00n
screenshot-format=webp # Output format of screenshots
screenshot-high-bit-depth=yes # Same output bitdepth as the video. Set it "no" if you want to save disc space
screenshot-tag-colorspace=yes # Tag images to the colorspace of the video
screenshot-png-compression=7 # Compression of the PNG picture (1-9) - Higher value means better compression, but takes more time
screenshot-jpeg-quality=90 # JPEG image quality. Generally don't want below 90
screenshot-webp-lossless=yes # If yes, image will be lossless. Ignores webp quality setting
screenshot-webp-quality=75 # WebP quality from 0-100. Generally 70-90 is fine
screenshot-avif-encoder=libaom-av1 # AV1 encoder to use for AVIF generation
screenshot-avif-pixfmt=yuv420p # AVIF pixel format
screenshot-avif-opts=usage=allintra # AV1 encoder options
screenshot-jxl-distance=1.0 # JPEG XL Image quality in reference to the butteraugli score. 0.0 is lossless. 1.0 is default. You don't want more than 3.0 usually
# ========== ON SCREEN DISPLAY AND ON SCREEN CONTROLLER ==========
osd-bar=no # Don't show a huge volume box on screen when turning the volume up/down
osc=yes
border=no # Whether or not to use the native window decorations, border, and controls. No disables it and uses custom versions.
cursor-autohide-fs-only=yes # If this option is given, the cursor is always visible in windowed mode
# In fullscreen mode, the cursor is shown or hidden according to --cursor-autohide
cursor-autohide=300 # Cursor hide in ms
osd-level=1 # https://mpv.io/manual/stable/#options-osd-level
osd-duration=1000 # Set the duration of the OSD messages in ms
hr-seek=yes # Select when to use precise seeks that are not limited to keyframes - https://mpv.io/manual/stable/#options-hr-seek
osd-font='Verdana'
osd-font-size=20
osd-color='#FFFFFF' # Hex code for white
osd-border-color='#000000' # Hex code for black
osd-border-size=0.6 # Size for osd text and progress bar
osd-blur=0.2 # Gaussian blur factor. 0 means no blur applied (default)
osd-status-msg=${playback-time/full} / ${duration} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count}
# ========== AUDIO ==========
volume=100 # default volume, 100 = unchanged
volume-max=200 # Max volume of the player
audio-file-auto=fuzzy # Load external audio with (almost) the same name as the video
audio-pitch-correction=yes # https://mpv.io/manual/stable/#options-audio-pitch-correction
# ========== SCALERS AND SHADERS ==========
# Default was (because of profile=gpu-hq):
# scale=spline36
# cscale=spline36
# dscale=mitchell
scale=ewa_lanczossharp # Luma upscaler
dscale=mitchell # Luma downscaler
cscale=ewa_lanczossoft # Chroma up&downscaler
gpu-shader-cache-dir='~/shaders/cache' # https://mpv.io/manual/stable/#options-gpu-shader-cache-dir
# FSRCNNX (more powerful, but tend to cause overshoot), use nnedi13 (below) instead if you notice dropped frames
glsl-shader="~/shaders/FSRCNNX_x2_16-0-4-1.glsl" # Luma upscaler
# nnedi3
# use nns128 instead of nns256 if you notice dropped frames
# glsl-shader="~/shaders/nnedi3-nns256-win8x4.hook" # Luma upscaler
# glsl-shader="~/shaders/nnedi3-nns128-win8x4.hook" # Luma upscaler
# no-scaler-resizes-only # Fixing the pixel shift https://mpv.io/manual/stable/#options-scaler-resizes-only
# SSimDownscaler
glsl-shader="~/shaders/SSimDownscaler.glsl" # Luma downscaler
# KrigBilateral (people say it's bloat/overkill)
# glsl-shader="~/shaders/KrigBilateral.glsl" # Chroma up&downscaler
# ========== DEBANDING ==========
# Banding is a visual artifact, visual artifacts should never be in a video.
# Example of banding: https://imgur.com/32d77H0
# Debanding is the process of removing said banding.
# 6 minute explanation of what causes banding: https://www.youtube.com/watch?v=h9j89L8eQQk
deband=no # Turn on only for videos with banding. (Keybind=b)
deband-iterations=2 # https://mpv.io/manual/stable/#options-deband-iterations
deband-threshold=64 # https://mpv.io/manual/stable/#options-deband-threshold
deband-range=17 # https://mpv.io/manual/stable/#options-deband-range
deband-grain=12 # https://mpv.io/manual/stable/#options-deband-grain
# ========== SUBTITLES ==========
demuxer-mkv-subtitle-preroll=yes # https://mpv.io/manual/stable/#options-mkv-subtitle-preroll
sub-ass-use-video-data=all # https://mpv.io/manual/stable/#options-sub-ass-vsfilter-aspect-compat
sub-fix-timing=no # https://mpv.io/manual/stable/#options-sub-fix-timing
sub-auto=fuzzy # https://mpv.io/manual/stable/#options-no-sub-auto
# Load all subs containing the media filename
# The following options only apply to subtitles without own styling
sub-font='Netflix Sans Medium' # Specify font to use for subtitles that do not themselves specify a particular font
sub-font-size=40
sub-color='#FFFFFFFF'
sub-border-color='#FF000000'
sub-border-size=2.0
sub-shadow-offset=0
sub-spacing=0.0
# ========== INTERPOLATION ==========
# blend-subtitles=yes # Subtitle blending in scenechanges (smoother effect)
# video-sync=display-resample # Set the fps as the max of your monitor refresh rate
# # (only useful and needed with "interpolation=yes)
# interpolation=yes # Enable interpolation
# tscale=oversample # Interpolation method
# ========== PROFILES ==========
#[HDR]
# profile-desc=Tone mapping using reinhard
# profile-restore=copy-equal
# tone-mapping=reinhard
# tone-mapping-param=0.6
# hdr-compute-peak=no
# blend-subtitles=video
# target-colorspace-hint=yes
# vulkan-output-csp=pq
# ========== AUTO PROFILES ==========
# Auto profiles that automatically applies for WEB-DL anime that need some debanding
[WEB-DL]
profile-desc=WEB-DL Anime (HatSubs, SubsPlease, HorribleSubs, Erai-raws)
profile-cond=string.match(p.filename, "HatSubs")~=nil or string.match(p.filename, "SubsPlease")~=nil or string.match(p.filename, "HorribleSubs")~=nil or string.match(p.filename, "Erai%-raws")~=nil
profile-restore=copy-equal
deband=yes
[ontop-playing]
profile-cond=not p.pause and not p["core-idle"]
profile-restore=copy-equal
ontop=yes
[ontop-paused]
profile-cond=p.pause or p["core-idle"]
profile-restore=copy-equal
ontop=no
# [Mini-Encode #1]
# profile-desc=Mini Encode Anime 1
# profile-cond=string.match(p.filename, "ASW")~=nil or string.match(p.filename, "DKB")~=nil or string.match(p.filename, "Judas")~=nil
# deband=yes
# [Mini-Encode #2]
# profile-desc=Mini Encode Anime 2
# profile-cond=string.match(p.filename, "Cerberus")~=nil or string.match(p.filename, "Nep%_Blanc")~=nil or string.match(p.filename, "Reaktor")~=nil
# deband=yes
# [Mini-Encode #3]
# profile-desc=Mini Encode Anime 3
# profile-cond=string.match(p.filename, "Cleo")~=nil or string.match(p.filename, "Akihito")~=nil or string.match(p.filename, "Reaktor")~=nil
# deband=yes
# [Mini-Encode #4]
# profile-desc=Mini Encode Anime 4
# profile-cond=string.match(p.filename, "Ember")~=nil
# deband=yes
# Display style of current position. available: line, bar
timeline_style=line
# Line display style config
timeline_line_width=2
# Timeline size when fully expanded, in pixels, 0 to disable
timeline_size=40
# Comma separated states when element should always be fully visible.
# Available: paused, audio, image, video, idle, windowed, fullscreen
timeline_persistency=
# Top border of background color to help visually separate timeline from video
timeline_border=1
# When scrolling above timeline, wheel will seek by this amount of seconds.
# Default uses fast seeking. Add `!` suffix to enable exact seeks. Example: `5!`
timeline_step=5
# Render cache indicators for streaming content
timeline_cache=yes
# Render heatmap for youtube videos. Available: overlay, above, no
timeline_heatmap=overlay
# When to display an always visible progress bar (minimized timeline). Can be: windowed, fullscreen, always, never
# Can also be toggled on demand with `toggle-progress` command.
progress=windowed
progress_size=2
progress_line_width=20
# A comma delimited list of controls above the timeline. Set to `never` to disable.
# Parameter spec: enclosed in `{}` means value, enclosed in `[]` means optional
# Full item syntax: `[<{dispositions}>]{element}[:{paramN}][#{badge}[>{limit}]][?{tooltip}]`
# Common properties:
# `{icon}` - parameter used to specify an icon name (example: `face`)
# - pick here: https://fonts.google.com/icons?icon.platform=web&icon.set=Material+Icons&icon.style=Rounded
# `{element}`s and their parameters:
# `{shorthand}` - preconfigured shorthands:
# `play-pause`, `menu`, `subtitles`, `audio`, `video`, `playlist`,
# `chapters`, `editions`, `stream-quality`, `open-file`, `items`,
# `next`, `prev`, `first`, `last`, `audio-device`, `fullscreen`,
# `loop-playlist`, `loop-file`, `shuffle`, `autoload`
# `speed[:{scale}]` - display speed slider, [{scale}] - factor of controls_size, default: 1.3
# `command:{icon}:{command}` - button that executes a {command} when pressed
# `toggle:{icon}:{prop}[@{owner}]` - button that toggles mpv property. shorthand for yes/no cycle below
# `cycle:{default_icon}:{prop}[@{owner}]:{value1}[={icon1}][!]/{valueN}[={iconN}][!]`
# - button that cycles mpv property between values, each optionally having different icon and active flag
# - presence of `!` at the end will style the button as active
# - `{owner}` is the name of a script that manages this property if any. Set to `uosc` to tap into uosc options.
# `gap[:{scale}]` - display an empty gap
# {scale} - factor of controls_size, default: 0.3
# `space` - fills all available space between previous and next item, useful to align items to the right
# - multiple spaces divide the available space among themselves, which can be used for centering
# `button:{name}` - button whose state, look, and click action are managed by external script
# Item visibility control:
# `<[!]{disposition1}[+[!]{dispositionN}][,{more_dispositions}]>` - optional prefix to control element's visibility
# - `+` creates an AND condition, `,` splits into OR groups. Example: `<foo,bar+baz>` -> `foo OR (bar AND baz)`
# - `{disposition}` can be one of:
# - `idle` - true if mpv is in idle mode (no file loaded)
# - `image` - true if current file is a single image
# - `audio` - true for audio only files
# - `video` - true for files with a video track
# - `has_many_video` - true for files with more than one video track
# - `has_image` - true for files with a cover or other image track
# - `has_audio` - true for files with an audio track
# - `has_many_audio` - true for files with more than one audio track
# - `has_sub` - true for files with an subtitle track
# - `has_many_sub` - true for files with more than one subtitle track
# - `has_many_edition` - true for files with more than one edition
# - `has_chapter` - true for files with chapter list
# - `stream` - true if current file is read from a stream
# - `has_playlist` - true if current playlist has 2 or more items in it
# - `{mpv_prop}` - any mpv property (note: set `user-data/foo` in a script to add custom ones)
# - prefix with `!` to negate the required disposition
# Examples:
# - `<stream>stream-quality` - show stream quality button only for streams
# - `<has_audio+!audio>audio` - show audio tracks button for all files that have
# an audio track, but are not exclusively audio only files
# Place `#{badge}[>{limit}]` after the element params to give it a badge. Available badges:
# `sub`, `audio`, `video` - track type counters
# `{mpv_prop}` - any mpv prop that makes sense to you: https://mpv.io/manual/master/#property-list
# - if prop value is an array it'll display its size
# `>{limit}` will display the badge only if it's numerical value is above this threshold.
# Example: `#audio>1`
# Place `?{tooltip}` after the element config to give it a tooltip.
# Example implementations:
# menu = command:menu:script-binding uosc/menu-blurred?Menu
# subtitles = command:subtitles:script-binding uosc/subtitles#sub?Subtitles
# fullscreen = cycle:crop_free:fullscreen:no/yes=fullscreen_exit!?Fullscreen
# loop-playlist = cycle:repeat:loop-playlist:no/inf!?Loop playlist
# toggle:{icon}:{prop} = cycle:{icon}:{prop}:no/yes!
controls=menu,gap,<video,audio>subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,gap,space,<video,audio>speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen
controls_size=32
controls_margin=8
controls_spacing=2
controls_persistency=
# Where to display volume controls: none, left, right
volume=right
volume_size=40
volume_border=1
volume_step=1
volume_persistency=
# Playback speed widget: mouse drag or wheel to change, click to reset
speed_step=0.1
speed_step_is_factor=no
speed_persistency=
# Controls all menus, such as context menu, subtitle loader/selector, etc
menu_item_height=36
menu_min_width=260
menu_padding=4
# Determines if `/` or `ctrl+f` is required to activate the search, or if typing
# any text is sufficient.
# When enabled, you can no longer toggle a menu off with the same key that opened it, if the key is a unicode character.
menu_type_to_search=yes
# Top bar with window controls and media title
# Can be: never, no-border, always
top_bar=no-border
top_bar_size=40
# Can be: `no` (hide), left or right
top_bar_controls=right
# Can be: `no` (hide), `yes` (inherit title from mpv.conf), or a custom template string
top_bar_title=yes
# Template string to enable alternative top bar title. If alt title matches main title,
# it'll be hidden. Tip: use `${media-title}` for main, and `${filename}` for alt title.
top_bar_alt_title=
# Can be:
# `below` => display alt title below the main one
# `toggle` => toggle the top bar title text between main and alt by clicking
# the top bar, or calling `toggle-title` binding
top_bar_alt_title_place=below
# Flash top bar when any of these file types is loaded. Available: audio,video,image,chapter
top_bar_flash_on=video,audio
top_bar_persistency=
# Window border drawn in no-border mode
window_border_size=1
# If there's no playlist and file ends, load next file in directory
# Uses `load_types` config below to determine what type of file to load next.
# When enabled, usoc will set mpv config `keep-open` to `yes`, and `keep-open-pause` to `no`.
autoload=no
# Enable uosc's playlist/directory shuffle mode
# This simply makes the next selected playlist or directory item be random, just
# like any other player in the world. It also has an easily togglable control button.
shuffle=no
# Scale the interface by this factor
scale=1
# Scale in fullscreen
scale_fullscreen=1.3
# Adjust the text scaling to fit your font
font_scale=1
# Border of text and icons when drawn directly on top of video
text_border=1.2
# Border radius of buttons, menus, and all other rectangles
border_radius=4
# A comma delimited list of color overrides in RGB HEX format. Defaults:
# foreground=ffffff,foreground_text=000000,background=000000,background_text=ffffff,curtain=111111,success=a5e075,error=ff616e,match=69c5ff,heatmap=00adee
color=
# A comma delimited list of opacity overrides for various UI element backgrounds and shapes.
# This does not affect any text, which is always rendered fully opaque. Defaults:
# timeline=0.9,position=1,chapters=0.8,slider=0.9,slider_gauge=1,controls=0,speed=0.6,menu=1,submenu=0.4,border=1,title=1,tooltip=1,thumbnail=1,curtain=0.8,idle_indicator=0.8,audio_indicator=0.5,buffering_indicator=0.3,playlist_position=0.8,heatmap=0.4
opacity=
# A comma delimited list of features to refine at a cost of some performance impact.
# text_width - Use a more accurate text width measurement that measures each text string individually
# instead of just measuring the width of known letters once and adding them up.
# sorting - Use filename sorting that handles non-english languages better, especially asian ones.
# At the moment, this is only available on windows, and has no effect on other platforms.
refine=
# Duration of animations in milliseconds
animation_duration=100
# Flash duration in milliseconds used by `flash-{element}` commands
flash_duration=1000
# Distances in pixels below which elements are fully faded in/out
proximity_in=40
proximity_out=120
# Use only bold font weight throughout the whole UI
font_bold=no
# One of `total`, `playtime-remaining` (scaled by the current speed), `time-remaining` (remaining length of file)
destination_time=playtime-remaining
# Display sub second fraction in timestamps up to this precision
time_precision=0
# Display stream's buffered time in timeline if it's lower than this amount of seconds, 0 to disable
buffered_time_threshold=60
# Hide UI when mpv autohides the cursor. Timing is controlled by `cursor-autohide` in `mpv.conf` (in milliseconds).
autohide=no
# Can be: flash, static, manual (controlled by flash-pause-indicator and decide-pause-indicator commands)
pause_indicator=flash
# Sizes to list in stream quality menu
stream_quality_options=4320,2160,1440,1080,720,480,360,240,144
# Types to identify media files
video_types=3g2,3gp,asf,avi,f4v,flv,h264,h265,m2ts,m4v,mkv,mov,mp4,mp4v,mpeg,mpg,ogm,ogv,rm,rmvb,ts,vob,webm,wmv,y4m
audio_types=aac,ac3,aiff,ape,au,cue,dsf,dts,flac,m4a,mid,midi,mka,mp3,mp4a,oga,ogg,opus,spx,tak,tta,wav,weba,wma,wv
image_types=apng,avif,bmp,gif,j2k,jp2,jfif,jpeg,jpg,jxl,mj2,png,svg,tga,tif,tiff,webp
subtitle_types=aqt,ass,gsub,idx,jss,lrc,mks,pgs,pjs,psb,rt,sbv,slt,smi,sub,sup,srt,ssa,ssf,ttxt,txt,usf,vt,vtt
playlist_types=m3u,m3u8,pls,url,cue
# Type pools used by file navigation and `autoload` to determine what type of file to load next
# Available: video,audio,image,playlist,same. `same` means the same type pool (not just extension) as currently open file.
load_types=video,audio,image
# Default open-file menu directory. Use `{drives}` to open drives menu on windows (defaults to `/` on unix).
default_directory=~/
# List hidden files when reading directories. Due to environment limitations, this currently only hides
# files starting with a dot. Doesn't hide hidden files on windows (we have no way to tell they're hidden).
show_hidden_files=no
# Move files to trash (recycle bin) when deleting files. Dependencies:
# - Linux: `sudo apt install trash-cli`
# - MacOS: `brew install trash`
use_trash=no
# Adjusted osd margins based on the visibility of UI elements
adjust_osd_margins=yes
# Adds chapter range indicators to some common chapter types.
# Additionally to displaying the start of the chapter as a diamond icon on top of the timeline,
# the portion of the timeline of that chapter range is also colored based on the config below.
#
# The syntax is a comma-delimited list of `{type}:{color}` pairs, where:
# `{type}` => range type. Currently supported ones are:
# - `openings`, `endings` => anime openings/endings
# - `intros`, `outros` => video intros/outros
# - `ads` => segments created by sponsor-block software like https://github.com/po5/mpv_sponsorblock
# `{color}` => an RGB(A) HEX color code (`rrggbb`, or `rrggbbaa`)
#
# To exclude marking any of the range types, simply remove them from the list.
chapter_ranges=openings:30abf964,endings:30abf964,ads:c54e4e80
# Add alternative lua patterns to identify beginnings of simple chapter ranges (except for `ads`)
# Syntax: `{type}:{pattern}[,{patternN}][;{type}:{pattern}[,{patternN}]]`
chapter_range_patterns=openings:オープニング;endings:エンディング
# Localization language priority from highest to lowest.
# Also controls what languages are fetched by `download-subtitles` menu.
# Built in languages can be found in `uosc/intl`.
# `slang` is a keyword to inherit values from `--slang` mpv config.
# Supports paths to custom json files: `languages=~~/custom.json,slang,en`
languages=slang,en
# By default, subtitles are downloaded into the directory of currently opened file.
# If the file is being played from a URL, we use this directory instead (expands to `{mpv_config_dir}/subtitles`)
# Prefix the path with `!` to force all subtitles to be saved there. Example: `!~~/subtitles`
subtitles_directory=~~/subtitles
# A comma separated list of element IDs to disable. Available IDs:
# window_border, top_bar, timeline, controls, volume,
# idle_indicator, audio_indicator, buffering_indicator, pause_indicator
disable_elements=
# List of mpv.conf properties respected by uosc:
# osd-font, osd-playlist-entry, slang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment