I'm attempting to extract stacks of .png files from short 20-second videos of zebrafish hearts for ImageJ heartbeat analysis.
So far, this code,
ffmpeg -i C:\example_directory\filename.movS -r 30/1 C:\example_directory\filename_%04d.png
works quite well. However, this can only be run for one video file at a time, and outputs to one folder at a time.
I have a bit of code that converts multiple .mp4 videos into .mov:
for i in *.mp4; do ffmpeg -i "$i" -qscale 0 "$(basename"$i" .mp4)".mov ; done
is there a way to use a for loop or some kind of batch or .sh file to automate the .png extraction from a large group of short videos, say, a twenty or so videos?
I'm trying to write instructions to streamline the video and image processing for future lab students, so it might be helpful to know if there are differences in automating this for macOS, linux, or Windows 10
any advice is welcome!
thanks