From 6f1486b397d632feaa71f88b980491aea7b69256 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 17 Sep 2012 08:38:19 +0200 Subject: commands: replace --hardframedrop, change framedropping property Replace --hardframedrop with --framedrop=hard. Rename the framedrop property from "framedropping" to "framedrop" for the sake of making command line options have the same name as their corresponding property. Change the property to accept choice values instead of numeric values. Remove unused/forgotten auto_quality variable. --- DOCS/man/en/changes.rst | 3 ++- DOCS/man/en/options.rst | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index c4fc3a0812..ee66c5048a 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -87,7 +87,7 @@ Command line switches ``-no-opt``, or better ``--no-opt``. * Per-file options are not the default anymore. You can explicitly specify file local options. See ``Usage`` section. -* Table of renamed switches: +* Table of renamed/replaced switches: =================================== =================================== Old New @@ -95,6 +95,7 @@ Command line switches -nosound --no-audio -use-filename-title --title="${filename}" -loop 0 --loop=inf + -hardframedrop --framedrop=hard =================================== =================================== input.conf and slave commands diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 431ff1a7de..59ce49a308 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -643,11 +643,14 @@ --fps= Override video framerate. Useful if the original value is wrong or missing. ---framedrop +--framedrop= Skip displaying some frames to maintain A/V sync on slow systems. Video filters are not applied to such frames. For B-frames even decoding is - skipped completely. May produce unwatchably choppy output. See also - ``--hardframedrop``. + skipped completely. May produce unwatchably choppy output. With ``hard``, + decoding and output of any frame can be skipped, and will lead to an even + worse playback experience. + + Practical use of this feature is questionable. Disabled by default. --frames= Play/convert only first frames, then quit. @@ -753,9 +756,6 @@ ``--no-grabpointer`` tells the player to not grab the mouse pointer after a video mode change (``--vm``). Useful for multihead setups. ---hardframedrop - More intense frame dropping (breaks decoding). Leads to image distortion! - --heartbeat-cmd Command that is executed every 30 seconds during playback via *system()* - i.e. using the shell. -- cgit v1.2.3 From 10437c35df5d3944625fa6cee05e565b0791fe15 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 17 Sep 2012 08:45:35 +0200 Subject: commands: rename "osdlevel" option and property, make it a choice Rename both the option and property to "osd-level", which fits a bit better with the general naming scheme. Make it a choice instead of an integer range. I failed to come up with good names for the various levels, so leave them as-is. Remove the useless property handler for the "loop" property too. --- DOCS/man/en/changes.rst | 1 + DOCS/man/en/options.rst | 2 +- DOCS/man/en/vo.rst | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index ee66c5048a..ec08c7eac2 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -96,6 +96,7 @@ Command line switches -use-filename-title --title="${filename}" -loop 0 --loop=inf -hardframedrop --framedrop=hard + -osdlevel --osd-level =================================== =================================== input.conf and slave commands diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 59ce49a308..70b791c1ba 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1294,7 +1294,7 @@ --osd-fractions Show OSD times with fractions of seconds. ---osdlevel=<0-3> +--osd-level=<0-3> Specifies which mode the OSD should start in. :0: subtitles only diff --git a/DOCS/man/en/vo.rst b/DOCS/man/en/vo.rst index 0ba7fe8b9f..c6d80866a6 100644 --- a/DOCS/man/en/vo.rst +++ b/DOCS/man/en/vo.rst @@ -411,7 +411,7 @@ gl (no-)osd Enable or disable support for OSD rendering via OpenGL (default: enabled). This option is for testing; to disable the OSD use - ``--osdlevel=0`` instead. + ``--osd-level=0`` instead. backend= auto -- cgit v1.2.3 From 1a5a7a49293c2c70a5caf9d51dad7bd5aa938471 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 18 Sep 2012 15:50:24 +0200 Subject: options: accept "yes" and "no" only for flags This removes the alternative values like "off", "0", "false" etc., and also the non-English versions of these. This is done for general consistency. It's better to have a single way of doing things when multiple ways don't add singificant value. Also update some choices for consistency. --- DOCS/man/en/options.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 70b791c1ba..da7ed79e03 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -87,8 +87,8 @@ :``--afm=ffmpeg``: Try FFmpeg's libavcodec codecs first. :``--afm=acm,dshow``: Try Win32 codecs first. ---aid= - Select audio channel. ``auto`` selects the default, ``off`` disables audio. +--aid= + Select audio channel. ``auto`` selects the default, ``no`` disables audio. See also ``--alang``. --alang= @@ -789,7 +789,7 @@ backwards since it has to rewind to the beginning to find an exact frame position. ---hr-seek= +--hr-seek= Select when to use precise seeks that are not limited to keyframes. Such seeks require decoding video from the previous keyframe up to the target position and so can take some time depending on decoding performance. For @@ -797,11 +797,11 @@ default choice to use for seeks; it's possible to explicitly override that default in the definition of key bindings and in slave mode commands. - :off: Never use precise seeks. + :no: Never use precise seeks. :absolute: Use precise seeks if the seek is to an absolute position in the file, such as a chapter seek, but not for relative seeks like the default behavior of arrow keys (default). - :always: Use precise seeks whenever possible. + :yes: Use precise seeks whenever possible. --hr-seek-demuxer-offset= This option exists to work around failures to do precise seeks (as in @@ -1139,8 +1139,8 @@ *NOTE*: This option is obsolete now that MPlayer has OpenDML support. ---loop= - Loops playback times. ``inf`` means forever and ``off`` disables +--loop= + Loops playback times. ``inf`` means forever and ``no`` disables looping. --mc= @@ -1694,9 +1694,9 @@ --shuffle Play files in random order. ---sid= +--sid= Display the subtitle stream specified by (0-31). ``auto`` selects the - default, ``off`` disables subtitles. + default, ``no`` disables subtitles. See also ``--slang``, ``--vobsubid``, ``--no-sub``. --slang= @@ -2256,8 +2256,8 @@ :``--vfm=xanim``: Try XAnim codecs first. ---vid= - Select video channel. ``auto`` selects the default, ``off`` disables video. +--vid= + Select video channel. ``auto`` selects the default, ``no`` disables video. --vm Try to change to a different video mode. Supported by the x11 and xv video -- cgit v1.2.3 From dec53f760e12254e4baa4f7cee59010b3b10b6be Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 18 Sep 2012 20:07:24 +0200 Subject: commands: add more property-option bridge uses, rename some options Make more properties use the property-to-option bridge to reduce code size and to enforce consistency. Some options are renamed to the same as the properties (the property names are better in all cases). Do some other minor cleanups. One bigger issue was memory management of strings: M_PROPERTY_TO_STRING assumed the strings were statically allocated, and no dynamic allocations could be returned. Fix this in case the need for such properties arises in the future. Get rid of m_property_string_ro(), because it's not always clear that the "action" parameter is M_PROPERTY_SET and the string argument will be used. --- DOCS/man/en/changes.rst | 4 ++++ DOCS/man/en/options.rst | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index ec08c7eac2..11b7242d1a 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -97,6 +97,10 @@ Command line switches -loop 0 --loop=inf -hardframedrop --framedrop=hard -osdlevel --osd-level + -delay --audio-delay + -subdelay --sub-delay + -subpos --sub-pos + -forcedsubsonly --sub-forced-only =================================== =================================== input.conf and slave commands diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index da7ed79e03..342626d5d2 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -472,7 +472,7 @@ will stay hidden. Supported by video output drivers which use X11 or OS X Cocoa. ---delay= +--audio-delay= audio delay in seconds (positive or negative float value). Negative values delay the audio, and positive values delay the video. @@ -624,7 +624,7 @@ there is a change in video parameters, video stream or file. This used to be the default behavior. Currently only affects X11 VOs. ---forcedsubsonly +--sub-forced-only Display only forced subtitles for the DVD subtitle stream selected by e.g. ``--slang``. @@ -659,6 +659,7 @@ Specifies the character set that will be passed to FriBiDi when decoding non-UTF-8 subtitles (default: ISO8859-8). +--fullscreen --fs Fullscreen playback (centers movie, and paints black bands around it). @@ -1312,9 +1313,6 @@ controls how much of the image is cropped. May not work with all video output drivers. - *NOTE*: Values between -1 and 0 are allowed as well, but highly - experimental and may crash or worse. Use at your own risk! - --panscanrange=<-19.0-99.0> (experimental) Change the range of the pan-and-scan functionality (default: 1). Positive @@ -1894,7 +1892,7 @@ - ``--subcp=enca:pl:cp1250`` guess the encoding for Polish, fall back on cp1250. ---subdelay= +--sub-delay= Delays subtitles by seconds. Can be negative. --subfile= @@ -1941,7 +1939,7 @@ *NOTE*: > movie fps speeds the subtitles up for frame-based subtitle files and slows them down for time-based ones. ---subpos=<0-100> +--sub-pos=<0-100> Specify the position of subtitles on the screen. The value is the vertical position of the subtitle in % of the screen height. Can be useful with ``--vf=expand``. -- cgit v1.2.3 From 65074ec1f074d22101b4c8bd95eb4a0354401246 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 27 Sep 2012 03:20:12 +0200 Subject: manpage: document input.conf related things This directly corresponds to DOCS/OUTDATED-tech/slave.txt. Changes from the recent commits are included too. --- DOCS/man/en/changes.rst | 45 +++++-- DOCS/man/en/input.rst | 303 ++++++++++++++++++++++++++++++++++++++++++++++++ DOCS/man/en/mplayer.rst | 2 + DOCS/man/en/options.rst | 34 ++++-- 4 files changed, 367 insertions(+), 17 deletions(-) create mode 100644 DOCS/man/en/input.rst (limited to 'DOCS') diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index 11b7242d1a..de56621278 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -106,15 +106,42 @@ Command line switches input.conf and slave commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* Table of renamed slave commands: - - =================================== =================================== - Old New - =================================== =================================== - pt_step 1 b playlist_next b - pt_step -1 b playlist_prev b - pt_clear playlist_clear - =================================== =================================== +* Table of renamed input commands: + + This lists only commands that are not always gracefully handled by the + internal legacy translation layer. If an input.conf contains any legacy + commands, they will be displayed with ``-v`` when it is loaded, and show + and the replacement commands. + + Properties containing ``_`` to separate words use ``-`` instead. + + +--------------------------------+----------------------------------------+ + | Old | New | + +================================+========================================+ + | pt_step 1 [0|1] | playlist_next [weak|force] | + | | (translation layer can't deal with | + | | whitespace) | + +--------------------------------+----------------------------------------+ + | pt_step -1 [0|1] | playlist_prev [weak|force] (same) | + +--------------------------------+----------------------------------------+ + | switch_ratio [] | set aspect | + | | set aspect 0 (to reset aspect) | + +--------------------------------+----------------------------------------+ + | step_property_osd | cycle (wraps), | + | | add (clamps). | + | | parameter unsupported. Use | + | | a negative step instead. | + +--------------------------------+----------------------------------------+ + | step_property | Prefix cycle or add with no-osd: | + | | no-osd cycle | + +--------------------------------+----------------------------------------+ + | osd_show_property_text | show_text | + | | The property expansion format string | + | | syntax slightly changed. | + +--------------------------------+----------------------------------------+ + | osd_show_text | Now does the same as | + | | osd_show_property_text. | + +--------------------------------+----------------------------------------+ Other ~~~~~ diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst new file mode 100644 index 0000000000..ab392a5696 --- /dev/null +++ b/DOCS/man/en/input.rst @@ -0,0 +1,303 @@ +.. _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 + +| **mplayer** --input=keylist + +In general, keys can be combined with ``Shift``, ``Ctrl`` and ``Alt``: + +| ctrl+q quit + +General input command syntax +---------------------------- + +`[Shift+][Ctrl+][Alt+][Meta+] [] ()*` + +Newlines always start a new binding. ``#`` starts a comment (outside of quoted +string arguments). To bind commands to the ``#`` key, ``SHARP`` can be used. + + 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 + ``--input=default-bindings=no``. + +seek [relative|absolute|absolute-percent] [default-precise|exact|keyframes] + 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 + Seek to agiven percent position. + + 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 + Basically seek forward by one frame. Actually this plays one frame, then + pauses again. + +set "" + Set the given property to the given value. + +add [] + Add the given value to the property. On overflow or underflow, clamp the + property to the maximum. If is omitted, assume ``1``. + +cycle [] + Cycle the given property. Negative values cycle the property backwards. On + overflow, set the property back to the minimum, on underflow set it to the + maximum. If is omitted, assume ``1``. + +speed_mult + Multiply the ``speed`` property by the given value. + +screenshot [single|each-frame] [video|window] + Take a screenshot. + + First argument: + + (default) + Take a single screenshot. + + Take a screenshot each frame. Issue this command again to stop taking + screenshots. + + Second argument: + +