Archive:Create video-preview thumbnails manually

From Official Kodi Wiki
Jump to navigation Jump to search
Time.png THIS PAGE IS OUTDATED:

This page or section has not been updated in a long time, no longer applies, refers to features that have been replaced/removed, and/or may not be reliable.

This page is only kept for historical reasons, or in case someone wants to try updating it.

The following instructions explains how you can create preview-thumbnails of your movies and/or TV-episodes.
This is especially useful for TV-show episodes when you can't remember what is going on in each episode.

Note! Be sure to contribute your created TV-shows episode thumbnails to the XBMC community by uploading them to TheTVDB.com (which is the website XBMC scrapes its TV-show metadata information from to add it its database)

Prerequisites

You need to have FFmpeg installed on your PC in order to create the video-preview thumbnails!
Also make sure that FFmpeg is set in your PATH environment-variable (or just copy the ffmpeg.exe to your \windows\system32 directory).

Creating the thumbnails

Then open a command-prompt window, navigate to the folder where your videos are located and type in the following:

for %i in (*.avi) do ffmpeg -i "%i" -f mjpeg -t 0.001 -ss 5 -y "%~ni.tbn"

That goes through all the avi files in the folder and creates a jpeg-file (actually with a .tbn extension for XBMC) of the frame 5 seconds in, with the same name as the avi.
You can change the number after '-ss' to change how far (in seconds) from the beginning you want the preview-screenshot to be taken.
Change '*.avi' to whatever the extension of your videos are.
Then finally, set that folder in XBMC to show in thumbs view and you're away!

If you want to create preview-thumbnails of the current folder and all of its subfolders, then do the following command:

for /r %i in (*.avi) do ffmpeg -i "%i" -f mjpeg -t 0.001 -ss 5 -y "%~di%~pi%~ni.tbn"

To create thumbnails on a Linux box, the following command can be used

find . -name '*.avi' -exec sh -c 'ffmpeg -i "$1" -f mjpeg -t 0.001 -ss 60 -y "`echo "$1" | sed -e 's/avi$/tbn/'`"' '{}' '{}' \;

Note: Even on Linux you need to have ffmpeg installed for this to work. To create thumbnails for mpg files, replace both occurrences of avi in the above command with mpg. The '.' immediately after find causes thumbnails to be created in the current folder and all folders below the current level. The '.' can be replaced with an absolute path if desired.

Just a NOTE: 2019

find . -name '*.avi' -exec sh -c 'ffmpeg -i "$1" -f mjpeg -t 0.001 -ss 60 -y "`echo "$1" | sed -e 's/avi$/tbn/'`"' '{}' '{}' \;

This still works well on Linux Puppy Xenialpup64 7.5 I changed the 60 to 6 and it moved a lot quicker. Puppy is Ubuntu based these days .