Computing: Computer Basics

Multimedia: Setting a custom thumbnail for MP4 video files.

If you want so, you can skip the first paragraphs of the tutorial (that contain some theoretical information about thumbnails).

If you open a folder in Windows File Explorer, the files that it contains may globally be displayed in three ways: a list (file names), a detailed list (filename, date modified, file type, and file size; sometimes some extra columns, depending on the folder content, such as the length for video files), or icons (small pictures). On modern Windows systems, these icons are of two kinds:

It is obvious that in the case of PDF files, File Explorer can generate the thumbnail by extracting the information to create the picture directly from the file. MP3 files not only contain audio data, but also other information, in particular data describing the audio. This data is stored as so called MP3 tags. In the Windows Music Library, the values of tags like "Artist", "Album", "Track #" and "Title" are used as standard columns in Details view of File Explorer. The thumbnail displayed in Icons view is a picture stored as tag "Album Cover" within the MP3 file. This actually means that if the "Album Cover" tag is not set, the default music application icon will be displayed instead of the thumbnail. So far, so good, but where come the thumbnails of MP4 video files from?

MPEG-4 Part 14 or MP4 is a digital multimedia container format most commonly used to store video and audio. Beside the video itself, an MP4 file contains supplementary information, called metadata, in particular descriptive information about the video such as the video title, the movie genre, the year when it was released, etc. As for MP3, this information may be set by the user in File Explorer (right-click the file and choose Properties, then in the File Properties window, open the Details tab to edit the video title, the movie genre, etc). And similarly to MP3, the MP4 metadata may include a picture. To be honest, I do not really know how all this works in practice. For some of my videos, the application icon of VLC Player (my default video player) is displayed; this means that this video does not include a thumbnail picture and that Windows does not automatically generate one if there isn't related information available in the MP4 file. So, I suppose that if File Explorer displays a picture, the information to generate it must be stored in the file, as a part of the metadata. As we will see further down in the text, advanced MP4 tag editors allow not only to set the value of the video title, the movie genre, etc, but also at add a picture, stored as the value of a tag called "Cover". However, most of the videos that you download from the Internet will show as a thumbnail in File Explorer (the picture corresponding to some frame of the video), often without that the "Cover" tag is set! Where do those thumbnails come from? No idea...

Note: I said above that the thumbnails are generated by File Explorer. In fact, this is normally done only once. The thumbnail being known by Windows, it is stored in the so-called thumbnail cache. Beginning with Windows Vista, thumbnail previews are stored in a centralized location on the system. This provides the system with access to images independent of their location, and addresses issues with the locality of these Thumbs.db files. The cache is stored at %userprofile%\AppData\Local\Microsoft\Windows\Explorer as a number of files with the label thumbcache_xxx.db (numbered by size), as well as an index used to find thumbnails in each sized database. This does of course speed up the display of the folder content. But, it also means that there is an entry in the thumbnail databases for each thumbnail ever displayed on your computer, including the thumbnails of videos, pictures and other files that are not meant to be seen by other people than yourself. It is possible to display the thumbnails stored in the cache, using an application like Thumbcache Viewer. The simplest way to completely clean up the thumbnail cache is to include "Thumbnails" in the list of the files to be deleted when performing a Disk cleanup.

After all this theoretical stuff, lets see how to do to set or to change the thumbnail for an MP4 video file. "Why should I do this?", you may ask. There are several good reasons:

The same way that you need a third party application to set or change the album cover of an MP3 file, you need specialized software to set or change the thumbnail of an MP4. I tried out Tag Editor, that you can download free of charge from the GitHub website. The download archive (the version that I do use) contains 3 files: the application, the corresponding command line program, and a text file with the license description.

You can adapt the application to your needs and preferences by changing one of the numerous options in Settings (the screenshot shows the "General" tab of the "Tag Processing" settings). Here are the options that I did change: preservation of the modification time, setting the directory for temporary files and backups on my Work partition, adding the video rating and the duration to the default fields to be displayed.

Tag Editor: Adapt the application settings to your needs and preferences

The screenshot below shows the MP4 file containing the Jet Li movie "Kiss of the Dragon" and the official video cover of this movie as JPG file (I downloaded this file from some Internet site, renamed it and changed the size to 200×300 pixels). As you can see, the thumbnail shows "nothing at all" about the movie content, and it would be really nice to replace it with the cover picture.

Windows explorer: MP4 video file (original thumbnail) and video cover as JPG file

To open a file in Tag Editor, browse the folder structure in the File Selection pane; when expanding a folder that contains MP4 files, these are shown there and you can select them, and this will open them within the application. When I opened "Kiss of the Dragon", I was surprised that the "Cover" tag was empty (no picture there). As I said above, MP4 files may have a thumbnail image, even though the "Cover" tag is not set; no idea where the information to generate this thumbnail comes from.

Tag Editor: MP4 video file with empty 'Cover' tag (no picture)

If the "Cover" tag were set (if there were a picture), we could use the Remove button to clear it, then the Add button to set it to our video cover JPG file. When I first used the application, I wondered how I had to proceed in the case, where there is no image displayed in Tag Editor, but a thumbnail displayed in File Explorer. How could I remove the original thumbnail? What of the two thumbnails would be used if I simply added the video cover? I don't know where the information of the original thumbnail is stored, nor what happens with it when you add another picture as "Cover" tag. Not really important to know, I guess, because as you will see, I got exactly what I wanted. So, push the Add button, and browse to the JPG file that you want to use as thumbnail. In the "Select a picture to add as cover" window, select the file and push the Open button.

Tag Editor: Select the video cover (JPG file) to set the 'Cover' tag to

Tag Editor will ask you to confirm the addition of a MIME type image/jpeg file, then the file will be added: The picture (in our case, the "Kiss of the Dragon" video cover) will be displayed in the "Cover" field of the application.

Tag Editor: MP4 video file with 'Cover' tag set (JPG picture)

Now, lets have a look in the application's working directory. There are three files there now: the original MP4 (renamed by Tag Editor, adding ".1" to the file name), the JPG picture and the new MP4 with the "Kiss of the Dragon" video cover as thumbnail. Not exactly. The thumbnail generated by File Explorer includes, beside the picture that we added as "Cover" in Tag Editor, an orange-white striped cone (as does the original thumbnail). This actually is the application icon of VLC player (that, on my system, is the default application to open MP4 and other video files).

Tag Editor: The original and modified MP4 video files in Windows File Explorer

If you find this text helpful, please, support me and this website by signing my guestbook.