Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I use gframecatcher to generate thumbnail video galleries, i.e. something like this:

enter image description here

However this is a GUI tool and I want to create recursively a gallery for every video in a directory structure, so I am looking for a fast command line tool to do this.

share|improve this question

3 Answers 3

up vote 6 down vote accepted

Pull out the image captures (these are 100 pixels tall, and keep aspect ratio), the rate (-r) is per-second (this yields one frame every ~5 minutes), this also adds time stamp to output image.

ffmpeg  -i MOVIE.mp4 -r 0.0033 -vf scale=-1:120 -vcodec png capture-%002d.png

Then use ImageMagick to build your gallery image:

montage -title "Movie Name\nSubtitle" -geometry +4+4 capture*.png output.png
share|improve this answer
    
You can use fractions for the rate (-r). This makes it easier and more accurate to specify times. 5min = 300 seconds ffmpeg -i MOVIE.mp4 -r 1/300 -vf scale=-1:120 -vcodec png capture-%02d.png. –  DutGRIFF May 13 at 18:28

The 'imagemagick' package has utilities for stuff like this.

http://www.imagemagick.org/Usage/thumbnails/

There are API libraries using imagemajick for a bunch of languages too.

share|improve this answer
    
What would be the corresponding command? –  student Feb 5 '13 at 11:50
    
convert is probably the most general one. Look at the section headed General Thumbnail Creation on the first page I linked to. –  goldilocks Feb 5 '13 at 14:20

This one seems to fit the bill, it's free and open source and even works on Windows :)

It even has advanced stuff, like instead of blindly picking any frame at the particular interval, it can pick ones that are close enough but don't look too blurry, so instead of doing this:

screenshot

You can pass it a parameter (-D6) so it does this:

better screenshot

Plus I really like no borders, so that the images can be slightly bigger.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.