mpv
mpv copied to clipboard
Overriding framerate should alter durations in OSD & Term status, seek values, progress bars
Important Information
Provide following Information:
- mpv version 0.33.1 (I cannot currently compile the latest version on my system)
- macOS Version 10.13.6 (17G14042)
- Source of the mpv binary or bundle
brew install mpv
Reproduction steps
-
Add frame values to the OSD by adding to mpv.conf:
osd-status-msg=${playback-time} / ${duration} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count} -
Run
mpv --pause --fps=1000 --no-correct-pts "$inputfile", the file being 1 hour long at 25 fps (i.e. total frame no. = 25 fps × 3600 sec = 90000 frames) -
Press Shift + O to display OSD.
-
Press ↑ to seek 1 minute forward.
Expected behavior
In 2., The OSD and the Terminal playback status should report a duration of 00:01:30(90000 frames / 1000 fps = 90 sec).
In 3, the playhead should move to approximately frame no. 60000 (which is 00:01:00 at 1000 fps, and at 25 fps would have been 00:40:00)
Actual behavior
In 2. duration is reported as if the fps were still 25 fps, i.e. 01:00:00. Consequently, as the file plays, percent-pos does not match the actual percent position and playback stops quite before it reaches 100%.
In 3., playback-time reportedly becomes 00:01:00, but the playhead is instead at frame no. ~1500 (which corresponds to 00:01:00 at 25 fps, and is actually 00:00:01.500 at 1000 fps, ). OSD and Terminal therefore report a playback-time that desyncs with the actual playback time when seeking. Besides, while estimated-frame-number is reported as "60000", matching where the playhead should be at with the fps overriden to 1000, the playhead actually moved to frame no. ~1500 instead; estimated-frame-count should have remained the same, since the total number of frames does not vary whatever the fps, but is reported proportionately increased instead, i.e. 3600000 instead of 90000 (which comes from 1000 fps / 25 fps = 40; 90000 frames × 40 = 3600000 frames).
All progress bars (OSD, UI, Term…) are equally broken. As with percent-pos, during playback they fill up at the same speed as if the fps were not overriden, and playback reaches the end far before they fill up. When seeking, they fill up according to the ratio of playback-time and duration, but since both are reported wrong, the purported progress is wrong too.
Log file
https://0x0.st/opAv.txt