Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Most Efficient Way to Create Thumbnails?

I have a huge volume of thumbnailing to do. Currently, I am using ImageMagick, but it's proving too inefficient (it's too slow, uses too much CPU/memory, etc.).

I have started to evaluate GraphicsMagick, which I expected to get "wow" results from. I didn't get them. Can someone take a quick look at my benchmark script (does simple speed and file size comparison only; no CPU and memory checks yet):

http://pastebin.com/2gP7Eaxc

Here's a sample output I got:

'gm convert' took 75.0039 seconds to execute 10 iteration(s).
'convert' took 83.1421 seconds to execute 10 iteration(s).
Average filesize of gm convert: 144,588 bytes.
Average filesize of convert: 81,194 bytes. 

GraphicsMagick is not that much faster -- and the outputted file sizes are SIGNIFICANTLY higher than ImageMagick.

like image 788
StackOverflowNewbie Avatar asked Sep 15 '10 22:09

StackOverflowNewbie


People also ask

What kind of thumbnails get the most clicks?

Emotions drive people's behavior and choices. Video marketing statistics show that videos with emotional thumbnails get more clicks than those without. When creating your video thumbnails, you should give them a personal touch to capture your audience's attention.

Is 1920x1080 good for thumbnails?

Q. 2 Can a YouTube Thumbnail be 1920x1080? Ans: Yes your YouTube thumbnail can be 1920x1080, but your image may look pixelated and this may affect your video playback on YouTube. So it is recommended that you stick to the 1280x720p dimensions.


1 Answers

I assume you have some sort of queue of images that require thumbs and your app works through them? You could look at siphoning off some of the work to something like EC2. If your queue gets over a certain size fire up a pre-prepared EC2 instance to process the load instead. You could even fire up several machines if the queue was massive.

You don't need these instances to run all the time - you only need them when your own server isn't able to handle the load.

Obviously you'd need to forecast your costs to see if it was worth it but given you only pay for the time you use and the prices start at 8.5c/hour it might be economical enough for your needs.

like image 154
rojoca Avatar answered Nov 09 '22 22:11

rojoca