

Vsync vfr is used to make sure that the images are different. The command above selects only frames that have more than 40% changes compared to the previous frames and generate 5 unique PNGs. A low value means that it is less likely for the current frame to be a new scene while a high value means that it is likely to be one.

The value of scene should be between 0 and 1. Depending on the content of the video, you need to tweak this value to find the best threshold. Select=gt(scene\,0.4) selects frames that have more than 40% scene change compared to the previous frames. The basic command to capture a frame from the video using FFmpeg is:įfmpeg -i input.mp4 -vf "select=gt(scene\,0.4)" -frames:v 5 -vsync vfr frames-diff-%02d.png We will be using this video for this tutorial to showcase how different FFmpeg commands work. For reference, the version of FFmpeg used in this tutorial is v5.0.1. You will need to download FFmpeg for this tutorial to add a thumbnail to your video file. In this tutorial, we will be using the FFmpeg command-line tool. It contains multiple tools for end-users to convert, play and analyze media files and libraries for developers to use in different applications. It is also highly portable as it compiles and runs in a wide variety of build environments, machine architectures, and configurations like Linux, Mac OS X, Microsoft Windows, etc. It can decode, encode, transcode, mux, demux, stream, filter and play pretty much any media file in any format. In this tutorial, I'm going to show you how to add a custom thumbnail to your video file and use Bannerbear to auto-generate text for it so that your video will look like this on a website:įFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It makes people WANT to watch your video. A good thumbnail image highlights the content of your video and makes it stands out.

A video thumbnail is a still image that acts as the preview image for your video.
