2009-03-06, 20:34
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_creat...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:
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.
Here is the original wiki article:
http://wiki.xbmc.org/?title=HOW-TO_creat...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"
for /r %%i in (*.mpg) do IF NOT EXIST "%%~di%%~pi%%~ni.tbn" ffmpeg -i "%%i" -f mjpeg -t 0.001 -ss 115 -y "%%~di%%~pi%%~ni.tbn"
for /r %%i in (*.mpeg) do IF NOT EXIST "%%~di%%~pi%%~ni.tbn" ffmpeg -i "%%i" -f mjpeg -t 0.001 -ss 115 -y "%%~di%%~pi%%~ni.tbn"
for /r %%i in (*.rm) do IF NOT EXIST "%%~di%%~pi%%~ni.tbn" ffmpeg -i "%%i" -f mjpeg -t 0.001 -ss 115 -y "%%~di%%~pi%%~ni.tbn"
for /r %%i in (*.h264) do IF NOT EXIST "%%~di%%~pi%%~ni.tbn" ffmpeg -i "%%i" -f mjpeg -t 0.001 -ss 115 -y "%%~di%%~pi%%~ni.tbn"
for /r %%i in (*.flv) do IF NOT EXIST "%%~di%%~pi%%~ni.tbn" ffmpeg -i "%%i" -f mjpeg -t 0.001 -ss 115 -y "%%~di%%~pi%%~ni.tbn"
for /r %%i in (*.mov) 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.