Skip to content

Instantly share code, notes, and snippets.

@JySzE
Last active March 18, 2025 11:27
Show Gist options
  • Save JySzE/04ee1964d3a734d7be8f25f08da55f49 to your computer and use it in GitHub Desktop.
Save JySzE/04ee1964d3a734d7be8f25f08da55f49 to your computer and use it in GitHub Desktop.
# ONLY IF YOU HAVE HDR META PASSTHROUGH ENABLED AND HDR SWITCHING, HDR TVs ONLY.
###############################################################################################################################
# Video Output Options
###############################################################################################################################
vo = gpu-next
hwdec = d3d11va-copy
d3d11-adapter = NVIDIA
###############################################################################################################################
# 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
###############################################################################################################################
# Subtitle Options
###############################################################################################################################
# Adjust all as needed.
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 = 100
sub-scale-with-window = no
sub-ass-override = no
demuxer-mkv-subtitle-preroll = yes
sub-fix-timing = no
###############################################################################################################################
# Auto Profiles.
###############################################################################################################################
# Analog Profile RARE
[Analog bt.470m]
profile-desc = "Analog bt.470m"
profile-cond = p["video-params/primaries"]=="bt.470m"
target-prim = bt.470m
gamut-mapping-mode = auto
libplacebo-opts = gamut_expansion=no
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-prim = bt.601-525
gamut-mapping-mode = auto
libplacebo-opts = gamut_expansion=no
dither-depth = 8
dither = fruit
profile-restore=copy
[SD PAL]
profile-desc = "SD PAL"
profile-cond = p["video-params/primaries"]=="bt.601-625"
target-prim = bt.601-625
gamut-mapping-mode = auto
libplacebo-opts = gamut_expansion=no
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-prim = bt.709
gamut-mapping-mode = auto
libplacebo-opts = gamut_expansion=no
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-prim = bt.709
target-trc = bt.1886
target-colorspace-hint = no
gamut-mapping-mode = absolute
libplacebo-opts = gamut_expansion=no
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"
tone-mapping = bt.2446a # Adjust as needed.
target-prim = bt.709
target-trc = bt.1886
hdr-compute-peak = yes
gamut-mapping-mode = perceptual # Adjust as needed.
target-peak = 120 # Adjust as needed.
dither-depth = 8
dither = fruit
profile-restore=copy
###############################################################################################################################################

PLEX HTPC MPV Conf Guide for HDR TV Users

Prerequisites:

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  
      
  2. 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  
      
  3. Create/Edit mpv.conf:

    • File location:
      • C:\Program Files\Plex\Plex HTPC
      • C:\Users\<YOUR USERNAME>\AppData\Local\Plex HTPC
    • Config for HDR TVs with metadata passthrough:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment