mpv-player / mpv-player/mpv

Seeking in certain sparse frame files jumps to iframe

Open
#16,728 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

meta:feature-request priority:ignored-issue-template
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Expected behavior of the wanted feature

I have a slideshow in which I have 5 frames and an audio file created with ffmpeg and concat. With mpv, if I click on the seek bar or use arrow keys it will jump to the frame. It seems not to interpolate in between as if there is no audio that exists. E.g, suppose an iframe exists at 0, 60, and 120 in a 4 minute song. Trying to seek at 40 seconds will have the playback jump to 60. This makes it impossible to se mpv for these types of files. Otherwise it seems to work. Other players also have problems(WMPL works though but eventually crashes). Using mpv.net, it has higher res seeking but that does nothing.

Alternative behavior of the wanted feature

The code should attempt to seek correctly to the position asked for by the user, not jump to the closest iframe. It should, instead, determine what the closest previous iframe is and use that. E.g., if one seeks to 75s into the video it should not go to 120s into the video but go to 75s but display the iframe from 60. If one wants to avoid certain glitches in normal videos then if, say, one is within 1/2 a second or 1 second of the next iframe(e.g., 119.53) then it grabs the next iframe(the one at 120).

This is a simple modification in algorithm. All other players do work this way but they have different issues which I think mpv likely doesn't(but no way to test).

Log File

No response

Sample Files

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, log, or sample file is provided. Start by reproducing the behavior with a sparse-frame file made with ffmpeg and trace the seeking path; done means seeking to positions between keyframes displays the previous frame without jumping forward, while preserving near-next-keyframe behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.