2

I have ffmpeg command line that creates thumbnail image from a video. This works nicely as I can choose the timestamp and the size of the image that I want.

-r 1 -t 1 -ss 2 -s cga "%2/%32.jpg"

This option in the command creates the image.

Now I am moving to use HandbrakeCLI for conversion. But I am stuck with this thumbnail generation.

How do I achieve this with HandbrakeCLI so that when I am converting video to MP$, I also generate one\more thumbnails of a given size and timestamp?

1 Answer 1

2

Handbrake doesn't provide a thumbnail/screenshot option as far as I know (nor does a quick search of its source code from github yield anything for "thumbnail" or "screenshot"). I run Handbrake CLI to generate MP4s, then separately generate thumbnails after the fact with ffmpeg. Given that you're already using the CLI, one more command call to ffmpeg should be pretty simple.

I autogenerate multiple thumbnails (for use in sprites) then manually select the best image as a cover thumbnail:

#e.g. generate thumbnail every 45th second
ffmpeg -i ../archive/myvideofile.mp4 -f image2 -bt 20M -vf fps=1/45 thumbs/myfile%03d.jpg

I resize with additional command line utilities - you can see the workflow I use here to get an idea in case that's helpful: https://stackoverflow.com/questions/20022006/generate-all-the-files-vtt-sprite-for-the-tooltip-thumbnails-options-of-jwp/20713276#20713276

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .