From 3b2cc79d2f42eefebf4390ccf722e1bb02d6f734 Mon Sep 17 00:00:00 2001 From: robin007bond Date: Mon, 13 Apr 2015 14:51:03 +0200 Subject: DOCS/contribute.md: Add guideline for pull requests This commit is to prevent changes being merged into upstream, without being known if it is tested or not. Signed-off-by: wm4 --- DOCS/contribute.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'DOCS') diff --git a/DOCS/contribute.md b/DOCS/contribute.md index 224c52494c..11b5e33d50 100644 --- a/DOCS/contribute.md +++ b/DOCS/contribute.md @@ -14,6 +14,9 @@ Sending patches ``git format-patch``. diffs posted as pastebins (especially if the http link returns HTML) just cause extra work for everyone, because they lack commit message and authorship information. +- When creating pull requests, be sure to test your changes. If you didn't, please + say so in the pull request message. + - Write informative commit messages. Use present tense to describe the situation with the patch applied, and past tense for the situation before the change. -- cgit v1.2.3 From 77c96f111c3b9471bdbf19769049dadf348a14a8 Mon Sep 17 00:00:00 2001 From: Martin Herkt Date: Mon, 13 Apr 2015 18:30:11 +0200 Subject: man/options: make --audio-display easier to find MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I tried to find that option by searching for terms like “cover art” and got nothing. I imagine most users would look for similar terms. Hope this helps. --- DOCS/man/options.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index b380db9ffb..bca089c61b 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -983,8 +983,9 @@ Audio ``--audio-display=`` Setting this option to ``attachment`` (default) will display image - attachments when playing audio files. It will display the first image - found, and additional images are available as video tracks. + attachments (e.g. album cover art) when playing audio files. It will + display the first image found, and additional images are available as + video tracks. Setting this option to ``no`` disables display of video entirely when playing audio files. -- cgit v1.2.3 From d704d61c61ad3f3660d579a830704e6f2396ad6e Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Apr 2015 14:29:05 +0200 Subject: vo_opengl: change dwmflush option values Use a choice instead of an integer. This is incompatible, but I'm not adding any compatibility since this option was added recently. --- DOCS/man/vo.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index 2447a8c455..4ac1dd8740 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -548,10 +548,11 @@ Available video output drivers are: X11/GLX only. - ``dwmflush`` - Calls ``DwmFlush`` after swapping buffers on Windows (default: 0). + ``dwmflush=`` + Calls ``DwmFlush`` after swapping buffers on Windows (default: no). It also sets ``SwapInterval(0)`` to ignore the OpenGL timing. Values - are: 0 (disabled), 1 (only in windowed mode), 2 (also in full screen). + are: no (disabled), windowed (only in windowed mode), yes (also in + full screen). This may help getting more consistent frame intervals, especially with high-fps clips - which might also reduce dropped frames. Typically a value of 1 should be enough since full screen may bypass the DWM. -- cgit v1.2.3 From 7d40a33ed9a707d1e6dcfa70ff96bd09f23a82be Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Apr 2015 21:18:36 +0200 Subject: mapage: update --hwdec=vaapi description again Supposedly this is not an issue anymore after we've changed the code to use texture-from-pixmap. --- DOCS/man/options.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index bca089c61b..31461817a9 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -566,8 +566,7 @@ Video The ``vaapi-copy`` mode allows you to use vaapi with any VO. Because this copies the decoded video back to system RAM, it's likely less efficient - than the ``vaapi`` mode. But there are reports that this is actually faster - as well, and avoids many issues with ``vaapi``. + than the ``vaapi`` mode. .. note:: -- cgit v1.2.3 From e1e46cc81afcf75fbf3533215fe847c55927d0e5 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Wed, 15 Apr 2015 03:50:00 -0700 Subject: manpage: remove extra newline at end of af.rst --- DOCS/man/af.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'DOCS') diff --git a/DOCS/man/af.rst b/DOCS/man/af.rst index 1ae3c092df..2d227faad7 100644 --- a/DOCS/man/af.rst +++ b/DOCS/man/af.rst @@ -629,4 +629,3 @@ Available filters are: ``o=`` AVOptions. - -- cgit v1.2.3 From 3f8b8b8c0c6781771f83a726a389dc4b784b70ce Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Wed, 15 Apr 2015 03:48:05 -0700 Subject: manpage: clarify --af=format --- DOCS/man/af.rst | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/af.rst b/DOCS/man/af.rst index 2d227faad7..96e50686ae 100644 --- a/DOCS/man/af.rst +++ b/DOCS/man/af.rst @@ -225,14 +225,21 @@ Available filters are: automatically up- and downmix standard channel layouts. ``format=format:srate:channels:out-format:out-srate:out-channels`` - Force a specific audio format/configuration without actually changing the - audio data. Keep in mind that the filter system might auto-insert actual - conversion filters before or after this filter if needed. + Does not do any format conversion itself. Rather, it may cause the + filter system to insert necessary conversion filters before or after this + filter if needed. It is primarily useful for controlling the audio format + going into other filters. To specify the format for audio output, see + ``--audio-format``, ``--audio-samplerate``, and ``--audio-channels``. This + filter is able to force a particular format, whereas ``--audio-*`` + may be overridden by the ao based on output compatibility. All parameters are optional. The first 3 parameters restrict what the filter - accepts as input. The ``out-`` parameters change the audio format, without - actually doing a conversion. The data will be 'reinterpreted' by the - filters or audio outputs following this filter. + accepts as input. They will therefore cause conversion filters to be + inserted before this one. The ``out-`` parameters tell the filters or audio + outputs following this filter how to interpret the data without actually + doing a conversion. Setting these will probably just break things unless you + really know you want this for some reason, such as testing or dealing with + broken media. ```` Force conversion to this format. Use ``--af=format=format=help`` to get @@ -252,14 +259,9 @@ Available filters are: ```` - See also ``--audio-format``, ``--audio-samplerate``, and - ``--audio-channels`` for related options. Keep in mind that - ``--audio-channels`` does not actually force the number of - channels in most cases, while this filter can do this. - - *NOTE*: this filter used to be named ``force``. Also, unlike the old - ``format`` filter, this does not do any actual conversion anymore. - Conversion is done by other, automatically inserted filters. + *NOTE*: this filter used to be named ``force``. The old ``format`` filter + used to do conversion itself, unlike this one which lets the filter system + handle the conversion. ``convert24`` Filter for internal use only. Converts between 24-bit and 32-bit sample -- cgit v1.2.3 From e6d7e550125873f46126f3d23c4970df1976a269 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 15 Apr 2015 14:26:54 +0200 Subject: options: --hr-seek=always is the same as --hr-seek=yes It seems this choice was never documented. "always" is actually older than "yes", so just declare it a compatibility value for "yes". (Also move it before "always" in the C code to make this clear.) --- DOCS/man/options.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 31461817a9..9fcb143ccc 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -181,6 +181,7 @@ Playback Control file, such as a chapter seek, but not for relative seeks like the default behavior of arrow keys (default). :yes: Use precise seeks whenever possible. + :always: Same as ``yes`` (for compatibility). ``--hr-seek-demuxer-offset=`` This option exists to work around failures to do precise seeks (as in -- cgit v1.2.3 From 9cabef39747e955eb9837d1d0c15d2956d8c5c3d Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Thu, 16 Apr 2015 21:43:01 +0200 Subject: vo_drm: add missing documentation --- DOCS/man/vo.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index 4ac1dd8740..b398d4f57d 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -920,3 +920,16 @@ Available video output drivers are: (default: -10). Note that mpv will also use the 2 layers above the selected layer, to handle the window background and OSD. Actual video rendering will happen on the layer above the selected layer. + +``drm`` (Direct Rendering Manager) + Video output driver using Kernel Mode Setting / Direct Rendering Manager. + Does not support hardware acceleration. Should be used when one doesn't + want to install full-blown graphical environment (e.g. no X). + + ``connector=`` + Select the connector to use (usually this is a monitor.) If set to -1, + mpv renders the output on the first available connector. (default: -1) + + ``devpath=`` + Path to graphic card device. + (default: /dev/dri/card0) -- cgit v1.2.3 From 533b0c70e1f2cf5c1358c7147ae5546fcf1f6a64 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 16 Apr 2015 21:55:10 +0200 Subject: video: do not show decoder framedrops if they're not requested libavcodec makes it impossible to distinguish dropped frames (requested with AVCodecContext.skip_frame), and cases when the decoder simply does not return a frame by default (such as with VP9, which has invisible reference frames). This confuses users when decoding VP9 video. It's basically a cosmetic issue, so just paint it over by ignoring them if framedropping is disabled. --- DOCS/man/mpv.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index ca1e87105e..a530725548 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -517,10 +517,9 @@ listed. rendering is too slow. Also can be incremented on "hiccups" and when the video frame couldn't be displayed on time. (``vo-drop-frame-count`` property.) If the decoder drops frames, the number of decoder-dropped frames is appended - to the display as well, e.g.: ``Dropped: 4/34``. This should almost never - happen, unless decoder-framedropping is enabled with one of the - ``--framedrop`` options, the stream contains errors, or a weird codec is in - use. (``drop-frame-count`` property.) + to the display as well, e.g.: ``Dropped: 4/34``. This happens only if + decoder-framedropping is enabled with the ``--framedrop`` options. + (``drop-frame-count`` property.) - Cache state, e.g. ``Cache: 2s+134KB``. Visible if the stream cache is enabled. The first value shows the amount of video buffered in the demuxer in seconds, the second value shows *additional* data buffered in the stream cache in -- cgit v1.2.3 From 547976633f41c245b9accd6906166bb450e13557 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 16 Apr 2015 22:06:47 +0200 Subject: command: let screenshot_to_file command overwrite files The old behavior does not make too much sense after all. If you don't want to file to be overwritten, the user can check this manually. This is a change in behavior - let's hope nobody actually relied on it. --- DOCS/man/input.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index a3bad3706b..7209f508d9 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -187,8 +187,7 @@ List of Input Commands The second argument is like the first argument to ``screenshot``. - This command tries to never overwrite files. If the file already exists, - it fails. + If the file already exists, it's overwritten. Like all input command parameters, the filename is subject to property expansion as described in `Property Expansion`_. -- cgit v1.2.3 From f4292ebf52fb2e58a1ddbefb06bccd47a38bdc99 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 16 Apr 2015 22:16:04 +0200 Subject: vf_screenshot: remove this filter It's entirely useless, especially now that vo.c handles screenshots in a generic way, and requires no special VO support. There are some potential weird use-cases, but actually I've never seen it being used. --- DOCS/man/mpv.rst | 7 ++----- DOCS/man/vf.rst | 6 ------ 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index a530725548..f8db13c336 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -475,11 +475,8 @@ A screenshot will usually contain the unscaled video contents at the end of the video filter chain and subtitles. By default, ``S`` takes screenshots without subtitles, while ``s`` includes subtitles. -The ``screenshot`` video filter is not required when using a recommended GUI -video output driver. It should normally not be added to the config file, as -taking screenshots is handled by the VOs, and adding the screenshot filter will -break hardware decoding. (The filter may still be useful for taking screenshots -at a certain point within the video chain when using multiple video filters.) +Unlike with MPlayer, the ``screenshot`` video filter is not required. This +filter was never required in mpv, and has been removed. TERMINAL STATUS LINE ==================== diff --git a/DOCS/man/vf.rst b/DOCS/man/vf.rst index be7daee09e..3739716340 100644 --- a/DOCS/man/vf.rst +++ b/DOCS/man/vf.rst @@ -561,12 +561,6 @@ Available filters are: ``show`` Draw a rectangle showing the area defined by x/y/w/h. -``screenshot`` - Optional filter for screenshot support. This is only needed if the video - output does not provide working direct screenshot support. Note that it is - not always safe to insert this filter by default. See `TAKING SCREENSHOTS`_ - for details. - ``sub=[=bottom-margin:top-margin]`` Moves subtitle rendering to an arbitrary point in the filter chain, or force subtitle rendering in the video filter as opposed to using video output OSD -- cgit v1.2.3 From 55ba4db742911689a7feb45b7b102dfd12e8eda8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 17 Apr 2015 16:06:43 +0200 Subject: options: clarify quoting for option values starting with % --- DOCS/man/mpv.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index f8db13c336..a2e47a1a6e 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -280,10 +280,10 @@ The ``[...]`` from of quotes wraps everything between ``[`` and ``]``. It's useful with shells that don't interpret these characters in the middle of an argument (like bash). -A special kind of string-escaping intended for use with external scripts and -programs is started with ``%``. +The fixed-length quoting syntax is intended for use with external +scripts and programs. -It has the following format:: +It is started with ``%`` and has the following format:: %n%string_of_length_n @@ -319,7 +319,8 @@ console controls. (Which makes it suitable for playing data piped to stdin.) For paths passed to suboptions, the situation is further complicated by the need to escape special characters. To work this around, the path can be -additionally wrapped in the ``%n%string_of_length_n`` syntax (see above). +additionally wrapped in the fixed-length syntax, e.g. ``%n%string_of_length_n`` +(see above). Some mpv options interpret paths starting with ``~``. Currently, the prefix ``~~/`` expands to the mpv configuration directory (usually ``~/.config/mpv/``). @@ -397,10 +398,10 @@ Escaping spaces and special characters This is done like with command line options. The shell is not involved here, but option values still need to be quoted as a whole if it contains certain characters like spaces. A config entry can be quoted with ``"`` and ``'``, -as well as with the ``%n%`` syntax mentioned before. This is like passing -the exact contents of the quoted string as command line option. C-style escapes -are currently _not_ interpreted on this level, although some options to this -manually. (This is a mess and should probably be changed at some point.) +as well as with the fixed-length syntax (``%n%``) mentioned before. This is like +passing the exact contents of the quoted string as command line option. C-style +escapes are currently _not_ interpreted on this level, although some options to +this manually. (This is a mess and should probably be changed at some point.) Putting Command Line Options into the Configuration File -------------------------------------------------------- -- cgit v1.2.3 From 01cfcd68142d72f4805db9a033cdd63106bae6cc Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 17 Apr 2015 22:03:25 +0200 Subject: demuxer_lavf: add an option for disabling hacks --- DOCS/man/options.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 9fcb143ccc..ef914982a7 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2022,6 +2022,12 @@ Demuxer ``--demuxer-lavf-format=`` Force a specific libavformat demuxer. +``--demuxer-lavf-hacks=`` + By default, some formats will be handled differently from other formats + by explicitly checking for them. Most of these compensate for weird or + imperfect behavior from libavformat demuxers. Passing ``no`` disables + these. For debugging and testing only. + ``--demuxer-lavf-genpts-mode=`` Mode for deriving missing packet PTS values from packet DTS. ``lavf`` enables libavformat's ``genpts`` option. ``no`` disables it. This used -- cgit v1.2.3 From 8e0cf9d878cd25977d0de312c5746117fe33c6a9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 19 Apr 2015 15:31:17 +0200 Subject: options: change [...] to balanced quotes Useful for dealing with libavfilter's terrible graph syntax. Not strictly backwards compatible (for example "[a[b]" fails now - the "[" within the quote is interpreted now). But hopefully it's obscure enough not to warrant any kind of compatibility hacks. --- DOCS/man/mpv.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'DOCS') diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index a2e47a1a6e..ec25d720ff 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -278,7 +278,9 @@ quotes. The ``[...]`` from of quotes wraps everything between ``[`` and ``]``. It's useful with shells that don't interpret these characters in the middle of -an argument (like bash). +an argument (like bash). These quotes are balanced (since mpv 0.9.0): the ``[`` +and ``]`` nest, and the quote terminates on the last ``]`` that has no matching +``[`` within the string. (For example, ``[a[b]c]`` results in ``a[b]c``.) The fixed-length quoting syntax is intended for use with external scripts and programs. -- cgit v1.2.3 From 1dcc38a7c237f31ac441192ba88488b347e8419e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 19 Apr 2015 19:15:19 +0200 Subject: manpage: fix typo --- DOCS/man/mpv.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DOCS') diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index ec25d720ff..751b2b2b59 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -276,7 +276,7 @@ Shells may actually strip some quotes from the string passed to the commandline, so the example quotes the string twice, ensuring that mpv recieves the ``"`` quotes. -The ``[...]`` from of quotes wraps everything between ``[`` and ``]``. It's +The ``[...]`` form of quotes wraps everything between ``[`` and ``]``. It's useful with shells that don't interpret these characters in the middle of an argument (like bash). These quotes are balanced (since mpv 0.9.0): the ``[`` and ``]`` nest, and the quote terminates on the last ``]`` that has no matching -- cgit v1.2.3 From c64e4e48d97b9af2b241179ee87765e5d17fff95 Mon Sep 17 00:00:00 2001 From: xylosper Date: Tue, 21 Apr 2015 00:50:43 +0900 Subject: command: disc-mouse-on-button property This property indicates whether mouse cursor is located on button or not for disc naviation. --- DOCS/man/input.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 7209f508d9..4f378d0222 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -919,6 +919,10 @@ Property list a BD or DVD. Use the ``discnav menu`` command to actually enter or leave menu mode. +``disc-mouse-on-button`` + Return ``yes`` when the mouse cursor is located on a button, or ``no`` + when cursor is outside of any button for disc navigation. + ``chapters`` Number of chapters. -- cgit v1.2.3 From c6d046414b1d31046c39da6399130b39fe54813d Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 20 Apr 2015 20:52:16 +0200 Subject: player: change video-bitrate and audio-bitrate properties Remove the old implementation for these properties. It was never very good, often returned very innaccurate values or just 0, and was static even if the source was variable bitrate. Replace it with the implementation of "packet-video-bitrate". Mark the "packet-..." properties as deprecated. (The effective difference is different formatting, and returning the raw value in bits instead of kilobits.) Also extend the documentation a little. It appears at least some decoders (sipr?) need the AVCodecContext.bit_rate field set, so this one is still passed through. --- DOCS/man/input.rst | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 4f378d0222..3c8c51e87b 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1126,9 +1126,6 @@ Property list ``audio-codec`` Audio codec selected for decoding. -``audio-bitrate`` - Audio bitrate. This is probably a very bad guess in most cases. - ``audio-samplerate`` Audio samplerate. @@ -1225,9 +1222,6 @@ Property list ``video-codec`` Video codec selected for decoding. -``video-bitrate`` - Video bitrate (a bad guess). - ``width``, ``height`` Video size. This uses the size of the video as decoded, or if no video frame has been decoded yet, the (possibly incorrect) container indicated @@ -1637,7 +1631,7 @@ Property list whether the video window is visible. If the ``--force-window`` option is used, this is usually always returns ``yes``. -``packet-video-bitrate``, ``packet-audio-bitrate``, ``packet-sub-bitrate`` +``video-bitrate``, ``audio-bitrate``, ``sub-bitrate`` Bitrate values calculated on the packet level. This works by dividing the bit size of all packets between two keyframes by their presentation timestamp distance. (This uses the timestamps are stored in the file, so @@ -1646,8 +1640,29 @@ Property list bitrate. To make the property more UI friendly, updates to these properties are throttled in a certain way. + The unit is bits per second. OSD formatting turns these values in kilobits + (or megabits, if appropriate), which can be prevented by using the + raw property value, e.g. with ``${=video-bitrate}``. + + Note that the accuracy of these properties is influenced by a few factors. + If the underlying demuxer rewrites the packets on demuxing (done for some + file formats), the bitrate might be slightly off. If timestamps are bad + or jittery (like in Matroska), even constant bitrate streams might show + fluctuating bitrate. + How exactly these values are calculated might change in the future. + In earlier versions of mpv, these properties returned a static (but bad) + guess using a completely different method. + +``packet-video-bitrate``, ``packet-audio-bitrate``, ``packet-sub-bitrate`` + Old and deprecated properties for ``video-bitrate``, ``audio-bitrate``, + ``sub-bitrate``. They behave exactly the same, but return a value in + kilobits. Also, they don't have any OSD formatting, though the same can be + achieved with e.g. ``${=video-bitrate}``. + + These properties shouldn't be used anymore. + ``audio-device-list`` Return the list of discovered audio devices. This is mostly for use with the client API, and reflects what ``--audio-device=help`` with the command -- cgit v1.2.3 From ccfe4d64184ae4c2983ae6b099c7c7ebb3770d0f Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 20 Apr 2015 23:05:52 +0200 Subject: client API: add MPV_FORMAT_BYTE_ARRAY type This will be used in the following commit, which adds screenshot_raw. The reasoning is that this will be better for binding scripting languages. One could special-case the screenshot_raw commit and define fixed semantics for passing through a pointer using the current API, like formatting a pointer as string. But that would be ridiculous and unclean. --- DOCS/client-api-changes.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'DOCS') diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst index 62640889b6..9b3f21c7c8 100644 --- a/DOCS/client-api-changes.rst +++ b/DOCS/client-api-changes.rst @@ -25,6 +25,7 @@ API changes :: + 1.17 - add MPV_FORMAT_BYTE_ARRAY --- mpv 0.9.0 will be released --- 1.16 - add mpv_opengl_cb_report_flip() - introduce mpv_opengl_cb_draw() and deprecate mpv_opengl_cb_render() -- cgit v1.2.3 From a3680d1b2d137461008d38486cdb2d5013291e61 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 20 Apr 2015 23:11:03 +0200 Subject: client API: add a screenshot_raw command Requested. The wild code for setting up the mpv_node probably deserves to be cleaned up later. Fixes #1800. --- DOCS/man/input.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 3c8c51e87b..e1c3a58421 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -631,6 +631,15 @@ Input Commands that are Possibly Subject to Change unseekable streams that are going out of sync. This command might be changed or removed in the future. +``screenshot_raw [subtitles|video|window]`` + Return a screenshot in memory. This can be used only through the client + API. The MPV_FORMAT_NODE_MAP returned by this command has the ``w``, ``h``, + ``stride`` fields set to obvious contents. A ``format`` field is set to + ``bgr0`` by default. This format is organized as ``B8G8R8X8`` (where ``B`` + is the LSB). The contents of the padding ``X`` is undefined. The ``data`` + field is of type MPV_FORMAT_BYTE_ARRAY with the actual image data. The image + is freed as soon as the result node is freed. + Undocumented commands: ``tv_last_channel`` (TV/DVB only), ``get_property`` (deprecated), ``ao_reload`` (experimental/internal). -- cgit v1.2.3 From dbeb1053962e2eb35d380e6b6a5bc7a3c3d60d76 Mon Sep 17 00:00:00 2001 From: xylosper Date: Tue, 21 Apr 2015 06:47:13 +0900 Subject: command: demuxer-cache-time property Approximate time of video buffered in the demuxer, in seconds. Same as `demuxer-cache-duration` but returns the last timestamp of bufferred data in demuxer. Signed-off-by: wm4 --- DOCS/man/input.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index e1c3a58421..2d297c0371 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1090,6 +1090,11 @@ Property list guess is very unreliable, and often the property will not be available at all, even if data is buffered. +``demuxer-cache-time`` + Approximate time of video buffered in the demuxer, in seconds. Same as + ``demuxer-cache-duration`` but returns the last timestamp of bufferred + data in demuxer. + ``demuxer-cache-idle`` Returns ``yes`` if the demuxer is idle, which means the demuxer cache is filled to the requested amount, and is currently not reading more data. -- cgit v1.2.3 From daabbe364007fc7546df63981422b53b9a20c6fc Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 22 Apr 2015 20:55:05 +0200 Subject: lua: add utils.format_json() function Requested. Why not. --- DOCS/man/lua.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index 4700b90cb2..ff70600a1d 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -639,6 +639,14 @@ strictly part of the guaranteed API. trailing text is returned as 3rd return value. (The 3rd return value is always there, but with ``trail`` set, no error is raised.) +``utils.format_json(v)`` + Format the given Lua table (or value) as a JSON string and return it. On + error, returns ``nil, error``. (Errors usually only happen on value types + incompatible with JSON.) + + The argument value uses similar conventions as ``mp.set_property_native()`` + to distinguish empty objects and arrays. + ``utils.to_string(v)`` Turn the given value into a string. Formats tables and their contents. This doesn't do anything special; it is only needed because Lua is terrible. -- cgit v1.2.3 From 90d7e51643273a14dfb9a4db622abb7da4e0aa5f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 23 Apr 2015 19:35:15 +0200 Subject: demux_mkv: attempt to fix rounded timestamps There is some potential for breakage. If it happens, this might have to be disabled by default. --- DOCS/man/options.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index ef914982a7..47f4c15152 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2112,6 +2112,18 @@ Demuxer will be slower (especially when playing over http), or that behavior with broken files is much worse. So don't use this option. +``--demuxer-mkv-fix-timestamps=`` + Fix rounded Matroska timestamps (enabled by default). Matroska usually + stores timestamps rounded to milliseconds. This means timestamps jitter + by some amount around the intended timestamp. mpv can correct the timestamps + based on the framerate value stored in the file: if the timestamps does + not deviate more than 1 frame (as implied by the framerate), the timestamp + is rounded to the next frame, which should undo the rounding the muxer + did. + + This can break playback if the framerate value stored in the file is too + high. + ``--demuxer-rawaudio-channels=`` Number of channels (or channel layout) if ``--demuxer=rawaudio`` is used (default: stereo). -- cgit v1.2.3 From cc21eadf30aa3e822be25ffd5118d781f4409c86 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 23 Apr 2015 20:16:33 +0200 Subject: demux_mkv: limit timestamp fixing to 1ms max And also fix the description. It didn't actually reflect what the code did. --- DOCS/man/options.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 47f4c15152..b9c423e053 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2116,13 +2116,13 @@ Demuxer Fix rounded Matroska timestamps (enabled by default). Matroska usually stores timestamps rounded to milliseconds. This means timestamps jitter by some amount around the intended timestamp. mpv can correct the timestamps - based on the framerate value stored in the file: if the timestamps does - not deviate more than 1 frame (as implied by the framerate), the timestamp - is rounded to the next frame, which should undo the rounding the muxer - did. + based on the framerate value stored in the file: the timestamp is rounded + to the next frame (according to the framerate), unless the new timestamp + would deviate more than 1ms from the old one. This should undo the rounding + done by the muxer. - This can break playback if the framerate value stored in the file is too - high. + (The allowed deviation can be less than 1ms if the file uses a non-standard + timecode scale.) ``--demuxer-rawaudio-channels=`` Number of channels (or channel layout) if ``--demuxer=rawaudio`` is used -- cgit v1.2.3 From b98949c72cc5fdf6e4c19aa06148f888961ad36b Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 23 Apr 2015 20:34:30 +0200 Subject: manpage: document ff-index sub-property --- DOCS/man/input.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 2d297c0371..633f6a8308 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1524,6 +1524,13 @@ Property list ``track-list/N/selected`` ``yes`` if the track is currently decoded, ``no`` otherwise. + ``track-list/N/ff-index`` + The stream index as usually used by the FFmpeg utilities. Note that + this can be potentially wrong if a demuxer other than libavformat + (``--demuxer=lavf``) is used. For mkv files, the index will usually + match even if the default (builtin) demuxer is used, but there is + no hard guarantee. + When querying the property with the client API using ``MPV_FORMAT_NODE``, or with Lua ``mp.get_property_native``, this will return a mpv_node with the following contents: -- cgit v1.2.3 From 6cadeaa79aa829ed6f704fac8449dd61165d96c9 Mon Sep 17 00:00:00 2001 From: robin007bond Date: Thu, 23 Apr 2015 22:29:29 +0200 Subject: DOCS/mplayer-changes: Eleborate on joystick input Since joystick support was removed and is a difference from mplayer, it should be included in the document with the mplayer changes. It will help new users who were using mplayer's joystick support to seek alternatives when switching to mpv. It will also be helpful for people that had problems with the joystick support in mplayer (for example, by incorrectly recognizing other input devices as joystick) to know that those problems won't persist in mpv. --- DOCS/mplayer-changes.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'DOCS') diff --git a/DOCS/mplayer-changes.rst b/DOCS/mplayer-changes.rst index bd803e41f3..e98daf4a36 100644 --- a/DOCS/mplayer-changes.rst +++ b/DOCS/mplayer-changes.rst @@ -49,6 +49,8 @@ Input * Classic LIRC support was removed. Install remotes as input devices instead. This way they will send X11 key events to the mpv window, which can be bound using the normal ``input.conf``. +* Joystick support was removed. It was considered useless and was the cause + of some problems (e.g. a laptop's accelerator being recognized as joystick). Audio ~~~~~ -- cgit v1.2.3 From bf0cb27489b0e0e00190c4ea2e08290fb3817626 Mon Sep 17 00:00:00 2001 From: Martin Herkt Date: Fri, 24 Apr 2015 03:27:50 +0200 Subject: man: fix PDF build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build failed because rst2pdf apparently has problems with page breaks. In this case, the link to the ALSA upmix guide was causing a page break in an admonition block. My guess is that rst2pdf screws up when it can’t fill at least one line of text following a page break, so I worked around this by making that paragraph a little longer. Seems to do the trick. I also shortened the URL using GitHub’s service because it was causing some rather unsightly formatting in the manpage output. Maybe we should just build HTML instead of a PDF. --- DOCS/man/ao.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/ao.rst b/DOCS/man/ao.rst index 5ca960c4ea..534f62588c 100644 --- a/DOCS/man/ao.rst +++ b/DOCS/man/ao.rst @@ -107,8 +107,10 @@ Available audio output drivers are: ``--audio-device`` to select the device (use ``--audio-device=help`` to get a list of all devices and their mpv name). - You can also try - `Using the upmix plugin `_. + You can also try `using the upmix plugin `_. + This setup enables multichannel audio on the ``default`` device + with automatic upmixing with shared access, so playing stereo + and multichannel audio at the same time will work as expected. ``oss`` OSS audio output driver -- cgit v1.2.3 From 72e505a944ac6b519d7a2348d63dd9a1fd2fe2a2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 24 Apr 2015 22:52:01 +0200 Subject: player: add --window-scale option Requested. Works similar to the property with the same name. --- DOCS/man/options.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index b9c423e053..f35a73b92d 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -1724,6 +1724,14 @@ Window (depending on the video aspect ratio, the width or height will be larger than 500 in order to keep the aspect ratio the same). +``--window-scale=`` + Resize the video window to a multiple (or fraction) of the video size. This + option is applied before ``--autofit`` and other options are applied (so + they override this option). + + For example, ``--window-scale=0.5`` would show the window at half the + video size. + ``--autosync=`` Gradually adjusts the A/V sync based on audio delay measurements. Specifying ``--autosync=0``, the default, will cause frame timing to be -- cgit v1.2.3 From 983d24e3b9ce9c9c7755279138c14170e85fbf37 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 24 Apr 2015 22:55:01 +0200 Subject: manpage: move --autosync description This was in the "Window" section. It has absolutely nothing to do with windows. Move it to the "Miscellaneous" section instead. The "--mc" option, which has a similar function, was already there. --- DOCS/man/options.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index f35a73b92d..dd85fbfd63 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -1732,20 +1732,6 @@ Window For example, ``--window-scale=0.5`` would show the window at half the video size. -``--autosync=`` - Gradually adjusts the A/V sync based on audio delay measurements. - Specifying ``--autosync=0``, the default, will cause frame timing to be - based entirely on audio delay measurements. Specifying ``--autosync=1`` - will do the same, but will subtly change the A/V correction algorithm. An - uneven video framerate in a video which plays fine with ``--no-audio`` can - often be helped by setting this to an integer value greater than 1. The - higher the value, the closer the timing will be to ``--no-audio``. Try - ``--autosync=30`` to smooth out problems with sound drivers which do not - implement a perfect audio delay measurement. With this value, if large A/V - sync offsets occur, they will only take about 1 or 2 seconds to settle - out. This delay in reaction time to sudden A/V offsets should be the only - side-effect of turning this option on, for all sound drivers. - ``--cursor-autohide=`` Make mouse cursor automatically hide after given number of milliseconds. ``no`` will disable cursor autohide. ``always`` means the cursor will stay @@ -3258,6 +3244,20 @@ Miscellaneous ``--mc=`` Maximum A-V sync correction per frame (in seconds) +``--autosync=`` + Gradually adjusts the A/V sync based on audio delay measurements. + Specifying ``--autosync=0``, the default, will cause frame timing to be + based entirely on audio delay measurements. Specifying ``--autosync=1`` + will do the same, but will subtly change the A/V correction algorithm. An + uneven video framerate in a video which plays fine with ``--no-audio`` can + often be helped by setting this to an integer value greater than 1. The + higher the value, the closer the timing will be to ``--no-audio``. Try + ``--autosync=30`` to smooth out problems with sound drivers which do not + implement a perfect audio delay measurement. With this value, if large A/V + sync offsets occur, they will only take about 1 or 2 seconds to settle + out. This delay in reaction time to sudden A/V offsets should be the only + side-effect of turning this option on, for all sound drivers. + ``--mf-fps=`` Framerate used when decoding from multiple PNG or JPEG files with ``mf://`` (default: 1). -- cgit v1.2.3