Make separate thumbnails of video files

Date: 21 Nov, 2012
Posted by: admin
In: hints & tips|linux, open source & software|pictures, music, video: multimedia

Bookmark and Share

Digikam can’t yet store metadata in video files so instead one can create a thumbnail file and store the metadata in that. Digikam uses exiv2 and this feature is apparently imminent. Here’s my find command to create a bordered thumbnail image:

find . -iregex ".*\.\(mov\|avi\|mpg\|mp4\|mpeg\)$" -fprint0 ~/find-video-thumb-$(date +%s).log -exec convert '{}[2]' -bordercolor Red -border 10%x0 '{}_video-thumb.jpg' \;

Add more extensions if you need them. This find command searches from the current directory for movie files, creates a log in your home of files found, uses convert from ImageMagick to make a JPEG of the second frame, and adds a red border of 10% width and zero height. The resultant JPEG is named for the original file with “_video-thumb.jpg” at the end.

You then have to use Digikam to copy over the metadata ensuring that your preferences are set to put the data in to the .jpg and not simply to keep it in Digikam’s sqlite database.

exiftool -Keywords -Title -Caption -Description -S ./

is useful for checking that image metadata has been written.

No Responses to "Make separate thumbnails of video files"

Comments are closed.


About

Flapjacktastic is just a random collection of musings, hints&tips, notes, information ... a collection of stuff really that's overflowed from the brain of this husband, father, potter, business-man, geek ...

past posts