summaryrefslogtreecommitdiffstats
path: root/DOCS/man/options.rst
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-05-24 01:47:10 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commita3ac2019eddbfa7d763c6da808c1cf0ebda18c53 (patch)
tree57ff89e29a008048448fd50fa20d4baad13f4c04 /DOCS/man/options.rst
parent27c5550de2693d27ed24d3838a4ae16a06a9dd5d (diff)
downloadmpv-a3ac2019eddbfa7d763c6da808c1cf0ebda18c53.tar.bz2
mpv-a3ac2019eddbfa7d763c6da808c1cf0ebda18c53.tar.xz
demux: fix initial backward demuxing state in some cases
Just "mpv file.mkv --play-direction=backward" did not work, because backward demuxing from the very end was not implemented. This is another corner case, because the resume mechanism so far requires a packet "position" (dts or pos) as reference. Now "EOF" is another possible reference. Also, the backstep mechanism could cause streams to find different playback start positions, basically leading to random playback start (instead of what you specified with --start). This happens only if backstep seeks are involved (i.e. no cached data yet), but since this is usually the case at playback start, it always happened. It was racy too, because it depended on the order the decoders on other threads requested new data. The comment below "resume_earlier" has some more blabla. Some other details are changed. I'm giving up on the "from_cache" parameter, and don't try to detect the situation when the demuxer does not seek properly. Instead, always seek back, hopefully some more. Instead of trying to adjust the backstep seek target by a random value of 1.0 seconds. Instead, always rely on the random value provided by the user via --demuxer-backward-playback-step. If the demuxer should really get "stuck" and somehow miss the seek target badly, or the user sets the option value to 0, then the demuxer will not make any progress and just eat CPU. (Although due to backward seek semantics used for backstep seeks, even a very small seek step size will work. Just not 0.) It seems this also fixes backstepping correctly when the initial seek ended at the last keyframe range. (The explanation above was about the case when it ends at EOF. These two cases are different. In the former, you just need to step to the previous keyframe range, which was broken because it didn't always react correctly to reaching EOF. In the latter, you need to do a separate search for the last keyframe.)
Diffstat (limited to 'DOCS/man/options.rst')
-rw-r--r--DOCS/man/options.rst8
1 files changed, 0 insertions, 8 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 9cfc5b0624..99bb8cad8d 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -489,14 +489,6 @@ Playback Control
A workaround is to remux to a format like mkv, which enforces packet
boundaries. Making mpv cache the entire file in memory also works.
- - Starting from the very end of the file often does not work. This includes
- starting playback of a file while backward playback mode is enabled, and
- no initial seek is set with ``--start``. You need to use something like
- ``--start=99%`` to try to get the end.
-
- - Starting backward playback at a specific time position without pre-caching
- the entire file usually misses the seek target due to a race condition.
-
Tuning:
- Remove all ``--vf``/``--af`` filters you have set. Disable deinterlacing.