0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/etc/input.conf

175 lines
5.7 KiB
Plaintext
Raw Normal View History

# MPlayer input control file
#
# You are able to redefine default keyboard/joystick/mouse/LIRC bindings, or
# add new ones here.
# See DOCS/tech/slave.txt for possible commands that can be bound.
# Also see mplayer -input cmdlist for other possible options.
# The file should be placed in the $HOME/.mplayer directory.
#
# If you wish to unbind a key, use key ignore.
# e.g. ENTER ignore
#
# Note that merely removing default key bindings from this file won't remove
# the default bindings mplayer was compiled with, unless
# --input=nodefault-bindings
# is specified.
#
# Lines starting with # are comments. Use SHARP to assign the # key.
#
# Some characters need to be escaped. In particular, if you want to display
# a '\' character as part of an osd_show_property_text OSD message, you have to
# escape 2 times:
# key osd_show_property_text "This is a single backslash: \\\\!"
#
# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
# modifiers Shift, Ctrl, Alt and Meta, but note that currently reading
# key combinations is only supported through the video windows of certain
# output drivers (not in output windows of other drivers or in a terminal).
MOUSE_BTN0_DBL switch fullscreen # toggle fullscreen on/off
MOUSE_BTN2 switch pause # toggle pause on/off
MOUSE_BTN3 seek 10
MOUSE_BTN4 seek -10
MOUSE_BTN5 switch volume 1
MOUSE_BTN6 switch volume -1
# Seek units are in seconds, but note that these are limited by keyframes
RIGHT seek 10
LEFT seek -10
UP seek 60
DOWN seek -60
# Do smaller, always exact (non-keyframe-limited), seeks with shift.
Shift+RIGHT seek 1 0 1
Shift+LEFT seek -1 0 1
Shift+UP seek 5 0 1
Shift+DOWN seek -5 0 1
PGUP seek 600
PGDWN seek -600
+ switch audio-delay 0.100 # this changes audio/video sync
- switch audio-delay -0.100
[ speed_mult 0.9091 # scale playback speed
] speed_mult 1.1
{ speed_mult 0.5
} speed_mult 2.0
BS set speed 1.0 # reset speed to normal
q quit
q {encode} quit
ESC quit
p switch pause # toggle pause/playback mode
. frame_step # advance one frame and pause
SPACE switch pause
mplayer: turn playtree into a list, and change per-file option handling Summary: - There is no playtree anymore. It's reduced to a simple list. - Options are now always global. You can still have per-file options, but these are optional and require special syntax. - The slave command pt_step has been removed, and playlist_next and playlist_prev added. (See etc/input.conf changes.) This is a user visible incompatible change, and will break slave-mode applications. - The pt_clear slave command is renamed to playlist_clear. - Playtree entries could have multiple files. This is not the case anymore, and playlist entries have always exactly one entry. Whenever something adds more than one file (like ASX playlists or dvd:// or dvdnav:// on the command line), all files are added as separate playlist entries. Note that some of the changes are quite deep and violent. Expect regressions. The playlist parsing code in particular is of low quality. I didn't try to improve it, and merely spent to least effort necessary to keep it somehow working. (Especially ASX playlist handling.) The playtree code was complicated and bloated. It was also barely used. Most users don't even know that mplayer manages the playlist as tree, or how to use it. The most obscure features was probably specifying a tree on command line (with '{' and '}' to create/close tree nodes). It filled the player code with complexity and confused users with weird slave commands like pt_up. Replace the playtree with a simple flat playlist. Playlist parsers that actually return trees are changed to append all files to the playlist pre-order. It used to be the responsibility of the playtree code to change per-file config options. Now this is done by the player core, and the playlist code is free of such details. Options are not per-file by default anymore. This was a very obscure and complicated feature that confused even experienced users. Consider the following command line: mplayer file1.mkv file2.mkv --no-audio file3.mkv This will disable the audio for file2.mkv only, because options are per-file by default. To make the option affect all files, you're supposed to put it before the first file. This is bad, because normally you don't need per-file options. They are very rarely needed, and the only reasonable use cases I can imagine are use of the encode backend (mplayer encode branch), or for debugging. The normal use case is made harder, and the feature is perceived as bug. Even worse, correct usage is hard to explain for users. Make all options global by default. The position of an option isn't significant anymore (except for options that compensate each other, consider --shuffle --no-shuffle). One other important change is that no options are reset anymore if a new file is started. If you change settings with slave mode commands, they will not be changed by playing a new file. (Exceptions include settings that are too file specific, like audio/subtitle stream selection.) There is still some need for per-file options. Debugging and encoding are use cases that profit from per-file options. Per-file profiles (as well as per-protocol and per-VO/AO options) need the implementation related mechanisms to backup and restore options when the playback file changes. Simplify the save-slot stuff, which is possible because there is no hierarchical play tree anymore. Now there's a simple backup field. Add a way to specify per-file options on command line. Example: mplayer f1.mkv -o0 --{ -o1 f2.mkv -o2 f3.mkv --} f4.mkv -o3 will have the following options per file set: f1.mkv, f4.mkv: -o0 -o3 f2.mkv, f3.mkv: -o0 -o3 -o1 -o2 The options --{ and --} start and end per-file options. All files inside the { } will be affected by the options equally (similar to how global options and multiple files are handled). When playback of a file starts, the per-file options are set according to the command line. When playback ends, the per-file options are restored to the values when playback started.
2012-07-31 21:33:26 +02:00
> playlist_next # skip to next file
ENTER playlist_next 1 # skip to next file or quit
< playlist_prev # skip to previous file
o osd # cycle through OSD mode
I show_text "${filename}" # display filename in osd
P show_progress
z switch sub-delay -0.1 # subtract 100 ms delay from subs
x switch sub-delay +0.1 # add
g sub_step -1 # immediately display next subtitle
y sub_step +1 # previous
9 switch volume -1
/ switch volume -1
0 switch volume 1
* switch volume 1
( switch balance -0.1 # adjust audio balance in favor of left
) switch balance 0.1 # right
m switch mute
1 switch contrast -1
2 switch contrast 1
3 switch brightness -1
4 switch brightness 1
5 switch hue -1
6 switch hue 1
7 switch saturation -1
8 switch saturation 1
d switch framedrop # cycle through framedrop modes
# toggle deinterlacer; requires either vdpau output, -vf yadif or kerndeint
D switch deinterlace
c switch colormatrix
# Next 3 currently only work with --no-ass
r switch sub-pos -1 # move subtitles up
t switch sub-pos +1 # down
v switch sub-visibility
# stretch SSA/ASS subtitles with anamorphic videos to match historical
V switch ass-vsfilter-aspect-compat
j switch sub # cycle through subtitles
J switch sub -1 # ...backwards
F switch sub-forced-only
SHARP switch audio # switch audio streams
_ switch video
TAB switch program
i edl_mark # for use with --edlout mode
T switch ontop # toggle video window ontop of other windows
f switch fullscreen # toggle fullscreen
s screenshot 0 # take a png screenshot
S screenshot 1 # ...on every frame
Alt+s screenshot 0 1 # take a screenshot of window contents
Alt+S screenshot 1 1 # ...on every frame
w switch panscan -0.1 # zoom out with -panscan 0 -fs
e switch panscan +0.1 # in
POWER quit
MENU switch osd
PLAY switch pause
PAUSE switch pause
PLAYPAUSE switch pause
STOP quit
FORWARD seek 60
REWIND seek -60
mplayer: turn playtree into a list, and change per-file option handling Summary: - There is no playtree anymore. It's reduced to a simple list. - Options are now always global. You can still have per-file options, but these are optional and require special syntax. - The slave command pt_step has been removed, and playlist_next and playlist_prev added. (See etc/input.conf changes.) This is a user visible incompatible change, and will break slave-mode applications. - The pt_clear slave command is renamed to playlist_clear. - Playtree entries could have multiple files. This is not the case anymore, and playlist entries have always exactly one entry. Whenever something adds more than one file (like ASX playlists or dvd:// or dvdnav:// on the command line), all files are added as separate playlist entries. Note that some of the changes are quite deep and violent. Expect regressions. The playlist parsing code in particular is of low quality. I didn't try to improve it, and merely spent to least effort necessary to keep it somehow working. (Especially ASX playlist handling.) The playtree code was complicated and bloated. It was also barely used. Most users don't even know that mplayer manages the playlist as tree, or how to use it. The most obscure features was probably specifying a tree on command line (with '{' and '}' to create/close tree nodes). It filled the player code with complexity and confused users with weird slave commands like pt_up. Replace the playtree with a simple flat playlist. Playlist parsers that actually return trees are changed to append all files to the playlist pre-order. It used to be the responsibility of the playtree code to change per-file config options. Now this is done by the player core, and the playlist code is free of such details. Options are not per-file by default anymore. This was a very obscure and complicated feature that confused even experienced users. Consider the following command line: mplayer file1.mkv file2.mkv --no-audio file3.mkv This will disable the audio for file2.mkv only, because options are per-file by default. To make the option affect all files, you're supposed to put it before the first file. This is bad, because normally you don't need per-file options. They are very rarely needed, and the only reasonable use cases I can imagine are use of the encode backend (mplayer encode branch), or for debugging. The normal use case is made harder, and the feature is perceived as bug. Even worse, correct usage is hard to explain for users. Make all options global by default. The position of an option isn't significant anymore (except for options that compensate each other, consider --shuffle --no-shuffle). One other important change is that no options are reset anymore if a new file is started. If you change settings with slave mode commands, they will not be changed by playing a new file. (Exceptions include settings that are too file specific, like audio/subtitle stream selection.) There is still some need for per-file options. Debugging and encoding are use cases that profit from per-file options. Per-file profiles (as well as per-protocol and per-VO/AO options) need the implementation related mechanisms to backup and restore options when the playback file changes. Simplify the save-slot stuff, which is possible because there is no hierarchical play tree anymore. Now there's a simple backup field. Add a way to specify per-file options on command line. Example: mplayer f1.mkv -o0 --{ -o1 f2.mkv -o2 f3.mkv --} f4.mkv -o3 will have the following options per file set: f1.mkv, f4.mkv: -o0 -o3 f2.mkv, f3.mkv: -o0 -o3 -o1 -o2 The options --{ and --} start and end per-file options. All files inside the { } will be affected by the options equally (similar to how global options and multiple files are handled). When playback of a file starts, the per-file options are set according to the command line. When playback ends, the per-file options are restored to the values when playback started.
2012-07-31 21:33:26 +02:00
NEXT playlist_next
PREV playlist_prev
VOLUME_UP switch volume 1
VOLUME_DOWN switch volume -1
MUTE switch mute
CLOSE_WIN quit
CLOSE_WIN {encode} quit
! switch chapter -1 # skip to previous chapter
@ switch chapter 1 # next
E switch edition # next edition
A switch angle 1
U stop
# TV
h tv_step_channel 1
k tv_step_channel -1
n tv_step_norm
u tv_step_chanlist
#
# Apple Remote section
#
AR_PLAY switch pause
AR_PLAY_HOLD quit
AR_NEXT seek 30
AR_NEXT_HOLD seek 120
AR_PREV seek -10
AR_PREV_HOLD seek -120
AR_MENU switch osd
AR_MENU_HOLD switch mute
AR_VUP switch volume 1
AR_VDOWN switch volume -1
#
# Joystick section
# WARNING: joystick support has to be explicitly enabled at
# compiletime with --enable-joystick
#
JOY_AXIS0_PLUS seek 10
JOY_AXIS0_MINUS seek -10
JOY_AXIS1_MINUS seek 60
JOY_AXIS1_PLUS seek -60
JOY_BTN0 switch pause
JOY_BTN1 switch osd
JOY_BTN2 switch volume 1
JOY_BTN3 switch volume -1
#
# Not assigned by default
# (not an exhaustive list of unbound commands)
#
#? switch sub-scale +0.1 # increase subtitle font size
#? switch sub-scale -0.1 # decrease subtitle font size