Crossplatform (Perl) ".tbn" to "-big.png" Script
#1
As many of you know, due to a limitation with the current builds of XBMC, Aeon Stark can only display higher-quality renders of thumbnail files by creating separate (duplicate) thumbnail file of a different name. Unfortunately this can take a long time to do manually if you have a large movie library.

My buddy Bitwize has written a Perl script for me and asked that I share it with the community. Hitcher and fekker beat us to the punch, but their program is Windows-only and seems to have some issues with libraries that don't separate each movie in a separate subdirectory. Here is a Perl script that should be cross-platform (Windows, Linux, Mac) to accomplish the same thing and work regardless of your library's file/directory structure.

aeon_embiggen.pl will now only require a path to your parent video directory and do the following:
  1. Recursively search for all video file types that XBMC recognizes
  2. Search for appropriately named ".tbn" files in the same location as any found video files
  3. Copy the ".tbn" file to a new "-big.png" file.

You can merely run the script to have it prompt you to enter the path of the video library, or pass the file list as an argument.

Script Download and Prerequisites
aeon_embiggen.pl (1.1)
You must have a Perl interpreter installed to run this script. Ubuntu Linux and Mac OSX should already have one by default, but Windows machines will require an installation. I recommend ActivePerl.

Windows Guide
Interactive Mode
[LIST=2]
[*]Double-click aeon_enbiggen.pl (or right-click and open with ActivePerl)
[*]The script will prompt you for a file path; if the script is in the video library directory yourself then you can just type a period and press Enter, otherwise you will need to type the full path to the video library
[*]The script will scan and output all of its findings while performing the copies
[*]DONE!
[/LIST]

Batch Mode
[LIST=3]
[*]Open up a command prompt (Start->Run, type cmd, hit enter)
[*]Navigate to the location where you saved the script
[*]Run the following command if the script is in the video library directory:
Code:
perl aeon_embiggen.pl .
Don't forget the period at the end of the command, this tells the script to search in the current directory.

Run the following command if the script is elsewhere:
Quote:perl aeon_embiggen.pl PATH
where PATH is the full path to the video library directory
[*]DONE!
[/LIST]

Check to see if the new png files have been created and named correctly.

Ubuntu Linux Guide
*Script now fixed*
  1. Start the Terminal from Applications->Accessories->Terminal and cd to where you saved the script
  2. Run the script with the following command:
    Code:
    perl aeon_embiggen.pl PATH
    where PATH is the full path to your video library directory (you can just use a period if the script is run from the video library directory itself)
  3. FINISHED!
Check to make sure the new thumbnails were created successfully.

Please post any bugs or suggestions.
Reply
#2
Thx rickatnight11. I'll give it a try tonight. Definatly prefer a command line script for this task over a gui.

brockoli
Reply
#3
amm wouldnt it be easier to pipe the output of find to xargs?
Reply
#4
motyR Wrote:amm wouldnt it be easier to pipe the output of find to xargs?
Normally I'd say yes, but in the case of multi-part videos I would like to take a look at what the script will be touching first. No worries, though, the automated script is coming in a few minutes.
Reply
#5
Updated first post to version 1.0, the automated version of the script.
Reply
#6
Fixed Ubuntu issue. Should work fine on Unix-based systems now.
Reply

Logout Mark Read Team Forum Stats Members Help
Crossplatform (Perl) ".tbn" to "-big.png" Script0