Archive:Create video-preview thumbnails manually: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>DonJ
No edit summary
>Sumanthjv
m (Added instructions for Linux.)
Line 18: Line 18:
for /r %i in (*.avi) do ffmpeg -i "%i" -f mjpeg -t 0.001 -ss 5 -y "%~di%~pi%~ni.tbn"
for /r %i in (*.avi) do ffmpeg -i "%i" -f mjpeg -t 0.001 -ss 5 -y "%~di%~pi%~ni.tbn"
</pre>
</pre>
To create thumbnails on a Linux box, the following command can be used
<pre>
find . -iname '*.avi' -exec sh -c 'ffmpeg -i "$1" -f mjpeg -t 0.001 -ss 60 -y "`echo "$1" | sed -e 's/avi$/tbn/'`"' '{}' '{}' \;
</pre>
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.
[[category:How To]]
[[category:How To]]

Revision as of 21:17, 19 February 2007

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

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).

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 . -iname '*.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.