Posted: 28 December 2023. At: 9:21 AM. This was 6 months ago. Post ID: 18976
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

How make a nice contact sheet of a movie with FFmpeg.

Making a nice contact sheet of a movie is not too hard, this is a great way to show off interesting scenes in a film. This is using a very nice one-liner.

Bash
ffmpeg -hide_banner -v 32 -stats -y -i mymovie.mkv -vf "drawtext=timecode='00\:00\:00\:00':r=25:x=(w-tw)/2: y=(2*lh):fontsize=64:fontcolor=black:box=1:boxcolor=0xFFFFFFFF@1,scale=iw/4:-4:out_range=full:sws_flags=spline:sws_dither=0,select='gt(scene\,0.25)',tile=2x2" -vsync 0 preview_%03d.png

Creating a set of nice 4×4 images with good-quality screenshots of the key scenes in the film.

Below is what you get, a lot of images that are 4×4 contact sheets of the movie.

This version will create nice 8×8 contact sheets, this looks very good as well.

Bash
ffmpeg -hide_banner -v 32 -stats -y -i Oppenheimer.2023.1080p.Bluray.REMUX.AVC.DTS-HD.MA.5.1-GHD.mkv -vf "drawtext=timecode='00\:00\:00\:00':r=25:x=(w-tw)/2: y=(2*lh):fontsize=64:fontcolor=black:box=1:boxcolor=0xFFFFFFFF@1,scale=iw/4:-4:out_range=full:sws_flags=spline:sws_dither=0,select='gt(scene\,0.25)',tile=8x8" -vsync 0 preview_%03d.png

This does put the timestamp at the top of each screenshot as well. This is a very good solution for this task.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.