Bug 433392 - in/out of clip frames not displayed correctly
Summary: in/out of clip frames not displayed correctly
Status: RESOLVED NOT A BUG
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (other bugs)
Version First Reported In: 20.12.2
Platform: Microsoft Windows Microsoft Windows
: NOR minor
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-21 16:16 UTC by aij.wijnands
Modified: 2021-06-18 15:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aij.wijnands 2021-02-21 16:16:23 UTC
SUMMARY
clip frames display incorrectly in user GUI.


STEPS TO REPRODUCE
1. put a clip on a videoline. Make it length 1 frame
2. hoover mouse on this clip
3. look in statusbar at bottom of the window for clip properties

OBSERVED RESULT
it displays:
image0.png (00:00:00.00-00:00:00.00), Position: 00:00:00.00, Duration: 00:00:00.01

EXPECTED RESULT
image0.png (00:00:00.00-00:00:00.01), Position: 00:00:00.00, Duration: 00:00:00.01

SOFTWARE/OS VERSIONS
Windows: 10

KDE Plasma Version: 
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Actually the GUI displays this consistently with the file format. It is also wrong in the file format:
 <entry producer="producer1" in="00:00:00.000" out="00:00:00.000">
The out frame is actually frame 1 not frame 0.

Observed behaviour occurs everywhere, not just in first clip in empty project and with any length. Just made the example easy to make reproduction easier.

Probably a bug in the file format, KDEnlive makes every clip 1 frame longer then specified in the file format. E.g.:
 <entry producer="producer1" in="00:00:00.000" out="00:00:01.000">
will produce a clip that starts on 00:00:00.000 and ends on 00:00:01:01
instead of 00:00:01:00. It shows a duration of 1:01 which is correct with respect to the file format, but incorrect to the gui.
I suspect that opening the project has logic in it that positions the in, calculates duration and calculates the out based on duration. The latter is flawed, there should be a -1 in there.
Comment 1 Julius Künzel 2021-04-20 15:46:54 UTC
Thanks for your report! I can confirm that the outpoint is always one frame fewer than the duration (which is not correct)
Comment 2 Jean-Baptiste Mardelle 2021-06-07 16:37:33 UTC
Well, this is not really incorrect, it's just a matter of how you see things, and we follow the MLT logic here (our video backend).
The in point represents the first visible frame
The out point represents the last visible frame
The length is always (out - in + 1).