Picture of Gary Ritchie
Manually generate thumbnails?
by Gary Ritchie - Tuesday, 14 April 2015, 7:05 PM
 

I've just enabled ffmpeg, but only after I already uploaded a few assets. Is there a command I can run to force thumbnail generation on all assets so that they all have thumbnails? 

Picture of Brian Quinn
Re: Manually generate thumbnails?
by Brian Quinn - Wednesday, 15 April 2015, 1:22 PM
 

Hi Gary,

There's no code in the builder itself to generate missing thumbnails.  You could use ffmpeg via the command line to accomplish this though.  If it's only a few assets, it might be an option to run this individually.  For something more, you could probably script it.

The documentation is here:
https://www.ffmpeg.org/ffmpeg.html

All thumbnails take the format originalfilename_thumb.png.

Regards,

Brian

Picture of Gary Ritchie
Re: Manually generate thumbnails?
by Gary Ritchie - Wednesday, 15 April 2015, 2:05 PM
 

That sounds like something I can handle. Thanks for the tip, Brian.

Cheers,

Gary

Picture of Gary Ritchie
Re: Manually generate thumbnails?
by Gary Ritchie - Wednesday, 15 April 2015, 4:58 PM
 

For others who might find this, I ended up using ImageMagick for the jpeg thumbs with this:

find . -regextype sed -regex ".*/[a-z0-9]*\.jpg" -exec convert {} -thumbnail 266x200 {}_thumb.jpg \;

within the adapt_authoring/data/master/assets/ folder.

A bit more tedious was editing each database record in the assets Collection (using Robomongo as I'm not yet comfortable working with mongo on the commandline).