diff --git a/DOCS/interface-changes/speed-aware-image-display-duration.txt b/DOCS/interface-changes/speed-aware-image-display-duration.txt new file mode 100644 index 0000000000..0dc1eb5968 --- /dev/null +++ b/DOCS/interface-changes/speed-aware-image-display-duration.txt @@ -0,0 +1 @@ +effective `--image-display-duration` takes `--speed` into consideration now diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index d20137d819..31e2c027a1 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3409,6 +3409,9 @@ Window example if ``--length`` is used to reduce the length to 1 frame, or if you seek to the last frame. + The effective duration is now `--speed` aware, which was not the case in + older mpv versions before v0.41.0. + This option does not affect the framerate used for ``mf://`` or ``--merge-files``. For that, use ``--mf-fps`` instead. diff --git a/player/command.c b/player/command.c index 6bfcf203fe..2e36d15ee3 100644 --- a/player/command.c +++ b/player/command.c @@ -8148,7 +8148,7 @@ void mp_option_run_callback(struct MPContext *mpctx, struct mp_option_callback * if (opt_ptr == &opts->image_display_duration && mpctx->vo_chain && mpctx->vo_chain->is_sparse && !mpctx->ao_chain && mpctx->video_status == STATUS_DRAINING) - mpctx->time_frame = opts->image_display_duration; + mpctx->time_frame = opts->image_display_duration / opts->playback_speed; } void mp_notify_property(struct MPContext *mpctx, const char *property) diff --git a/player/video.c b/player/video.c index 0e1ac290d2..05c395455b 100644 --- a/player/video.c +++ b/player/video.c @@ -1108,7 +1108,7 @@ void write_video(struct MPContext *mpctx) get_relative_time(mpctx); if (vo_c->is_sparse && !mpctx->ao_chain) { MP_VERBOSE(mpctx, "assuming this is an image\n"); - mpctx->time_frame += opts->image_display_duration; + mpctx->time_frame += opts->image_display_duration / opts->playback_speed; } else if (mpctx->last_frame_duration > 0) { MP_VERBOSE(mpctx, "using demuxer frame duration for last frame\n"); mpctx->time_frame += mpctx->last_frame_duration;