Is there a way to refresh the thumbnails in the timeline after replacing original files?

Hi. In the folder where I store all of the elements that I want to put in a video, if I replace a file with a different file but keep the same filename, the new file replaces the element in the video. However, the thumbnail for that element does not change. Is there a way to refresh the thumbnails in the timeline?

Some context on why I am inquiring about this rather than deleting the element from the playlist and timeline: I have placed static images (.png files) in a second video track. The images are callouts for things that are happening in the underlying video playing in the first video track. The callouts all have the same color scheme. I realized, after putting lots of callouts in the new track, that I wanted to change the color of all of the callouts, so, I just replaced the files in the folder from which the images are taken and the new images show up in the video, however, the thumbnails in the timeline have not updated. It would be a pain to redo all the filters for all of the images in the timeline.

I believe that all of the thumbnails are stored in the database in %LOCALAPPDATA%\Meltytech\Shotcut. If I just delete that folder will the database re-initialize? I don’t want to delete that folder for fear of messing up my newly created video and mlt file.

An alternative I am considering is copying all of my files to another computer and installing shotcut. I figure on startup, shotcut will create a new database with new images. But, perhaps that would be the same as deleting the database file.

Thanks for any help on this.
Cheers!!

2 Likes

I had an issue of a similar type.
I moved project to another computer and had to edit mlt file to change path to location where clips were stored (as same disk letter was not available on new computer).
I did few mistakes initially while editing and first time project had opened with errors. Then I fixed those mistakes and finally project has opened normally without any issues, however half clips were shown OK in the library and half clips had white boxes instead of their thumbnails. Rest was ok, I was able to preview project normally etc, just thumbnails had gone which was quite annoying. I tried everything I could: copied clips again, applied “reset” in clip properties etc, even fully deleted and reinstalled shotcut - nothing helped.
Finally I found your post and tried what you suggested, i.e. completely deleted Meltytech folder in %LOCALAPPDATA% and that fixed the issue - when I loaded same project again, everything was ok.
If you are afraid to loose something, I think you can back-up folder first, i.e. instead of deleting it, just rename to “Meltytech_backup” for example and see what happens - it seems program will just recreate it with all content.
All project data seem to be stored in .mlt file so it shall not be affected.
It would be good to know though exact folder name/path where thumbnails are stored, to be able to delete only them.

2 Likes

I had the same issue as BlackSerge (moving a project from one computer to another resulted in no thumbnail images). I used the suggestion from don and it worked perfectly. Thanks!

1 Like

Not sure if y’all follow the github issue tracker for shotcut or not, but i opened an issue about this here Basically looking at the source of shotcut from what i understand the thumbnails are generated on import of the media file, however if the original file is changed the thumbnail is not updated. thus i believe when you delete the folder / directory you described above it regenerates the thumbnails based on another part of the source where shotcut looks for the thumbnails and can’t find them so it regenerates them from the media files, and if the original media file has changed, thus the new thumbnail. Ideally shotcut would have an update action that could be called from within the app itself would call either of said functions to update thumbnails upon a $USER request, or when shotcut first launches, basically following the CRUD model of software design.

I poked around a couple of folders similar to the ones you described and I wasn’t positive if the thumbnails are stored in the SQLite database itself or if the SQLite references an external thumbnail somewhere on the filesystem, however there is a table for thumbnails contained within the shotcut SQLite DB.

Either way, thanks for the tip. :+1: I’ll definitely use when I need to update thumbnails for a project.

Since you mentioned SQLite, I got curious and opened the database file, too. As you said, there is a thumbnails table in the database which has a blob (Binary Large OBject) field called “image”, which contains the thumbnail image itself in PNG format. There are no references to external files on the filesystem. It is self-contained. If you open the database with “DB Browser for SQLite”, you can even view the image contained in the blob field.

In light of this, the proper way to clear the Shotcut thumbnail cache is to delete this file:
%LOCALAPPDATA%\Meltytech\Shotcut\db.sqlite3

Do NOT delete other files or folders in the Meltytech or Shotcut folder! If you do, you will lose your export presets, your auto-save data, and your filter presets.

The database also has a “hash” field, which in theory should be able to detect when the new source file is no longer the same as the thumbnail’s original source file, and could regenerate a thumbnail accordingly. However, in practice, some of my source files are >80GB in size (each) and it would take forever to hash them just to see if thumbnails needed updating. That’s a waste of time and disk I/O. @shotcut, if it doesn’t already, what if Shotcut built the hash on the first megabyte and last megabyte of the source file concatenated together? It might be a “good enough” hash check for a file modification without burning tons of disk I/O. Maybe it does this already… I didn’t look at the source code yet…