mpv-player / mpv-player/mpv

estimated-frame-number off-by-one and incorrect display when reversing frame direction.

Open
#9,206 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Important Information
  • mpv 0.33.0-336-g62b2c5db98
  • Windows 11 (OS Build 22454.1000)
  • shinchiro sourceforge 64bit builds
Reproduction steps

input.conf

CTRL+RIGHT  frame-step ; show-text "Frame: ${estimated-frame-number} / ${estimated-frame-count}"
CTRL+LEFT   frame-back-step ; show-text "Frame: ${estimated-frame-number} / ${estimated-frame-count}"
  • Frame-step twice.
  • Frame-back-step once.
  • Experience wrong frame count on OSD.
Expected behavior

Accurate frame count display on OSD when transitioning frames one at a time in any direction.

Actual behavior

When you open a video file and start at 0:00, advancing one frame with frame-step shows the frame count as 0 on the OSD. Likewise, if you advance frames and decide to reverse directions, the frame display continues to count in the opposite direction for the first frame.

frame-step > frame-step > frame-step > frame-back-step > frame-back-step
Displays as;
0, 1, 2, 3, 2

When starting at absolute 0:00, if you consider the first frame to be 0, it should display as;
1, 2, 3, 2, 1

Otherwise if you consider the first frame in the video to actually be the first frame, it should display as;
2, 3, 4, 3, 2

If you are back-stepping frames and decide to forward a frame, the OSD will keep counting backwards until the 2nd consecutive forward.

Log file

output.txt

Sample files

Reproducible with any mkv video file, no sample needed.

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

Start by reproducing the behavior with the input.conf bindings and a video file, then review output.txt alongside the estimated-frame-number and estimated-frame-count behavior. Verify frame-step and frame-back-step when changing direction, and consider the issue done when the OSD reports the expected sequence consistently in both directions.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.