summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-20 20:52:16 +0200
committerwm4 <wm4@nowhere>2015-04-20 20:52:16 +0200
commitc6d046414b1d31046c39da6399130b39fe54813d (patch)
tree30c1d2b0ac5e13fa9954dae8db0e8d85fb7cc6b4 /DOCS
parentc5654e400587a8358e486da7da468a775dcd8cc2 (diff)
downloadmpv-c6d046414b1d31046c39da6399130b39fe54813d.tar.bz2
mpv-c6d046414b1d31046c39da6399130b39fe54813d.tar.xz
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.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/input.rst29
1 files changed, 22 insertions, 7 deletions
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