Kodi Community Forum
HOW-TO create video preview thumbnails automatically - 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: HOW-TO create video preview thumbnails automatically (/showthread.php?tid=29699)

Pages: 1 2 3 4


HOW-TO create video preview thumbnails automatically - Calmiche - 2007-11-15

Okay, I just found out about one of these and the other one I wrote. If you have seen them before, then don't complain. They are new to me.

---------------------------------------
Creating XBMC Thumbnails Automatically
---------------------------------------

I wanted to have thumbnails for all my television episodes. (All my episodes are on my windows PC, sheared over my network.) Instead of downloading each file individually, I found a tip on the XBMC wiki page.

http://www.xboxmediacenter.com/wiki/index.php?title=HOW-TO:_Create_video-preview_thumbnails

1. Download this file:
http://ffdshow.faireal.net/mirror/ffmpeg/ffmpeg.rev10908.7z

2. Extract that file (Including the DLL) into your \\Windows\System32 folder.

3. Open up a command prompt window in the root folder of your television shows and then type this command

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

You can replace the (*.avi) with different file formats, including mp4, divx, rmvb, ogm and rm.

This will open up your episodes, skip 5 seconds in, take a screen shot, rename it to *.tbn and then go to the next file. It will also do any sub folder.

---------------------------------------
Seeing *.tbn files in Windows Explorer
---------------------------------------

I bet that you know that you can go into a folder in Windows XP, switch to Thumbnail view, and be presented with an icon of the first screen from a movie. It works for images as well. Unfortunately, it doesn't work for *.tbn files. Until now, that is.

1. Create a new text document.

2. Paste the following block of text into it.

REGEDIT4

[HKEY_CLASSES_ROOT\.tbn\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{3F30C968-480A-4C6C-862D-EFC0897BB84B}"

3. Rename the file so that the extension is .reg (I named mine "tbn thumbnails.reg")

4. Double-click the file and you are all set. Windows XP will now see TBN thumbnails as images and create a windows thumbnail for them. You can see them in your folders on your computer.


- jaredharley - 2007-11-15

Well done! I'm going to have to try this out, it looks awesome!

Also, thanks for the .tbn preview in Windows.


- jaredharley - 2007-11-16

jaredharley Wrote:Well done! I'm going to have to try this out, it looks awesome!

Also, thanks for the .tbn preview in Windows.

Both are awesome! Thanks!


TheTVDB - Gamester17 - 2007-11-16

Remember to share your thumbnails with others by uploading them to http://www.thetvdb.com

TheTVDB is the database and scraper that XBMC uses and it is wiki based.

By the users, for the users Wink


- sickboy719 - 2007-11-16

Very nice, thank you.
I've been using Frameshots to make my thumbs, I'll give yours a go and see how it works.


- HarshReality - 2007-11-16

Wasnt this in the wiki? Well I know I saw it but I guess its been removed.


- jaredharley - 2007-11-16

Quote:Wasnt this in the wiki? Well I know I saw it but I guess its been removed.

No, it's still there, Calmiche linked to it in his post. I've been all over the wiki and had never come across this tip.

Calmiche Wrote:Instead of downloading each file individually, I found a tip on the XBMC wiki page.

http://www.xboxmediacenter.com/wiki/index.php?title=HOW-TO:_Create_video-preview_thumbnails



- HarshReality - 2007-11-16

I tried it for a time and worked great... 6 seasons of smallville etc. but after a time just got to be bothersom.


- jaredharley - 2007-11-16

HarshReality Wrote:I tried it for a time and worked great... 6 seasons of smallville etc. but after a time just got to be bothersom.

The command Calmiche uses
Code:
for /r %i in (*.avi) do ffmpeg -i "%i" -f mjpeg -t 0.001 -ss 5 -y "%~di%~pi%~ni.tbn"
does a recursive scan on folders. If you've got a directory called "TV Shows", you could simply navigate to that folder in a cmd window, and then run the command. It will look in all folders and sub-folders for video files matching the parameters (in this case, .avi files).

I can see how it would get irritating to do this with each new episode you download (or create, however you get them). Now that I've done the initial work, I plan on only doing it when a season is complete.


- cayotic - 2007-11-17

I saw the first tutorial before but I couldn't exicute it for whatever reason so I went with frameshots. I'll try it again, as far as the tbn viewer is concerned, I don't think it works in vista, can someone else confirm. I'll try it on my main XP server where I'm sure it will work...

Thanks,


- jaredharley - 2007-11-17

cayotic Wrote:I saw the first tutorial before but I couldn't exicute it for whatever reason so I went with frameshots. I'll try it again, as far as the tbn viewer is concerned, I don't think it works in vista, can someone else confirm. I'll try it on my main XP server where I'm sure it will work...

Thanks,

Vista's registry is just a little bit different. Place the below code into a normal text file, and save as a .reg file (should have the little blue cube of blocks icon).
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.tbn\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{3F30C968-480A-4C6C-862D-EFC0897BB84B}"
This does work on Vista.

As for the screenshot creator - you have to have all 3 of the linked files in the c:\windows\system32 folder. Then, in a cmd window, navigate to the folder with your tv shows (ie, type in: cd d:\tv shows) and then you can use the command he mentioned. If you copied it off of the post, you can right-click and choose "paste" to paste the text into the cmd window (you can't use ctrl+v).


- Gamester17 - 2007-11-20

Feel free to update the WIKI article if needed http://xboxmediacenter.com/wiki/index.php?title=HOW-TO:_Create_video-preview_thumbnails Wink

Quote:All users who wish to continue providing a valid contribution to the XBox Media Center online manual, please contact one of the XBMC team members and ask for Ninja status on the wiki.
http://xboxmediacenter.com/wiki/index.php?title=Main_Page


- jaredharley - 2007-11-20

Gamester17 Wrote:Feel free to update the WIKI article if needed http://xboxmediacenter.com/wiki/index.php?title=HOW-TO:_Create_video-preview_thumbnails Wink

http://xboxmediacenter.com/wiki/index.php?title=Main_Page

I'd need ninja status for that.... pretty please?


- DrDDT - 2007-11-21

I added an 'if exist' to the batch file so it can run scheduled for automatic run every day.

Does anybody know how to nest the for loop so I can check several root folders in one line?

I now use:

Code:
@echo off

setlocal
set FFMPEG=f:\tools\ffmpeg\ffmpeg.exe
set THUMB="%%~di%%~pi%%~ni.tbn"
set MAKETHUMB=%FFMPEG% -i "%%i" -f mjpeg -t 0.001 -ss 5 -y %THUMB%

set FILES="*.avi"
set DIRS=m:\media\series i:\media\series

for /r  m:\media\series %%i in ( %FILES% ) do if not exist %THUMB% %MAKETHUMB%
for /r  i:\media\series %%i in ( %FILES% ) do if not exist %THUMB% %MAKETHUMB%
endlocal

I'd like to merge the two for loops and make use of the DIRS variable.


- Gamester17 - 2007-12-12

FYI; this was added to the Linux port branch of XBMC late yesterday:
Quote:extract frame from video files without thumb. experimental.
Let's hope this feature gets ported back to the Xbox trunk as well Wink