mirror of https://github.com/mpv-player/mpv
options: add --hr-seek-framedrop option
This allows disabling of decoder framedrop during hr-seek. It's basically another useless option, but it will help exploring whether this framedropping really makes seeking faster, or whether disabling it helps with precise seeking (especially frame backstepping).
This commit is contained in:
parent
2a783d7035
commit
c57660fbf7
|
@ -110,7 +110,8 @@ List of Input Commands
|
|||
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.
|
||||
corner cases. Using ``--hr-seek-framedrop=no`` should help, although it
|
||||
might make precise seeking slower.
|
||||
|
||||
This does not work with audio-only playback.
|
||||
|
||||
|
|
|
@ -1078,6 +1078,15 @@ OPTIONS
|
|||
the earlier demuxer position and the real target may be unnecessarily
|
||||
decoded.
|
||||
|
||||
``--hr-seek-framedrop=<yes|no>``
|
||||
Allow the video decoder to drop frames during seek, if these frames are
|
||||
before the seek target. If this is enabled, precise seeking can be faster,
|
||||
but if you're using video filters which modify timestamps or add new
|
||||
frames, it can lead to precise seeking skipping the target frame. This
|
||||
e.g. can break frame backstepping when deinterlacing is enabled.
|
||||
|
||||
Default: ``yes``
|
||||
|
||||
``--http-header-fields=<field1,field2>``
|
||||
Set custom HTTP fields when accessing HTTP stream.
|
||||
|
||||
|
|
|
@ -578,6 +578,7 @@ const m_option_t mp_opts[] = {
|
|||
OPT_CHOICE("hr-seek", hr_seek, 0,
|
||||
({"no", -1}, {"absolute", 0}, {"always", 1}, {"yes", 1})),
|
||||
OPT_FLOATRANGE("hr-seek-demuxer-offset", hr_seek_demuxer_offset, 0, -9, 99),
|
||||
OPT_FLAG("hr-seek-framedrop", hr_seek_framedrop, 0),
|
||||
OPT_CHOICE_OR_INT("autosync", autosync, 0, 0, 10000,
|
||||
({"no", -1})),
|
||||
|
||||
|
@ -685,6 +686,7 @@ const struct MPOpts mp_default_opts = {
|
|||
.ordered_chapters = 1,
|
||||
.chapter_merge_threshold = 100,
|
||||
.chapter_seek_threshold = 5.0,
|
||||
.hr_seek_framedrop = 1,
|
||||
.load_config = 1,
|
||||
.position_resume = 1,
|
||||
.stream_cache_min_percent = 20.0,
|
||||
|
|
|
@ -121,6 +121,7 @@ typedef struct MPOpts {
|
|||
int initial_audio_sync;
|
||||
int hr_seek;
|
||||
float hr_seek_demuxer_offset;
|
||||
int hr_seek_framedrop;
|
||||
float audio_delay;
|
||||
float default_max_pts_correction;
|
||||
int autosync;
|
||||
|
|
|
@ -318,7 +318,8 @@ static int decode_image(struct MPContext *mpctx)
|
|||
if (pkt && pkt->pts != MP_NOPTS_VALUE)
|
||||
pkt->pts += mpctx->video_offset;
|
||||
if ((pkt && pkt->pts >= mpctx->hrseek_pts - .005) ||
|
||||
d_video->has_broken_packet_pts)
|
||||
d_video->has_broken_packet_pts ||
|
||||
!mpctx->opts->hr_seek_framedrop)
|
||||
{
|
||||
mpctx->hrseek_framedrop = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue