Last frame of entry in playlist is a repeat of the second to last frame of that entry

Operating System: Windows 10 Pro, Version 22H2, OS build 19045.3803
Shotcut Version: 23.11.29

The last frame is a repeat of the second to last frame of the entry. See the video below.

Steps to reproduce:

  1. Add a clip to the timeline where each frame is distinguishable from the next (outside of shotcut).
  2. Scrub the last two frames using arrow keys. Note the last two frames are the same.
  3. Trim the clip by 1 frame
  4. Note the last two frames are once again the same.

This duplicated last frame makes it into the exported video as well.

I understand that not everybody will take issue with this, but I think it is worth fixing. This is a problem for me specifically because I want to use a very short clip to animate the rhythm of drums, and a quarter note at 120 BPM (4/4 timing) with a frame rate of 30 Hz is already down to 15 frames. 16th notes at 200 BPM is 2.25 frames per quarter note. Compromising at 4 frames of this clip per note at 30 FPS gives a max speed of 16th notes at ~112 BPM on a single video track, and using multiple tracks to go multiples faster. With this, I’m hoping to make each of the 4 frames count!

Try using Properties > Convert and see if it still happens.

Thanks for the reply, Dan!

Unfortunately, converting this video to any of the .mp4, .mov, or .mkv formats did not resolve this issue.

Here is the source video if it helps. Without speeding it up to 2x, there are duplicates of each frame except the last 4 which are all the same (unless the very last frame is different than what Shotcut is showing me.)

I made a text clip in Shotcut with the keyword #timecode# and exported it with the DNxHR preset. I opened the export result in Source player, and it shows last 2 frames as 3:23 and 3:24 (25 fps) in both video and the timecode spinner. Then, I added it to the Timeline. When seeking around the last frames of the timeline clip, sometimes it is correct, and sometimes it shows a wrong duplicate or cached frame as you reported. I added another instance of the same test clip on the timeline. From clip A to clip B no frames are repeated or skipped.

Next, I exported the timeline as DNxHR. From clip A to clip B there are no duplicate or missing frames. Stepping frame-by-frame with the export result in the Source player, and all is fine, no duplicate frames: 7:23 shows 3:23 and 7:24 shows 3:24 as expected.

There is only the minor display bug of repeating a frame at the end of the timeline in preview. I also tested Playlist, and it does not have this problem.

Without speeding it up to 2x, there are duplicates of each frame except the last 4 which are all the same

I suggest that in a bug report like (frames being repeated) this you specifically avoid a clip that repeats its image from one frame to the next!

Yeah, good point.

I just recreated your experiment, and I get the same results except this part that you mention:

When scrubbing the last two time cursor positions, I always get a repeat. In a 5 frame video that I made, there are 6 cursor positions from the beginning of the clip to the end. The very last cursor position in the timeline is outside the length of the time that any new frames should be shown.

I actually think that this depiction of the timeline in the timeline part of the GUI is correct, but I don’t think that the last frame should be shown again in the preview at this last cursor position.

I think that the depiction of the timeline that is incorporated into the preview part of the GUI when the source tab is selected is incorrect. The blue rectangle is 4 frames width when it should be 5 to depict the clip is actually 5 frames long. Otherwise, it works exactly as it should only letting you navigate to the beginning (i.e. left side) of each of the 5 frames.

frames

If it were me, which it’s not, I think 2 possible actions can come from this:

  1. I think it would be most accurate if the preview at the end of the track displays something like the blank frame (as is currently done when there are multiple clips in a timeline separated by empty space) or something more to the point like text on a background that says “end of track”.

  2. Revise the Source preview’s timeline such that the blue rectangle is the width of the clip in frames to give a true indication of the clip’s duration.

As a MLT XML side note, I was thrown for a loop in the way the MLT file attributes in and out time for each entry in a playlist. I thought the duration of each clip would be the out minus in, but these outs and ins just point to start-of-frames for the first and last frame, so the true duration is out minus in plus one frame period.

Yes, for me too, but when you go back a couple more frames and step forward then it does not. I will accept the bug for this, but it is a low priority for me.

I think that the depiction of the timeline that is incorporated into the preview part of the GUI when the source tab is selected is incorrect. The blue rectangle is 4 frames width when it should be 5 to depict the clip is actually 5 frames long.

True but really only noticeable when you have like a handful of frames, which is very rare. Not denying it is incorrect or will not change, but low priority for me.

I think it would be most accurate if the preview at the end of the track displays something like the blank frame

It has nothing to do with accuracy, and I disagree on the usefulness. So, not going to happen.

duration is out minus in plus one frame

Yes

Well, thanks for the back-and-forth. This was all very helpful to understand Shotcut better. You can close the thread now if you think that’s appropriate. I would mark a solution, but there’s no workflow solution to the problems.