Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
effective `--image-display-duration` takes `--speed` into consideration now
3 changes: 3 additions & 0 deletions DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3388,6 +3388,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.

Expand Down
2 changes: 1 addition & 1 deletion player/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -8095,7 +8095,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)
Expand Down
2 changes: 1 addition & 1 deletion player/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,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;
Expand Down
Loading