Duplicate Warning in Playlist

Playlist maps rather directly to the MLT playlist, which is simply an ordered list of media objects. It was added before Shotcut had a timeline because it was the next logical step in development before I even decided to tackle a timeline. Development was always in the open and went like this in the early years:

  1. cross-platform player capable of playing MLT XML mulitrack compositions (2011)
  2. Export (2012)
  3. Playlist
  4. Undo/Redo/History
  5. Filters (2013)
  6. Timeline

There is a design document where I have planned to change Playlist to Library with virtual folders, media type filters, and search. This is not a comprehensive cross-project library. Rather, there is a plan to add a Files panel that is like a media-savvy file browser that indexes metadata ala Kyno.

1 Like

Just to be clear. I use the playlist as my main instrument to bring all the clips in order (just sort them by date tbh). And I also apply filters to the clips.

Everything perfect the way it is. To do it in this way is an outstanding feature of shortcut compared to others.

I just miss an information regarding a clip which is in there twice. Because then they are played twice obviously.

Either when trying to add it twice or as a visual indicator somewhere at the clip in the playlist.

I think this would would be an important consideration. If i have a 2 minute clip and I split it in half. and I put the first minute as a clip in the playlist and the second minute as another clip in the playlist - are those a duplicate?

I do it the same way. Sometimes a duplicate is required. The first one has some seconds from the beginning of the clip, the second from the end.

Because of that it should not be blocked, just a little indicator that this clip is in there twice.

For split sections of clip, can’t it be just renamed with a number by the time order, like example.mp4 should be example 1.mp4, example 2.mp4 and so on. It shouldn’t be considered as duplicate.

So from what I understand a playlist is basically a very simple form of timeline, whereas a media bin is a file management thing. So the argument to add a warning in the playlist is pointless. Rather there should be a media bin tab separately that has those specific features.

1 Like

I am open for any kind of solution. Even though I consider a media bin to be an additional step, it could work when the media bin then gives in an easy way and indication if a clip is already used.

Then I could add all clips in a folder to the media bin multiple times. There will be no duplicates, but only new files will be added and the indicator could tell me then which are not yet used (the new ones).

Quick thing, even premiere pro doesn’t warn for duplicate in media bin.

The suggestion should be changed to giving a option to delete duplicates, not warn if added.

Design Proposal

  • A duplicate is only when it is the same file, and the in and out points are the same (most sub-clips will not trigger this). “file” is determined by a hash that Shotcut already generates automatically for each file based on its contents. That means it can identify the same file with a different name or path.
  • Add a new menu item in the Playlist (hamburger) menu button: Find Duplicates. You are able to add a custom keyboard shortcut for this in the usual designated place for this.
  • If no duplicates are found, show a status message (in the center next to the player tabs where we show all status messages): No duplicates found.
  • If there is only 1 duplicate show a dialog:
    • Title: Playlist Duplicate
    • Message: The file {file name without path} is duplicated in the Playlist. Do you want to remove the second one?
    • Buttons: Yes or No
  • If there are more than 1 show a dialog:
    • Title: Playlist Duplicates
    • Message: Select the duplicates you want to keep:
    • A list of unique file names and un-selected checkboxes (looks similar to hardware encoder config)
      image
    • Buttons: OK and Cancel
    • If OK, for each un-selected file name, remove every redundant playlist item (based on its hash code and in & out points).

Hello Dan,

First of all thanks a lot for your efforts to create the design proposal!

To do it with a manual requested check will work for me. I could then add all relevant files from my folders and let shortcut remove all the duplicates. So all the new ones are added and I don’t miss a clip.

In case of several duplicates, assuming there are three times duplicates with each two identical playlist items: will then all six show up or only the three duplicates (like in your example with only one playlist items)?

Ah, I have made a reasoning error. If a clip was already adjusted (In/Out markers) the same file won’t appear as duplicate.

A duplicate like you have described will only happen if you manually copy and paste the same clip, but not when you add a new file to the playlist (assuming all existing ones in the playlist have been marked In/Out already).

Design Addendum

Add a Playlist an opt-in setting Automatically Check For Duplicates that reuses all of the above logic and triggers when adding anything to the playlist except:

  1. It limits the scope to only the files being added.
  2. It does not show a status message about no duplicates.

I think the combination covers all of the angles:

  • works to check existing projects
  • integrates with a workflow
  • does not impose itself if you do not want it
2 Likes

But will it only work with the hash, so the combination of file and In/Out?

BUMP about the hash.

Ignore my comment about the hash because that might be confusing. I already stated the definition of duplicate that you can re-read it. Keep in mind that even an unedited clip has an implied in and out point equal to the beginning and end of the clip. Otherwise, I do not understand your questions, which suggests that this design might not be what you ultimately want.

I am afraid this could be the case.

I would like to see if I have used a clip twice in the playlist. I change In/Out of most of the clips, so when In/Out is considered and the same clip is added, then this clip is not marked as a duplicate.

It sounds like you want:

A duplicate playlist item is when it comes from the same file, regardless of in and out points.

It is because of this statement…

…but maybe you changed it already.

You did not confirm my last comment and only continue to make things confusing.

“Clip” is an overloaded term and should be avoided for clarity and accuracy. For example, it can simply be a block on the timeline or a playlist item and not necessarily backed by a file as in a “color clip” or “text clip.”

I tried to clearly define “duplicate playlist item” two different ways with no clear yes or no answer from you. Define “duplicate playlist item” without using the words “clip” or “hash.”

I would like to see if I have used the same source file more than once in the playlist. Does this help?

Yes! Thank you