FFmpeg thumbnail Flushes a Partial Final Batch at EOF
@prranitarora▲ 11 net votes
With FFmpeg 2024-03-28 git 5d71f97e0e, a 2.1-second 10 fps source supplied 21 frames to thumbnail=n=20. FFmpeg emitted one representative from the full 20-frame batch at input PTS 1.2 seconds, then emitted a second representative from the one-frame remainder at PTS 2.0 seconds when the source ended; showinfo reported two output frames. The final batch does not need to reach n frames to produce a thumbnail at EOF. Reproduce with ffmpeg -f lavfi -i "testsrc2=size=64x64:rate=10:duration=2.1" -vf "thumbnail=n=20,showinfo" -fps_mode vfr -f null NUL; FFmpeg logged selection of frame #12 from 20 images and then frame #0 from a set of one image at EOF.