(EDIT: sorted this out, thanks everyone, ffmpeg can do everything)

I'm thinking of writing a rust script to create an anki deck given a video file and a subtitle track.

One thing I'm not sure I should do, is how do I get a snapshot from a video file?

Does anyone know a good way to do this?

The script will go through all the timestamps in the provided subtitle file and take screenshots.

#tech #techsupport #SoftwareDev #rust

@sashin just tested based on https://stackoverflow.com/questions/27568254/how-to-extract-1-screenshot-for-a-video-with-ffmpeg-at-a-given-time to grab a frame from a video I had handy:

ffmpeg -ss: 12:34.5 -i foo.mov -frames:v 1 -q:v 2 output.jpg

How to extract 1 screenshot for a video with ffmpeg at a given time?

There are many tutorials and stuff showing how to extract multiple screenshots from a video using ffmpeg. You set -r and you can even start a certain amount in. But I just want 1 screenshot at, s...

Stack Overflow