[FFmpeg-user] Optimal method to capture both metadata and thumbnails for video files

Pavan Kulkarni pavanvkbgm at gmail.com
Wed Jul 11 12:07:45 CEST 2012

> i was able to get the other metadata information such as width, height etc
> from stdout o/p of ffmpeg command. So I was pleased that two processes (one
> for collecting metadata and one for generating thumbnail) have been
> combined into one until I realized that to seek to a particular point and
> grab the thumbnail, I need to know the total duration of the video. This
> duration metadata field I was hoping to read from the o/p of thumbnail
> generation command (kind of a chicken and egg). Command below:
*./ffmpeg -ss 18  -i football.mp4 -vf select='eq\(pict_type\,PICT_TYPE_I)'
-vframes 1 -an -s 150x100 thumb.jpg*
Does anyone know of a way to grab a thumbnail using ffmpeg without having
to seek to know the duration before hand?

Carl suggested yesterday  a basic command on the latest ffmpeg version. It
worked alright for .ts files but gave a black thumbnail for .mp4 files.
* ./ffmpeg -i Pirates_remux_short.ts thumphd.jpg *

 Note: I'm trying it out on MIPS

More information about the ffmpeg-user mailing list