Jump to content


Resize Images

Image AutoIt FFMpeg Resize

  • Please log in to reply
1 reply to this topic

#1 Nologic OFFLINE  


    Advanced Member

  • Members
  • 98 posts
  • Local time: 09:16 PM

Posted 07 February 2016 - 05:45 PM


I had noticed that my Images for People, had grown to over 22gigs...and thought that was a bit excessive, so I wrote this script & after running it those images came in under 3gigs, and as a result I'm a happy camper now. :)



The Folders this script is to run against must be on ether a local or network mapped drive, as the script isn't setup to handle UNC paths.

This script doesn't scale up images...only scales down.







Install AutoIt and set it to execute scripts when double clicked.


Create a folder somewhere...lets call it "Resize Images" just to be unimaginative.


Now inside "Resize Images" create a sub folder called "Bin".


Now extract the contents of FFMpeg's "Bin" folder into your new "Bin" sub folder.


Now going back into "Resize Images" folder Right Click on it's background and select "New\AutoIt v3 Script" from the context menu, and Rename it "Resize Images.au3"


Now Right Click "Resize Images.au3" & select "Edit Script" from the context menu.


Now paste the following code into:



Now you'll have to edit some User Vars to make use of this script on your system. Now in my example use of People images...older versions of Emby used "folder.jpg" however newer ones are making use of "poster.jpg" so you may need to run it twice with different naming.


Next you'll have to give the script the path to the images you wish to resize, then the max Width & Height for the images.


Finally the path to FFMpeg...normally I'd have this set automatically to the Bin folder holding the script...but I'm getting a lot of scripts depending on FFMpeg...so I'm allowing you to set the path...so you really only have 1 copy on your system...or at least 1 less do to this script allowing you to set it to a different location.


Now save the script & execute it by double clicking it.


Now go do something else, this will take a while.


The script will notify you when it's done.

Edited by Nologic, 23 February 2016 - 05:33 AM.

  • Luke likes this

#2 Nologic OFFLINE  


    Advanced Member

  • Members
  • 98 posts
  • Local time: 09:16 PM

Posted 07 February 2016 - 06:39 PM

Okay took another wack at this, this time looking to run concurrent image resize...to help speed things along.


The recommended setting is equal to the number of physical cores your CPU has...in my case since my Ivy has 4...I set it to 4, to keep the system usable...anything above would likely hose the system.


This takes two scripts to make this work, I call this "Resize Images Master.au3" & "Resize Images Slave.au3" both are used the same way as the original.


Here is the master script.



Now the Slave


Edited by Nologic, 23 February 2016 - 05:37 AM.

Also tagged with one or more of these keywords: Image, AutoIt, FFMpeg, Resize

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users