Skip to content

Instantly share code, notes, and snippets.

@linguisticmind
Created July 19, 2024 00:21
Show Gist options
  • Select an option

  • Save linguisticmind/3fc5582330a069ee366c21c39d2b2269 to your computer and use it in GitHub Desktop.

Select an option

Save linguisticmind/3fc5582330a069ee366c21c39d2b2269 to your computer and use it in GitHub Desktop.
mpv configs | "[mpv #1] mpv player basics walkthrough" (https://youtu.be/b-5XOZpXZMg) | Linguistic Mind
# This file's location: ~/.config/mpv/mpv.conf
profile="1080p-max-size"
no-native-fs # Disables native macOS full-screen
input-right-alt-gr="no" # Makes right alt key work with keybindings
no-keepaspect-window # Allows resizing video player window to arbitrary dimensions
# (adds black bars around video, preserves its aspect ratio)
audio-file-auto=fuzzy # Load external audio files
[1080p-max-size]
geometry="100%x1000+0+0" # 1080p monitor
profile="text-max"
[left-1/2]
geometry="50%x1000+0+0"
profile="text-smaller"
[right-1/2]
geometry="50%x1000-0+0"
profile="text-smaller"
[1080p-left-2/3]
geometry="1280x1000+0+0"
profile="text-smaller"
[1080p-right-2/3]
geometry="1280x1000-0+0"
profile="text-smaller"
[768p-max-size]
geometry="100%x688+0+0" # MacBook built-in monitor
profile="text-max"
[default]
osd-font="DejaVu Sans Mono Bold" # Regular full font name -
# PostScript name doesn't work
# with this font on macOS Catalina
# osd-bold="yes" # Does not work on macOS Catalina
sub-font="SourceHanMono-Bold" # PostScript font name -
# regular full name doesn't work
# with this font on macOS Catalina
sub-border-size="5"
# sub-bold="yes" # Does not work on macOS Catalina
[text-max]
sub-font-size="60"
sub-margin-y="60"
[text-smaller]
sub-font-size="40"
sub-margin-y="100"
osd-font-size="18"
[default]
sid="1"
sub-file-paths="Extra subtitles:" # Colon-separated list of directories
# containing subtitles files
volume-max="200"
[movies2anki]
load-scripts="no"
script="~/.config/mpv/scripts/Colorbox.js"
script="~/.config/mpv/scripts/copy-subtitle.lua"
[input-test]
input-test
force-window
idle
# This file's location: ~/.config/mpv/input.conf
# -----------------------------------------------
# Disabling default bindings
# -----------------------------------------------
MBTN_RIGHT ignore
MBTN_BACK ignore
MBTN_FORWARD ignore
WHEEL_UP ignore
WHEEL_DOWN ignore
WHEEL_LEFT ignore
WHEEL_RIGHT ignore
BS ignore
q ignore
Q ignore
> ignore
< ignore
z ignore
Z ignore
x ignore
/ ignore
* ignore
Alt+0 ignore
v ignore
V ignore
J ignore
j ignore
S ignore
Ctrl+s ignore
ctrl+c ignore
DEL ignore
PGUP ignore
PGDWN ignore
Alt++ ignore
Alt+- ignore
Alt+BS ignore
Alt+left ignore
Alt+right ignore
Alt+up ignore
Alt+down ignore
# -----------------------------------------------
# Seeking
# -----------------------------------------------
LEFT no-osd seek -3 exact
RIGHT no-osd seek 3 exact
UP no-osd seek -10 exact
DOWN no-osd seek 10 exact
Alt+LEFT no-osd seek -60 exact
Alt+RIGHT no-osd seek 60 exact
Alt+UP no-osd seek -300 exact
Alt+DOWN no-osd seek 300 exact
Alt+HOME no-osd seek 0 absolute-percent
Alt+END no-osd seek 100 absolute-percent+exact
Shift+LEFT no-osd sub-seek -1
Shift+RIGHT no-osd sub-seek 1
Shift+UP add chapter -1
Shift+DOWN add chapter 1
# -----------------------------------------------
# Zooming and panning
# -----------------------------------------------
# Meta+= no-osd add video-zoom 0.1
# Meta+- no-osd add video-zoom -0.1
# Meta+left no-osd add video-pan-x 0.1
# Meta+right no-osd add video-pan-x -0.1
# Meta+up no-osd add video-pan-y 0.1
# Meta+down no-osd add video-pan-y -0.1
# Meta+BS no-osd set video-zoom 0 ; no-osd set video-pan-x 0 ; no-osd set video-pan-y 0
Meta++ no-osd add video-zoom 0.1
Meta+= no-osd add video-zoom 0.1
Meta+- no-osd add video-zoom -0.1
Meta+_ no-osd add video-zoom -0.1
# Meta+left no-osd add video-pan-x 0.1
# Meta+right no-osd add video-pan-x -0.1
# Meta+up no-osd add video-pan-y 0.1
# Meta+down no-osd add video-pan-y -0.1
Meta+KP1 no-osd add video-pan-x 0.01 ; no-osd add video-pan-y -0.01
Meta+KP2 no-osd add video-pan-y -0.01
Meta+KP3 no-osd add video-pan-x -0.01 ; no-osd add video-pan-y -0.01
Meta+KP4 no-osd add video-pan-x 0.01
Meta+KP5 no-osd set video-pan-x 0 ; no-osd set video-pan-y 0
Meta+KP6 no-osd add video-pan-x -0.01
Meta+KP7 no-osd add video-pan-x 0.01 ; no-osd add video-pan-y 0.01
Meta+KP8 no-osd add video-pan-y 0.01
Meta+KP9 no-osd add video-pan-x -0.01 ; no-osd add video-pan-y 0.01
Meta+KP0 cycle pause
Meta+* no-osd set video-zoom 0
Meta+KP_DEC no-osd set video-zoom 0 ; no-osd set video-pan-x 0 ; no-osd set video-pan-y 0
Meta+BS no-osd set video-zoom 0
Meta+Alt+BS no-osd set video-zoom 0 ; no-osd set video-pan-x 0 ; no-osd set video-pan-y 0
# -----------------------------------------------
# Changing speed
# -----------------------------------------------
Meta+[ add speed -0.25
Meta+] add speed 0.25
[ add speed -1
] add speed 1
p set speed 1.0
\ cycle-values speed 5.0 1.0
# -----------------------------------------------
# Other
# -----------------------------------------------
Alt+PGDWN playlist-next
Alt+PGUP playlist-prev
F10 show-text ${chapter-list}
s cycle sub-visibility
Ctrl+S sub-reload
Meta+s cycle sub
Meta+S cycle sub down
Meta+a cycle audio
Meta+A cycle audio down
Meta+v cycle video
Meta+V cycle video down
# - add volume -2
# = add volume 2
# + add volume 2
Alt+t cycle ontop
Ctrl+Alt+S screenshot
Meta+i no-osd cycle-values vf negate ""
ENTER cycle fullscreen
KP_ENTER cycle fullscreen
MBTN_RIGHT cycle fullscreen
Alt+§ set window-scale 0.5 # Scales video player window to half-size
# (Default bindings Alt+1 and Alt+2
# scale it to 100% and 200% respectively)
Alt+Meta+q quit-watch-later
# -----------------------------------------------
# Scripts
# -----------------------------------------------
z script-binding Blackbox_Playlist
Z script-binding Blackbox
c script-binding Colorbox
/ script-binding osc-show-hide-hotkey
Meta+r no-osd set video-rotate 0
r script-message Cycle_Video_Rotate 90
R script-message Cycle_Video_Rotate -90
Meta+c script-binding copy-subtitle
Alt+Meta+c script-binding copy-time
Alt+Meta+C script-binding copy-time-in-seconds
# ` script-binding console/enable
# This file's location: ~/.config/mpv/script-settings/Blackbox.conf
# Menu appearance.
auto_close=0
max_lines=12
font_size=30 # Default 40
help_hint=no
# Favorite paths.
#favorites={/home/example/Movies}+{/home/example/Downloads}+{/home/example/Documents}+{/}
# Additional file-inclusion pattern (regex).
# This particular pattern also adds ".rar" and ".zip" files to the file browser.
include_regex=\.(?:rar|zip)$
# Key rebindings.
#
# Recommendation:
# Bind the main "Blackbox" menu command (via input.conf)
# to "z" and use the left-hand navigation below.
keys_menu_up={up}+{w}
keys_menu_down={down}+{s}
keys_menu_up_fast={pgup}+{shift+w}
keys_menu_down_fast={pgdwn}+{shift+s}
keys_menu_left={left}+{a}
keys_menu_right={right}+{d}
keys_menu_open={enter}+{e}
keys_menu_undo={bs}+{r}
keys_menu_help={h}
keys_menu_close={esc}+{c}
# This file's location: ~/.config/mpv/script-settings/Colorbox.conf
# Presets.
# Format: v1; contrast; brightness; gamma; saturation; hue; sharpen; title
presets[]=v1; 6; -2; 0; -4; 0; 0.6; Subtle depth enhancer (desat)
presets[]=v1; 6; -2; 0; 4; 0; 0.6; Subtle depth enhancer (sat)
presets[]=v1; 7; -8; 6; -10; 5; 1.3; Clarity darker
presets[]=v1; 6; -5; 2; -10; 5; 1.3; Clarity natural/dark
presets[]=v1; 6; -3; 1; -10; 5; 1.3; Clarity medium
presets[]=v1; 6; 0; 1; -5; 5; 1.3; Clarity light
presets[]=v1; 6; 1; 4; -5; 5; 1.3; Clarity lighter
presets[]=v1; 52; -11; -2; -6; 4; 1.3; Lift vintage flatness
presets[]=v1; 21; 3; -2; -30; 8; 1.1; Yellow de-glow and modernize
# Load preset at startup.
#startup_preset=Clarity medium
# Menu appearance.
auto_close=0
max_lines=16
font_size=30
font_alpha=0.7
# Key rebindings.
keys_menu_up={up}+{w}
keys_menu_down={down}+{s}
keys_menu_up_fast={shift+up}+{shift+w}
keys_menu_down_fast={shift+down}+{shift+s}
keys_menu_left={left}+{a}
keys_menu_right={right}+{d}
keys_menu_open={enter}+{e}
keys_menu_undo={bs}+{r}
keys_menu_help={h}
keys_menu_close={esc}+{c}
# This file's location: ~/.config/mpv/script-opts/osc.conf
boxvideo=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment