Skip to content

Instantly share code, notes, and snippets.

@JySzE
Last active December 29, 2025 21:27
Show Gist options
  • Select an option

  • Save JySzE/04ee1964d3a734d7be8f25f08da55f49 to your computer and use it in GitHub Desktop.

Select an option

Save JySzE/04ee1964d3a734d7be8f25f08da55f49 to your computer and use it in GitHub Desktop.
Read Guide Under mpv.conf
# ONLY IF YOU HAVE HDR META PASSTHROUGH ENABLED AND HDR SWITCHING, HDR TVs ONLY.
###############################################################################################################################
# Video Output Options
###############################################################################################################################
vo = gpu-next
gpu-api = vulkan
hwdec = vulkan-copy
gpu-context = winvk
swapchain-depth=1 #nvidia only
vulkan-async-compute=no #nvidia only
target-colorspace-hint = yes
target-colorspace-hint-mode = source
hdr-compute-peak = no
d3d11-adapter = NVIDIA
###############################################################################################################################
# Subtitle Options
###############################################################################################################################
sub-auto = fuzzy
sub-font = "Gandhi Sans"
sub-font-size = 52
sub-color = 0.95/0.95/0.95/1
sub-blur = 0.2
sub-bold = yes
sub-border-size = 3
sub-border-color = 0.05/0.05/0.05/1
sub-spacing = 1.5
sub-shadow-offset = 1
sub-shadow-color = 0/0/0/0.25
sub-use-margins = no
sub-margin-y = 50
sub-margin-x = 80
sub-scale-with-window = no
sub-ass-override = no
demuxer-mkv-subtitle-preroll = yes
sub-fix-timing = no
sub-gray = yes
sub-gauss = .6
###############################################################################################################################
# Scaling and Etc Options
###############################################################################################################################
scale = ewa_lanczossharp
cscale = ewa_lanczossharp
dscale = ewa_robidoux
dscale-param1 = 0
dscale-param2 = .5
correct-downscaling = yes
sigmoid-upscaling = yes
scale-antiring = .4
deband = no
###############################################################################################################################
# Auto Profiles
###############################################################################################################################
[no-upscaling]
profile-desc = "No scaling needed - 1:1 pixel ratio"
profile-cond = (p["video-params/w"] or 0) > 0 and (p["video-params/h"] or 0) > 0 and (p["osd-dimensions/w"] or 0) > 0 and (p["osd-dimensions/h"] or 0) > 0 and (p["video-params/w"] >= p["osd-dimensions/w"] or p["video-params/h"] >= p["osd-dimensions/h"])
scale = bilinear
cscale = bilinear
sigmoid-upscaling = no
profile-restore = copy
#---------------------------------------------------------------------------------------------------------------------------------------------#
# Analog Profile RARE
[Analog bt.470m]
profile-desc = "Analog bt.470m"
profile-cond = p["video-params/primaries"]=="bt.470m"
target-colorspace-hint = no
target-prim = bt.470m
dither-depth = 8
dither = fruit
profile-restore = copy
#---------------------------------------------------------------------------------------------------------------------------------------------#
# SD Profiles
[SD NTSC]
profile-desc = "SD NTSC"
profile-cond = p["video-params/primaries"]=="bt.601-525"
target-colorspace-hint = no
target-prim = bt.601-525
target-trc = bt.1886
dither-depth = 8
dither = fruit
profile-restore = copy
[SD PAL]
profile-desc = "SD PAL"
profile-cond = p["video-params/primaries"]=="bt.601-625"
target-colorspace-hint = no
target-prim = bt.601-625
target-trc = bt.1886
dither-depth = 8
dither = fruit
profile-restore = copy
#-----------------------------------------------------------------------------------------------------------------------------#
# SDR UHD & HD Profiles
[SDR UHD & HD BT.709]
profile-desc = "SDR UHD & HD BT.709"
profile-cond = p["video-params/primaries"]=="bt.709"
target-colorspace-hint = no
target-prim = bt.709
target-trc = bt.1886
dither-depth = 8
dither = fruit
profile-restore = copy
[SDR UHD BT.2020]
profile-desc = "SDR UHD BT.2020"
profile-cond = p["video-params/gamma"]~="pq" and p["video-params/primaries"]=="bt.2020" and p["video-params/gamma"]=="bt.1886"
target-colorspace-hint = no
target-prim = bt.709
target-trc = bt.1886
gamut-mapping-mode = absolute
dither-depth = 8
dither = fruit
profile-restore = copy
#---------------------------------------------------------------------------------------------------------------------------------------------#
[DV WEBDL]
profile-desc = "DV WEBDL"
profile-cond = p["video-params/pixelformat"]=="p010" and p["video-params/colorlevels"]=="full" and p["video-params/colormatrix"]=="dolbyvision"
target-colorspace-hint = no
tone-mapping = bt.2446a
target-prim = bt.709
target-trc = bt.1886
hdr-compute-peak = yes
gamut-mapping-mode = perceptual
target-peak = 120
dither-depth = 8
dither = fruit
profile-restore = copy
###############################################################################################################################################

NV DRIVERS ARE BROKEN AND HAVE BEEN SINCE 512.96 MOBILE GPUS EVEN WORSE, GIVE UP AND GET A SHIELD/kodi, APPLE4KTV/infuse or Ugoos am6b+/elec

PLEX HTPC MPV Conf Guide for HDR TV Users

Prerequisites:

  • Nvidia Studio Drivers if using a NV Card, Last tested known non-stuttering Studio Driver: 581.29
  • GPU set to max performance in NV Control Panel
  • Download and install font: https://www.fontsquirrel.com/fonts/gandhi-sans
  • Custom Build:
    Download a modified MPV build from this mpv-winbuild
    • Use mpv-dev-x86_64-v3 for modern CPUs or mpv-dev-x86_64 for older CPUs
    • Replace libmpv-2.dll in:
      C:\Program Files\Plex\Plex HTPC

Setup Steps:

  1. Configure Plex HTPC Settings:
    • Video Settings:
     Local Quality: Original  
     Allow Direct Play: Checked  
     Allow Direct Stream: Checked  
     Force Direct Play: Unchecked  
     Use Hardware Decoding: Checked  
     Enable Refresh Rate Switching: Checked  
     Enable Resolution Switching: Checked  
     Enable HDR Switching: Checked  
     HDR Metadata Passthrough: Enabled  
     Refresh Rate Switching Delay: Any  
     Video Playback Quality: Normal Quality  
  1. Edit plex.ini:
    • Go to: C:\Users\<YOUR USERNAME>\AppData\Local\Plex HTPC
    • Open or create plex.ini and add this to the [debug] section:
     [debug]  
     webInspectorPort=0  
     disableUpdater=true  
  1. Create/Edit mpv.conf:
    • File location:
      • C:\Users\<YOUR USERNAME>\AppData\Local\Plex HTPC

Fixing VFR Content Issues

Download CRU: https://customresolutionutility.net/

  1. Open CRU and select your display
  2. Open the first extension block
  3. Click "TV Resolutions" then "Edit"
  4. Delete all resolutions with 30Hz or 29.970Hz refresh rates
  5. Click "OK" and restart your system (or run restart64.exe from the CRU folder)

Why this works: By removing 30Hz/29.970Hz resolutions, you force VFR SD and HD content to run at 60Hz instead. This ensures the playback framerate is evenly divisible (60/30=2, 60/24=2.5), which significantly reduces stutter and judder during framerate transitions in variable framerate content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment