FFMPEG – High-Interest Video Thumbnails

  • ffmpeg is capable of measuring the difference between every scene,
    and you may specify you want the difference to be above/below some rate to include that thumbnail.
  • black/white/uni-color screens are common as a transition, and are not a “problem”, we should generate quite a lot of thumbnails, and storing them as JPG (loosely format), which has very high compression rate for uni-color images, web can sort the images by size (later) and just remove that below 1kb images.
  • the same issue can also be addressed by performing quite large jumps into the movie, which in-turn also generate a more story-line variety.
  • Just Good Business:
    – Keeping thumbnails small enough, undistorted (in ratio) can be easily achieved by limiting the width to 200 pixels, together with height-ratio matching and smart-cropping, this way, in-image is mostly undisrupted, cropped without missing important-ingredient and provide unified size.
    – zero-padded output file name can help with sorting on older systems that might sort 10.jpg right after 1.jpg in normal cases (Windows XP/NT and below).
ffmpeg -ss 100 -i my_movie.mp4 -vf "select=gt(scene\,0.1)" -frames:v 50 -filter:v scale=200:-1,crop=iw:ih*0.8,fps=1/10 out%04d.jpg

for example this ~4minutes YouTube Video:

Continue reading