Generating Tumbs from a batch file - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: Generating Tumbs from a batch file (/showthread.php?tid=46513) |
Generating Thumbs from a batch file - arkryal - 2009-03-06 I know this has been discussed before and exists in part on the wiki page. However, I found that the method described on the wiki page was incomplete, instructing people to run a command from the command line every time they wished to update their thumbnails. More over, the command didn't bother to check if a thumbnail already exists before creating a new file. If, like me you have thousands of TV episodes saved and want a thumbnail for each of them, running that command again can take hours to re-do a lot of unnecessary work. Here is the original wiki article: http://wiki.xbmc.org/?title=HOW-TO_create_video-preview_thumbnails_manually_on_a_computer Following those instructions (with FFMpeg), you can also create a batch file to do the work for you. Create a new text document and save it as "MakeThumb.bat" Now, copy and paste the following lines: Code: for /r %%i in (*.avi) do IF NOT EXIST "%%~di%%~pi%%~ni.tbn" ffmpeg -i "%%i" -f mjpeg -t 0.001 -ss 115 -y "%%~di%%~pi%%~ni.tbn" Save the file and place it along with FFMpeg's executable and dll files in the root directory who's contents you would like to have thumbnails. Now run as you update your files or schedule for regular scans. The fist run will take a while, however, each time you run it after that should take significantly less time. This is much faster. You can also add additional file containers (.avi, mpg etc.) just copy any line and change the file type to one you would like to add. As long as FFMpeg knows what it is, it will work just fine. P.S. I know my batch file lacks elegance, it's a copy and paste job, don't be too harsh, it's just meant to work. I'll think about optimization later if needed. - spiff - 2009-03-06 hey, nice update. why dontcha do the update in the wiki so it doesnt get lost in here? - arkryal - 2009-03-06 Tried to add it to the wiki, but page protection prevents me from editing. Only a moderator can make the changes. - spiff - 2009-03-06 wiki user name? (read the front page of the wiki..) |