[RELEASE] Quick Thumbnail Generator Tool (for Linux, Mac, and Windows) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116) +--- Thread: [RELEASE] Quick Thumbnail Generator Tool (for Linux, Mac, and Windows) (/showthread.php?tid=50535) |
[RELEASE] Quick Thumbnail Generator Tool (for Linux, Mac, and Windows) - webmosher - 2009-05-08 Hello, Disclaimers This may not be for everyone, but its a quick and dirty way of generating thumbnails on a large collection without alot of hassle (at least once its setup). This solution might be bit technical, so if the instructions look overwhelming, you might want to wait until thumbnails are added to MIP or another tool. This original code is a PERL script, so for Linux it does need Perl. I have rolled up the script into a prepackaged EXE for Windows. This should work for most Windows systems. I tested on XP, but not specifically in Vista. There might be some UAC issues with Vista, but I think it should work okay. Features To use this tool, you should be using a folder structure for your files. It will be pretty useless otherwise. This isn't really a limitation of the tool, but the Aeon skin for example looks for the thumbs in a directory relative to the movie folder. The program is designed to be a one shot script to pull thumbnails from virtually any movie file and batch the images to the right locations. Bold are new with version 1.2
Download: http://www.mediafire.com/file/mfgygujrjen/thumber-1.2.zip Some Issues:
Requirements for Linux: If you're using Linux, I am kind of assuming you know what you're doing. If alot of Linux folk need additional help on these requirements, just let me know (PM) or reply in thread and I will try to help. I have tested this on an Ubuntu server install (8.04LTS) as well as XP.
Everything should be pre-packaged, but you will need a zip utility to unpack the files. For Windows users, I have packaged these requirements in a single file to aid with usage. I have also rolled up the script into a Windows executable. There isn't an installer though, so you're on your own for unpackaging and use. Installation & Usage: LINUX: Put the "thumber" script in your path (I usually use $HOME/bin), ensure FFMPEG, MediaInfo and Imagemagick are installed. Run the program by changing to the folder you want to scan, or add the path to the end of the command and it will use that path instead. NOTE: You do not need the tools directory or the thumber.exe for Linux. WINDOWS: Extract the file to a folder of your choice. The main program is "thumber.exe". The alternate file "thumber" is the base Perl code. For general use, you should be able to drag a folder to the program file. NOTE: The program only accepts one folder, so if you drag multiple ones, it will only process the first one. If many users have problems with using the command line options, I might write some batch wrappers for this. The source code for Windows is separate and included in the "src" directory. The program accepts command line options as well as using the config file. Command line options always override the config value. To get help on the command line options, run the program as follows: Code: thumber -h I expect a few people might have issues, so I am happy to help however I can. Hope this helps... - paul - 2009-05-08 It works great once i figured it out nice work on this it will save me hours of work creating thumbs by hand - azido - 2009-05-08 webmosher Wrote:Hello, i can tell you it works in vista x64 without a problem.. UAC should only be a problem when trying to add files to system-secured directories. pretty easy, this is really useful to just fill in those extrathumbs without any intervention, and later, when there is some time left, one can browse through and select which thumbs should be placed to position 1 and 2 for displaying in aeon. thank you for this, i like it. i might now change back from my poster mod by hitcher to display extrathumbs again edit: some movies had bad thumbs as you mentioned, but when using default 9 thumbs per movie, one can be sure there are at least 2 useful ones to display in aeon - Rad_ - 2009-05-08 Ah, interesting. You can't just define one of the height/width overrides. I ran it using a smaller width assuming it would scale the height accordingly, but such is not the case.... It made my funny-looking images really quickly, though. And the content is pretty good. I'm impressed! Thanks tons for this.... Edit: Actually, two more things.... 1. It crashed on me, citing division of zero on line 226. Which brings me to: 2. Why letterbox? The actual dimensions are available to the script, so it wouldn't be too much more complicated to just always crop to a 16:9 image, right? Take the height value, calculate what the width would be to take up the whole frame Aeon is looking for (height*16/9), then crop that out of the center of the frame.... That way all the images are of a uniform size. It's maybe less than ideal for preserving perfect images, but if we're running a batch script in the first place, then it's a safe assumption that we're okay with a few compromises, right? Maybe make it a special switch: perl thumber -u activates "uniform" mode, or something, and then we're opting into the aspect ratio issues.... Did you try this and reject it based on the results already? I'll try to dig into the code and try it for myself, but I'm assuming it would take you minutes to my couple hours of trial and error.... - phoenx97 - 2009-05-08 Works great on for me on Windows 7 x64. I think dimensions both have to be even for this to work (at least when I tried), but that isn't a problem if you aren't changing that I just ran thumber.exe -x960 -y540 d:\movies and everything worked out fine Lanczos would be nice, maybe using imagemagick? Save image as original resolution, then process/resize with imagemagick using lanczos if downsampling, bicubic if upscaling to the user-defined resolution (or default). Not sure how hard that would be (or even worth it), only a suggestion. - Hitcher - 2009-05-08 Worked great for me, thanks. Any chance of it not creating the 'extrathumbs' folder if it doesn't find a video file only I've stuck it in the root of my movies (they're in separate folders) and each time I run it creates one in the root.? - diemos - 2009-05-08 will try out this weekend, Thanks. - JuiceZ - 2009-05-09 Also works great for me, thanks! - Steve_McQueen - 2009-05-09 webmosher Wrote:.mp4? Some are also using .divx and .xvid. - woopdeedoo - 2009-05-09 Took me a while to figure it out, because i alread had empty Extrathumb Folders in my Movie Folders and the program therefore wouldnt create any thumbs, but once i deleted them everything worked great! - webmosher - 2009-05-10 Thanks much for trying out this tool. Based on the comments already, I have prepared some fixes for the program. I am currently in the process of testing these issues, and when I am done, I will update the main post with the new link. I really cannot release this quite yet, as one of the new features has been pretty unstable, so I want to make sure it works well before I put it in the wild. New Features Planned
Stuff I am still working on... I experimented a bit with using image magick to do blur detection, resizing and so forth. This is not integrated into the program yet, but might be later this week. Thanks again. - hotlobster - 2009-05-10 Really cool script. Thanks mate. Works almost perfect on my linux 32 bit with svn ffmpeg. Just had a hang in the script when it reached a movie with a $ character in the movie name and folder.: Ca$h.avi You could add .m2ts video extension too. Your script is already placed in my crontab now Keep up the good work boss. - neurosis13 - 2009-05-11 this is a cool script and also should be sticked. All the good things might get lost. New users might never seem them. We need sticky threads for the mods and tools for aeon. - ccMatrix - 2009-05-11 Would it be possible to specify a separate output folder? I like having my movies and meta data separate and then virtually merge them with symlinks into a folder that is actually parsed by XBMC. This way I have a folder with only movies when I, or anyone else in the family, use a different media player. thanks - paul - 2009-05-12 Hi webmosher. great program but i have found a problem it will not create thumbs for .vob files or .mp4 and it wont do the ones i encoded to 720p using divx encoder version 7 i even tried changing the extension from .divx to .avi i also tried the .mp4's and .vob to .mpeg .mpg and still no joy. but it does work with .avi's with lower resolutions so i am stuck doing half of my collection by hand. any ideas would be helpfull thanks |