diff options
author | wm4 <wm4@nowhere> | 2013-04-24 19:31:48 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-04-24 20:27:12 +0200 |
commit | ff549a2f6ade72ee9af42e911139bbee41daee5a (patch) | |
tree | a495c7a77679c306ef1def02a510b21562880fd3 /DOCS/man/en/input.rst | |
parent | 40f822782d036d206a95b8447b709ea2a65b151e (diff) | |
download | mpv-ff549a2f6ade72ee9af42e911139bbee41daee5a.tar.bz2 mpv-ff549a2f6ade72ee9af42e911139bbee41daee5a.tar.xz |
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.
Diffstat (limited to 'DOCS/man/en/input.rst')
-rw-r--r-- | DOCS/man/en/input.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst index 339168b3c4..7938502573 100644 --- a/DOCS/man/en/input.rst +++ b/DOCS/man/en/input.rst @@ -79,6 +79,17 @@ seek <seconds> [relative|absolute|absolute-percent|- [default-precise|exact|keyf frame_step Play one frame, then pause. +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. + set <property> "<value>" Set the given property to the given value. |