Bug 449086 - Stopping a video displays the wrong frame (too far by one)
Summary: Stopping a video displays the wrong frame (too far by one)
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: Monitors & Playback (show other bugs)
Version: 21.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-24 17:22 UTC by Tobias Bora
Modified: 2024-10-02 11:03 UTC (History)
1 user (show)

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


Attachments
Screenshot of the bug. (598.35 KB, image/png)
2022-01-24 17:22 UTC, Tobias Bora
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Bora 2022-01-24 17:22:59 UTC
Created attachment 145868 [details]
Screenshot of the bug.

SUMMARY

When playing and stopping a video, the frame displayed in the editor does not match the frame on screen: the screen is ahead of one. However, if one goes back by one frame (arrow left) and goes forward by one frame (arrow right), then the good frame is displayed. This behavior is always reproducible.


STEPS TO REPRODUCE
1. Load a video in kdenlive, and ensure that the FPS are correctly configured. Ideally, add the frame number in the video using something like `ffmpeg -i mov_bbb.mp4 -vf "drawtext=fontfile=Arial.ttf: text='%{frame_num}': start_number=0: x=(w-tw)/2: y=h-(2*lh): fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=5" -c:a copy mov_bbb_frames.mp4`. In my case, I tested using this video https://www.w3schools.com/html/mov_bbb.mp4 When KDEnlive proposes to change the framerate setting of the project, accept.
2. The result is also more visible if you change the frame display format to match the frame number (that way you can just check if the frame is the good one by comparing the number written in the video and the frame number). To do that, click on the "00:00:00:00/00:00:00:00" number (next to the scissors) and click "Frames". If you don't, then the frame will also not be the correct one, but to realize it, you will need to go backward and forward by one frame to observe that the frame has changed.  
2. Play the video, for instance pressing Space. Stop it by pressing space again.

OBSERVED RESULT

The frame at which we stop is N (number right below the video, left to the hamburger menu), but the video displays the frame N+1. Then, go backward by one slide, and forward by one slide. The good frame is displayed now!

EXPECTED RESULT

I expect the good frame to be displayed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: NixOs unstable a4bf4434570
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2