I have a need to generate a thumbnail for videos for a web application and I am currently doing that with this command:
ffmpeg -ss <seconds> -i <input file> -vframes 1 -y <output file>
Pretty basic, and does the job. But, of course, sometimes the frames aren't very "interesting".
For example, sometimes the video has faded to black as the scene changes, or it could be something which is somewhat boring like credits rolling or similar.
I need some sort of algorithmic way to extract something interesting from the video and essentially filter out the boring bits.
Is there anything in FFmpeg that might be able to make this easier?
If not, then I will need to collect a number of frames and process them outside of FFmpeg; likely using PHP. As a side note, if anyone has any existing code that does this, it would be super helpful!
Many thanks