2012-09-27 01:20:12 +00:00
|
|
|
.. _input:
|
|
|
|
|
|
|
|
INPUT.CONF
|
|
|
|
==========
|
|
|
|
|
|
|
|
The input.conf file consists of a list of key bindings, for example:
|
|
|
|
|
|
|
|
| s screenshot # take a screenshot with the s key
|
|
|
|
|
|
|
|
Each line maps a key to an input command. Keys are specified with their literal
|
|
|
|
value (upper case if combined with ``Shift``), or a name for special keys. For
|
|
|
|
example, ``a`` maps to the ``a`` key without shift, and ``A`` maps to ``a``
|
|
|
|
with shift.
|
|
|
|
|
|
|
|
A list of special keys can be obtained with
|
|
|
|
|
options: drop --opt:subopt option names
For all suboptions, "flat" options were available by separating the
parent option and the sub option with ":", e.g. "--rawvideo:w=123". Drop
this syntax and use "-" as separator. This means even suboptions are
available as normal options now, e.g. "--rawvideo-w=123". The old syntax
doesn't work anymore.
Note that this is completely separate from actual suboptions. For
example, "-rawvideo w=123:h=123" still works. (Not that this syntax is
worth supporting, but it's needed anyway, for for other things like vf
and vo suboptions.)
As a consequence of this change, we also have to add new "no-" prefixed
options for flag suboptions, so that "--no-input-default-bindings"
works. ("--input-no-default-bindings" also works as a consequence of
allowing "-input no-default-bindings" - they are handled by the same
underlying option.)
For --input, always use the full syntax in the manpage. There exist
suboptions other than --input (like --tv, --rawvideo, etc.), but since
they might be handled differently in the future, don't touch these yet.
M_OPT_PREFIXED becomes the default, so remove it. As a minor unrelated
cleanup, get rid of M_OPT_MERGE too and use the OPT_SUBSTRUCT() macro in
some places.
Unrelated: remove the duplicated --tv:buffersize option, fix a typo in
changes.rst.
2013-02-21 21:10:21 +00:00
|
|
|
| **mpv** --input-keylist
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
In general, keys can be combined with ``Shift``, ``Ctrl`` and ``Alt``:
|
|
|
|
|
|
|
|
| ctrl+q quit
|
|
|
|
|
2012-10-23 23:06:00 +00:00
|
|
|
**mpv** can be started in input test mode, which displays key bindings and the
|
|
|
|
commands they're bound to on the OSD, instead of running the commands:
|
|
|
|
|
options: drop --opt:subopt option names
For all suboptions, "flat" options were available by separating the
parent option and the sub option with ":", e.g. "--rawvideo:w=123". Drop
this syntax and use "-" as separator. This means even suboptions are
available as normal options now, e.g. "--rawvideo-w=123". The old syntax
doesn't work anymore.
Note that this is completely separate from actual suboptions. For
example, "-rawvideo w=123:h=123" still works. (Not that this syntax is
worth supporting, but it's needed anyway, for for other things like vf
and vo suboptions.)
As a consequence of this change, we also have to add new "no-" prefixed
options for flag suboptions, so that "--no-input-default-bindings"
works. ("--input-no-default-bindings" also works as a consequence of
allowing "-input no-default-bindings" - they are handled by the same
underlying option.)
For --input, always use the full syntax in the manpage. There exist
suboptions other than --input (like --tv, --rawvideo, etc.), but since
they might be handled differently in the future, don't touch these yet.
M_OPT_PREFIXED becomes the default, so remove it. As a minor unrelated
cleanup, get rid of M_OPT_MERGE too and use the OPT_SUBSTRUCT() macro in
some places.
Unrelated: remove the duplicated --tv:buffersize option, fix a typo in
changes.rst.
2013-02-21 21:10:21 +00:00
|
|
|
| **mpv** --input-test --demuxer=rawvideo --rawvideo=w=1280:h=720 /dev/zero
|
2012-10-23 23:06:00 +00:00
|
|
|
|
|
|
|
(Commands which normally close the player will not work in this mode, and you
|
|
|
|
must kill **mpv** externally to make it exit.)
|
|
|
|
|
2012-09-27 01:20:12 +00:00
|
|
|
General input command syntax
|
|
|
|
----------------------------
|
|
|
|
|
2012-10-23 23:06:00 +00:00
|
|
|
`[Shift+][Ctrl+][Alt+][Meta+]<key> [<prefixes>] <command> (<argument>)*`
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
Newlines always start a new binding. ``#`` starts a comment (outside of quoted
|
|
|
|
string arguments). To bind commands to the ``#`` key, ``SHARP`` can be used.
|
|
|
|
|
|
|
|
<key> is either the literal character the key produces (ASCII or unicode
|
|
|
|
character), or a symbol name.
|
|
|
|
|
|
|
|
Arguments are separated by whitespace. This applies even to string arguments.
|
|
|
|
For this reason, string arguments should be quoted with ``"``. Inside quotes,
|
|
|
|
C style escaping can be used.
|
|
|
|
|
|
|
|
Optional arguments can be skipped with ``-``.
|
|
|
|
|
|
|
|
List of input commands
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
ignore
|
|
|
|
Use this to "block" keys that should be unbound, and do nothing. Useful for
|
|
|
|
disabling default bindings, without disabling all bindings with
|
options: drop --opt:subopt option names
For all suboptions, "flat" options were available by separating the
parent option and the sub option with ":", e.g. "--rawvideo:w=123". Drop
this syntax and use "-" as separator. This means even suboptions are
available as normal options now, e.g. "--rawvideo-w=123". The old syntax
doesn't work anymore.
Note that this is completely separate from actual suboptions. For
example, "-rawvideo w=123:h=123" still works. (Not that this syntax is
worth supporting, but it's needed anyway, for for other things like vf
and vo suboptions.)
As a consequence of this change, we also have to add new "no-" prefixed
options for flag suboptions, so that "--no-input-default-bindings"
works. ("--input-no-default-bindings" also works as a consequence of
allowing "-input no-default-bindings" - they are handled by the same
underlying option.)
For --input, always use the full syntax in the manpage. There exist
suboptions other than --input (like --tv, --rawvideo, etc.), but since
they might be handled differently in the future, don't touch these yet.
M_OPT_PREFIXED becomes the default, so remove it. As a minor unrelated
cleanup, get rid of M_OPT_MERGE too and use the OPT_SUBSTRUCT() macro in
some places.
Unrelated: remove the duplicated --tv:buffersize option, fix a typo in
changes.rst.
2013-02-21 21:10:21 +00:00
|
|
|
``--no-input-default-bindings``.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
2012-10-21 10:33:18 +00:00
|
|
|
seek <seconds> [relative|absolute|absolute-percent|- [default-precise|exact|keyframes]]
|
2012-09-27 01:20:12 +00:00
|
|
|
Change the playback position. By default, seeks by a relative amount of
|
|
|
|
seconds.
|
|
|
|
|
|
|
|
The second argument sets the seek mode:
|
|
|
|
|
|
|
|
relative (default)
|
|
|
|
Seek relative to current position (a negative value seeks backwards).
|
|
|
|
absolute
|
|
|
|
Seek to a given time.
|
|
|
|
absolute-percent
|
2012-10-23 23:06:00 +00:00
|
|
|
Seek to a given percent position.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
The third argument defines how exact the seek is:
|
|
|
|
|
|
|
|
default-precise (default)
|
|
|
|
Follow the default behavior as set by ``--hr-seek``, which by default
|
|
|
|
does imprecise seeks (like ``keyframes``).
|
|
|
|
exact
|
|
|
|
Always do exact/hr/precise seeks (slow).
|
|
|
|
keyframes
|
|
|
|
Always restart playback at keyframe boundaries (fast).
|
|
|
|
|
|
|
|
frame_step
|
2012-11-15 13:25:20 +00:00
|
|
|
Play one frame, then pause.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
core: add backstep support
Allows stepping back one frame via the frame_back_step inout command,
bound to "," by default.
This uses the precise seeking facility, and a perfect frame index built
on the fly. The index is built during playback and precise seeking, and
contains (as of this commit) the last 100 displayed or skipped frames.
This index is used to find the PTS of the previous frame, which is then
used as target for a precise seek. If no PTS is found, the core attempts
to do a seek before the current frame, and skip decoded frames until the
current frame is reached; this will create a sufficient index and the
normal backstep algorithm can be applied.
This can be rather slow. The worst case for backstepping is about the
same as the worst case for precise seeking if the previous frame can be
deduced from the index. If not, the worst case will be twice as slow.
There's also some minor danger that the index is incorrect in case
framedropping is involved. For framedropping due to --framedrop, this
problem is ignored (use of --framedrop is discouraged anyway). For
framedropping during precise seeking (done to make it faster), we try
to not add frames to the index that are produced when this can happen.
I'm not sure how well that works (or if the logic is sane), and it's
sure to break with some video filters. In the worst case, backstepping
might silently skip frames if you backstep after a user-initiated
precise seek. (Precise seeks to do indexing are not affected.)
Likewise, video filters that somehow change timing of frames and do not
do this in a deterministic way (i.e. if you seek to a position, frames
with different timings are produced than when the position is reached
during normal playback) will make backstepping silently jump to the
wrong frame. Enabling/disabling filters during playback (like for
example deinterlacing) will have similar bad effects.
2013-04-24 17:31:48 +00:00
|
|
|
frame_back_step
|
|
|
|
Go back by one frame, then pause. Note that this can be very slow (it tries
|
|
|
|
to be precise, not fast), and sometimes fails to behave as expected. How
|
|
|
|
well this works depends on whether precise seeking works correctly (e.g.
|
|
|
|
see the ``--hr-seek-demuxer-offset`` option). Video filters or other video
|
|
|
|
postprocessing that modifies timing of frames (e.g. deinterlacing) should
|
|
|
|
usually work, but might make backstepping silently behave incorrectly in
|
|
|
|
corner cases.
|
|
|
|
|
|
|
|
This doesn't work with audio-only playback.
|
|
|
|
|
2012-09-27 01:20:12 +00:00
|
|
|
set <property> "<value>"
|
|
|
|
Set the given property to the given value.
|
|
|
|
|
|
|
|
add <property> [<value>]
|
|
|
|
Add the given value to the property. On overflow or underflow, clamp the
|
|
|
|
property to the maximum. If <value> is omitted, assume ``1``.
|
|
|
|
|
2012-10-12 07:21:26 +00:00
|
|
|
cycle <property> [up|down]
|
|
|
|
Cycle the given property. ``up`` and ``down`` set the cycle direction. On
|
2012-09-27 01:20:12 +00:00
|
|
|
overflow, set the property back to the minimum, on underflow set it to the
|
2012-10-12 07:21:26 +00:00
|
|
|
maximum. If ``up`` or ``down`` is omitted, assume ``up``.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
speed_mult <value>
|
|
|
|
Multiply the ``speed`` property by the given value.
|
|
|
|
|
2012-10-21 10:33:18 +00:00
|
|
|
screenshot [subtitles|video|window|- [single|each-frame]]
|
2012-09-27 01:20:12 +00:00
|
|
|
Take a screenshot.
|
|
|
|
|
|
|
|
First argument:
|
|
|
|
|
2012-10-20 21:58:02 +00:00
|
|
|
<subtitles> (default)
|
|
|
|
Save the video image, in its original resolution, and with subtitles.
|
|
|
|
Some video outputs may still include the OSD in the output under certain
|
|
|
|
circumstances.
|
|
|
|
<video>
|
|
|
|
Like ``subtitles``, but typically without OSD or subtitles. The exact
|
|
|
|
behavior depends on the selected video output.
|
|
|
|
<window>
|
2012-10-21 10:33:18 +00:00
|
|
|
Save the contents of the mpv window. Typically scaled, with OSD and
|
2012-10-20 21:58:02 +00:00
|
|
|
subtitles. The exact behavior depends on the selected video output, and
|
|
|
|
if no support is available, this will act like ``video``.
|
|
|
|
|
|
|
|
Second argument:
|
|
|
|
|
2012-09-27 01:20:12 +00:00
|
|
|
<single> (default)
|
|
|
|
Take a single screenshot.
|
|
|
|
<each-frame>
|
|
|
|
Take a screenshot each frame. Issue this command again to stop taking
|
|
|
|
screenshots.
|
|
|
|
|
|
|
|
playlist_next [weak|force]
|
|
|
|
Go to the next entry on the playlist.
|
|
|
|
|
|
|
|
weak (default)
|
|
|
|
If the last file on the playlist is currently played, do nothing.
|
|
|
|
force
|
|
|
|
Terminate playback if there are no more files on the playlist.
|
|
|
|
|
|
|
|
playlist_prev [weak|force]
|
|
|
|
Go to the previous entry on the playlist.
|
|
|
|
|
|
|
|
weak (default)
|
|
|
|
If the first file on the playlist is currently played, do nothing.
|
|
|
|
force
|
|
|
|
Terminate playback if the first file is being played.
|
|
|
|
|
|
|
|
loadfile "<file>" [replace|append]
|
|
|
|
Load the given file and play it.
|
|
|
|
|
|
|
|
Second argument:
|
|
|
|
|
|
|
|
<replace> (default)
|
|
|
|
Stop playback of the current file, and play the new file immediately.
|
|
|
|
<append>
|
|
|
|
Append the file to the playlist.
|
|
|
|
|
|
|
|
loadlist "<playlist>" [replace|append]
|
|
|
|
Load the given playlist file (like ``--playlist``).
|
|
|
|
|
|
|
|
playlist_clear
|
|
|
|
Clear the playlist, except the currently played file.
|
|
|
|
|
|
|
|
run "<command>"
|
|
|
|
Run the given command with ``/bin/sh -c``. The string is expanded like in
|
2013-06-08 16:04:36 +00:00
|
|
|
property_expansion_.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
quit [<code>]
|
|
|
|
Exit the player using the given exit code.
|
|
|
|
|
core: add playback resume feature (manual/opt-in)
A "watch later" command is now mapped to Shift+Q. This quits the player
and stores the playback state in a config file in ~/.mpv/watch_later/.
When calling the player with the same file again, playback is resumed
at that time position.
It's also possible to make mpv save playback state always on quit with
the --save-position-on-quit option. Likewise, resuming can be disabled
with the --no-resume-playback option.
This also attempts to save some playback parameters, like fullscreen
state or track selection. This will unconditionally override config
settings and command line options (which is probably not what you would
expect, but in general nobody will really care about this). Some things
are not backed up, because that would cause various problems. Additional
subtitle files, video filters, etc. are not stored because that would be
too hard and fragile. Volume/mute state are not stored because it would
mess up if the system mixer is used, or if the system mixer was
readjusted in the meantime.
Basically, the tradeoff between perfect state restoration and
complexity/fragility makes it not worth to attempt to implement
it perfectly, even if the result is a little bit inconsistent.
2013-05-05 17:37:29 +00:00
|
|
|
quit_watch_later
|
|
|
|
Exit player, and store current playback position. Playing that file later
|
|
|
|
will seek to the previous position on start.
|
|
|
|
|
2012-11-15 19:26:52 +00:00
|
|
|
sub_add "<file>"
|
2012-09-27 01:20:12 +00:00
|
|
|
Load the given subtitle file. It's not selected as current subtitle after
|
|
|
|
loading.
|
|
|
|
|
2012-11-15 19:26:52 +00:00
|
|
|
sub_remove [<id>]
|
|
|
|
Remove the given subtitle track. If the ``id`` argument is missing, remove
|
|
|
|
the current track. (Works on external subtitle files only.)
|
|
|
|
|
|
|
|
sub_reload [<id>]
|
|
|
|
Reload the given subtitle tracks. If the ``id`` argument is missing, remove
|
|
|
|
the current track. (Works on external subtitle files only.)
|
|
|
|
|
|
|
|
This works by unloading and re-adding the subtitle track.
|
|
|
|
|
2012-09-27 01:20:12 +00:00
|
|
|
sub_step <skip>
|
|
|
|
Change subtitle timing such, that the subtitle event after the next <skip>
|
|
|
|
subtitle events is displayed. <skip> can be negative to step back.
|
|
|
|
|
|
|
|
osd [<level>]
|
|
|
|
Toggle OSD level. If <level> is specified, set the OSD mode
|
|
|
|
(see ``--osd-level`` for valid values).
|
|
|
|
|
2012-10-11 00:24:13 +00:00
|
|
|
print_text "<string>"
|
2013-06-08 16:04:36 +00:00
|
|
|
Print text to stdout. The string can contain properties (see
|
|
|
|
property_expansion_).
|
2012-10-11 00:24:13 +00:00
|
|
|
|
2012-10-21 10:33:18 +00:00
|
|
|
show_text "<string>" [<duration>|- [<level>]]
|
2012-09-27 01:20:12 +00:00
|
|
|
Show text on the OSD. The string can contain properties, which are expanded
|
2013-06-08 16:04:36 +00:00
|
|
|
as described in property_expansion_. This can be used to show playback
|
|
|
|
time, filename, and so on.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
<duration> is the time in ms to show the message. By default, it uses the
|
|
|
|
same value as ``--osd-duration``.
|
|
|
|
|
|
|
|
<level> is the minimum OSD level to show the text (see ``--osd-level``).
|
|
|
|
|
|
|
|
show_progress
|
|
|
|
Show the progress bar, the elapsed time and the total duration of the file
|
|
|
|
on the OSD.
|
|
|
|
|
2013-05-18 09:29:52 +00:00
|
|
|
Input commands that are possibly subject to change
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
af_switch "filter1=params,filter2,..."
|
|
|
|
Replace the current filter chain with the given list.
|
|
|
|
|
|
|
|
af_add "filter1=params,filter2,..."
|
|
|
|
Add the given list of audio filters to the audio filter chain.
|
|
|
|
|
|
|
|
af_del "filter1,filter2,..."
|
|
|
|
Remove the given list of audio filters.
|
|
|
|
|
|
|
|
af_clr
|
|
|
|
Remove all audio filters. (Conversion filters will be re-added
|
|
|
|
automatically if needed.)
|
2012-09-27 01:20:12 +00:00
|
|
|
|
2013-05-18 09:44:17 +00:00
|
|
|
vf set|add|toggle|del "filter1=params,filter2,..."
|
|
|
|
Change video filter chain.
|
|
|
|
|
|
|
|
The first argument decides what happens:
|
|
|
|
|
|
|
|
set
|
|
|
|
Overwrite the previous filter chain with the new one.
|
|
|
|
|
|
|
|
add
|
|
|
|
Append the new filter chain to the previous one.
|
|
|
|
|
|
|
|
toggle
|
|
|
|
Check if the given filter (with the exact parameters) is already
|
|
|
|
in the video chain. If yes, remove the filter. If no, add the filter.
|
|
|
|
(If several filters are passed to the command, this is done for
|
|
|
|
each filter.)
|
|
|
|
|
|
|
|
del
|
|
|
|
Remove the given filters from the video chain. Unlike in the other
|
|
|
|
cases, the second parameter is a comma separated list of filter names
|
|
|
|
or integer indexes. ``0`` would denote the first filter. Negative
|
|
|
|
indexes start from the last filter, and ``-1`` denotes the last
|
|
|
|
filter.
|
|
|
|
|
2013-05-22 21:19:57 +00:00
|
|
|
You can assign labels to filter by prefixing them with ``@name:`` (where
|
|
|
|
``name`` is a user-chosen arbitrary identifiers). Labels can be used to
|
|
|
|
refer to filters by name in all of the filter chain modification commands.
|
|
|
|
For ``add``, using an already used label will replace the existing filter.
|
|
|
|
|
2013-05-18 09:44:17 +00:00
|
|
|
*EXAMPLE for input.conf*:
|
|
|
|
|
|
|
|
- ``a vf set flip`` turn video upside-down on the ``a`` key
|
|
|
|
- ``b vf set ""`` remove all video filters on ``b``
|
|
|
|
- ``c vf toggle lavfi=gradfun`` toggle debanding on ``c``
|
|
|
|
|
2012-11-15 13:25:20 +00:00
|
|
|
Undocumented commands: tv_start_scan, tv_step_channel, tv_step_norm,
|
2012-09-27 01:20:12 +00:00
|
|
|
tv_step_chanlist, tv_set_channel, tv_last_channel, tv_set_freq, tv_step_freq,
|
|
|
|
tv_set_norm, dvb_set_channel, radio_step_channel, radio_set_channel,
|
|
|
|
radio_set_freq, radio_step_freq (all of these should be replaced by properties),
|
2013-05-18 09:29:52 +00:00
|
|
|
stop (questionable use), get_property (?), af_cmdline, vo_cmdline (experimental).
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
Input command prefixes
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
osd-auto (default)
|
|
|
|
Use the default behavior for this command.
|
|
|
|
no-osd
|
|
|
|
Do not use any OSD for this command.
|
|
|
|
osd-bar
|
|
|
|
If possible, show a bar with this command. Seek commands will show the
|
|
|
|
progress bar, property changing commands may show the newly set value.
|
|
|
|
osd-msg
|
2012-10-23 23:06:00 +00:00
|
|
|
If possible, show an OSD message with this command. Seek command show
|
|
|
|
the current playback time, property changing commands show the newly set
|
|
|
|
value as text.
|
2012-09-27 01:20:12 +00:00
|
|
|
osd-msg-bar
|
|
|
|
Combine osd-bar and osd-msg.
|
2013-05-18 10:56:22 +00:00
|
|
|
raw
|
|
|
|
Don't expand properties in string arguments. (Like ``"${property-name}"``.)
|
|
|
|
expand-properties (default)
|
2013-06-08 16:04:36 +00:00
|
|
|
All string arguments are expanded as described in property_expansion_.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
|
2013-05-18 10:56:22 +00:00
|
|
|
All of the osd prefixes are still overridden by the global ``--osd-level``
|
|
|
|
settings.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
Undocumented prefixes: pausing, pausing_keep, pausing_toggle,
|
|
|
|
pausing_keep_force. (Should these be made official?)
|
|
|
|
|
|
|
|
Properties
|
|
|
|
----------
|
|
|
|
|
2012-10-21 10:33:18 +00:00
|
|
|
Properties are used to set mpv options during runtime, or to query arbitrary
|
2012-09-27 01:20:12 +00:00
|
|
|
information. They can be manipulated with the ``set``/``add``/``cycle``
|
|
|
|
commands, and retrieved with ``show_text``, or anything else that uses property
|
2013-06-08 16:04:36 +00:00
|
|
|
expansion. (See property_expansion_.)
|
2012-09-27 01:20:12 +00:00
|
|
|
|
2013-06-08 16:04:36 +00:00
|
|
|
The ``W`` column indicates whether the property is generally writeable. If an
|
|
|
|
option is referenced, the property should take/return exactly the same values
|
|
|
|
as the option.
|
2012-09-27 01:20:12 +00:00
|
|
|
|
|
|
|
=========================== = ==================================================
|
|
|
|
Name W Comment
|
|
|
|
=========================== = ==================================================
|
|
|
|
osd-level x see ``--osd-level``
|
2013-05-14 12:10:27 +00:00
|
|
|
osd-scale x osd font size multiplicator, see ``--osd-scale``
|
2012-09-27 01:20:12 +00:00
|
|
|
loop x see ``--loop``
|
|
|
|
speed x see ``--speed``
|
|
|
|
filename currently played file (path stripped)
|
|
|
|
path currently played file (full path)
|
2012-10-13 15:09:35 +00:00
|
|
|
media-title filename or libquvi QUVIPROP_PAGETITLE
|
2012-09-27 01:20:12 +00:00
|
|
|
demuxer
|
2012-10-13 15:09:35 +00:00
|
|
|
stream-path filename (full path) of stream layer filename
|
2012-09-27 01:20:12 +00:00
|
|
|
stream-pos x byte position in source stream
|
|
|
|
stream-start start byte offset in source stream
|
|
|
|
stream-end end position in bytes in source stream
|
|
|
|
stream-length length in bytes (${stream-end} - ${stream-start})
|
|
|
|
stream-time-pos x time position in source stream (also see time-pos)
|
|
|
|
length length of the current file in seconds
|
2012-11-16 19:10:05 +00:00
|
|
|
avsync last A/V synchronization difference
|
2012-09-27 01:20:12 +00:00
|
|
|
percent-pos x position in current file (0-100)
|
|
|
|
time-pos x position in current file in seconds
|
2013-05-10 13:20:40 +00:00
|
|
|
time-remaining estimated remaining length of the file in seconds
|
2012-09-27 01:20:12 +00:00
|
|
|
chapter x current chapter number
|
|
|
|
edition x current MKV edition number
|
|
|
|
titles number of DVD titles
|
|
|
|
chapters number of chapters
|
|
|
|
editions number of MKV editions
|
2012-10-23 23:06:00 +00:00
|
|
|
angle x current DVD angle
|
2012-09-27 01:20:12 +00:00
|
|
|
metadata metadata key/value pairs
|
2012-11-15 13:25:20 +00:00
|
|
|
metadata/<key> value of metadata entry <key>
|
2012-09-27 01:20:12 +00:00
|
|
|
pause x pause status (bool)
|
2013-02-17 19:24:59 +00:00
|
|
|
cache network cache fill state (0-100)
|
2012-09-27 01:20:12 +00:00
|
|
|
pts-association-mode x see ``--pts-association-mode``
|
|
|
|
hr-seek x see ``--hr-seek``
|
|
|
|
volume x current volume (0-100)
|
|
|
|
mute x current mute status (bool)
|
|
|
|
audio-delay x see ``--audio-delay``
|
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 14:15:19 +00:00
|
|
|
audio-format audio format (string)
|
2012-09-27 01:20:12 +00:00
|
|
|
audio-codec audio codec selected for decoding
|
|
|
|
audio-bitrate audio bitrate
|
|
|
|
samplerate audio samplerate
|
|
|
|
channels number of audio channels
|
2013-06-08 16:04:36 +00:00
|
|
|
aid x current audio track (similar to ``--aid``)
|
|
|
|
audio x alias for ``aid``
|
2012-09-27 01:20:12 +00:00
|
|
|
balance x audio channel balance
|
|
|
|
fullscreen x see ``--fullscreen``
|
|
|
|
deinterlace x deinterlacing, if available (bool)
|
|
|
|
colormatrix x see ``--colormatrix``
|
|
|
|
colormatrix-input-range x see ``--colormatrix-input-range``
|
|
|
|
colormatrix-output-range x see ``--colormatrix-output-range``
|
|
|
|
ontop x see ``--ontop``
|
|
|
|
border x see ``--border``
|
|
|
|
framedrop x see ``--framedrop``
|
|
|
|
gamma x see ``--gamma``
|
|
|
|
brightness x see ``--brightness``
|
|
|
|
contrast x see ``--contrast``
|
|
|
|
saturation x see ``--saturation``
|
|
|
|
hue x see ``--hue``
|
|
|
|
panscan x see ``--panscan``
|
core: redo how codecs are mapped, remove codecs.conf
Use codec names instead of FourCCs to identify codecs. Rewrite how
codecs are selected and initialized. Now each decoder exports a list
of decoders (and the codec it supports) via add_decoders(). The order
matters, and the first decoder for a given decoder is preferred over
the other decoders. E.g. all ad_mpg123 decoders are preferred over
ad_lavc, because it comes first in the mpcodecs_ad_drivers array.
Likewise, decoders within ad_lavc that are enumerated first by
libavcodec (using av_codec_next()) are preferred. (This is actually
critical to select h264 software decoding by default instead of vdpau.
libavcodec and ffmpeg/avconv use the same method to select decoders by
default, so we hope this is sane.)
The codec names follow libavcodec's codec names as defined by
AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders
have names different from the canonical codec name. The AVCodecDescriptor
API is relatively new, so we need a compatibility layer for older
libavcodec versions for codec names that are referenced internally,
and which are different from the decoder name. (Add a configure check
for that, because checking versions is getting way too messy.)
demux/codec_tags.c is generated from the former codecs.conf (minus
"special" decoders like vdpau, and excluding the mappings that are the
same as the mappings libavformat's exported RIFF tables). It contains
all the mappings from FourCCs to codec name. This is needed for
demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the
codec as determined by libavformat, while the other demuxers have to do
this on their own, using the mp_set_audio/video_codec_from_tag()
functions. Note that the sh_audio/video->format members don't uniquely
identify the codec anymore, and sh->codec takes over this role.
Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which
provide cover the functionality of the removed switched.
Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure
container/video combinations (e.g. the sample Film_200_zygo_pro.mov)
are played flipped. ffplay/avplay doesn't handle this properly either,
so we don't care and blame ffmeg/libav instead.
2013-02-09 14:15:19 +00:00
|
|
|
video-format video format (string)
|
2012-09-27 01:20:12 +00:00
|
|
|
video-codec video codec selected for decoding
|
|
|
|
video-bitrate video bitrate
|
2013-03-25 20:25:11 +00:00
|
|
|
width video width (container or decoded size)
|
2012-09-27 01:20:12 +00:00
|
|
|
height video height
|
2013-03-25 20:25:11 +00:00
|
|
|
fps container FPS (may contain bogus values)
|
|
|
|
dwidth video width (after filters and aspect scaling)
|
|
|
|
dheight video height
|
2012-09-27 01:20:12 +00:00
|
|
|
aspect x video aspect
|
2013-06-08 16:04:36 +00:00
|
|
|
vid x current video track (similar to ``--vid``)
|
|
|
|
video x alias for ``vid``
|
2012-09-27 01:20:12 +00:00
|
|
|
program x switch TS program (write-only)
|
2013-06-08 16:04:36 +00:00
|
|
|
sid x current subtitle track (similar to ``--sid``)
|
|
|
|
sub x alias for ``sid``
|
2012-09-27 01:20:12 +00:00
|
|
|
sub-delay x see ``--sub-delay``
|
|
|
|
sub-pos x see ``--sub-pos``
|
|
|
|
sub-visibility x whether current subtitle is rendered
|
|
|
|
sub-forced-only x see ``--sub-forced-only``
|
|
|
|
sub-scale x subtitle font size multiplicator
|
|
|
|
ass-use-margins x see ``--ass-use-margins``
|
|
|
|
ass-vsfilter-aspect-compat x see ``--ass-vsfilter-aspect-compat``
|
2012-10-11 00:23:29 +00:00
|
|
|
ass-style-override x see ``--ass-style-override``
|
2013-05-11 20:19:33 +00:00
|
|
|
stream-capture x a filename, see ``--capture``
|
2012-10-23 23:06:00 +00:00
|
|
|
tv-brightness x
|
|
|
|
tv-contrast x
|
|
|
|
tv-saturation x
|
|
|
|
tv-hue x
|
2013-05-15 00:17:47 +00:00
|
|
|
track-list list of audio/video/sub tracks, cur. entr. marked
|
|
|
|
chapter-list list of chapters, current entry marked
|
|
|
|
playlist playlist, current entry marked
|
2012-09-27 01:20:12 +00:00
|
|
|
=========================== = ==================================================
|
2013-06-08 16:04:36 +00:00
|
|
|
|
|
|
|
.. _property_expansion:
|
|
|
|
|
|
|
|
Property expansion
|
|
|
|
------------------
|
|
|
|
|
|
|
|
All string arguments to input commands as well as certain options (like
|
|
|
|
``--playing-msg``) are subject to property expansion.
|
|
|
|
|
|
|
|
*EXAMPLE for input.conf*:
|
|
|
|
|
|
|
|
- ``i show_text "Filename: ${filename}"`` shows the filename of the current file
|
|
|
|
when pressing the ``i`` key
|
|
|
|
|
|
|
|
Within ``input.conf``, property expansion can be inhibited by putting the
|
|
|
|
``raw`` prefix in front of commands.
|
|
|
|
|
|
|
|
The following expansions are supported:
|
|
|
|
|
|
|
|
\${NAME}
|
|
|
|
Expands to the value of the property ``NAME``. If retrieving the property
|
|
|
|
fails, expand to an error string. (Use ``${NAME:}`` with a trailing
|
|
|
|
``:`` to expand to an empty string instead.)
|
|
|
|
If ``NAME`` is prefixed with ``=``, expand to the raw value of the property
|
|
|
|
(see below).
|
|
|
|
\${NAME:STR}
|
|
|
|
Expands to the value of the property ``NAME``, or ``STR`` if the
|
|
|
|
property can't be retrieved. ``STR`` is expanded recursively.
|
|
|
|
\${!NAME:STR}
|
|
|
|
Expands to ``STR`` (recursively) if the property ``NAME`` can't be
|
|
|
|
retrieved.
|
|
|
|
\${?NAME:STR}
|
|
|
|
Expands to ``STR`` (recursively) if the property ``NAME`` is available.
|
|
|
|
\$\$
|
|
|
|
Expands to ``$``.
|
|
|
|
\$}
|
|
|
|
Expands to ``}``. (To produce this character inside recursive
|
|
|
|
expansion.)
|
|
|
|
\$>
|
|
|
|
Disable property expansion and special handling of ``$`` for the rest
|
|
|
|
of the string.
|
|
|
|
|
|
|
|
In places where property expansion is allowed, C-style escapes are often
|
|
|
|
accepted as well. Example:
|
|
|
|
|
|
|
|
- ``\n`` becomes a newline character
|
|
|
|
- ``\\`` expands to ``\``
|
|
|
|
|
|
|
|
Raw and formatted properties
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
Normally, properties are formatted as human readable text, meant to be
|
|
|
|
displayed on OSD or on the terminal. It is possible to retrieve an unformatted
|
|
|
|
(raw) value from a property by prefixing its name with ``=``. These raw values
|
|
|
|
can be parsed by scripts, and follow the same conventions as the options
|
|
|
|
associated with the properties.
|
|
|
|
|
|
|
|
*EXAMPLE*:
|
|
|
|
|
|
|
|
- ``${time-pos}`` expands to ``00:14:23`` (if playback position is at 15 minutes
|
|
|
|
32 seconds)
|
|
|
|
- ``${=time-pos}`` expands to ``863.4`` (same time, plus 400 milliseconds -
|
|
|
|
milliseconds are normally not shown in the formatted case)
|
|
|
|
|
|
|
|
Sometimes, the difference in amount of information carried by raw and formatted
|
|
|
|
property values can be rather big. In some cases, raw values have more
|
|
|
|
information, like higher precision than seconds with ``time-pos``. Sometimes
|
|
|
|
it's the other way around, e.g. ``aid`` shows track title and language in the
|
|
|
|
formatted case, but only the track number if it's raw.
|