(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 Potentially mpv could do this?
@chiraag Good point, I'll look into this!

@sashin @chiraag

#ffmpeg!!

Maybe a combo of these two options?

#ffmpeg extract frames: ffmpeg -i file.mpg -r 1/1 frames%03d.png #ffmpeg trim a video ffmpeg -ss 00:00:00 -to 00:02:00 -i input.mp4 -c copy output.mp4
MPV-screenshots/mpv-screenshots.sh at master · Kcchouette/MPV-screenshots

Take screenshots using MPV software. Contribute to Kcchouette/MPV-screenshots development by creating an account on GitHub.

GitHub