extractframes
extractframes copied to clipboard
about batch input
Hello, it's a great honor to see your project of extracting video frames, this will play a big role in most of my research. But in the process of doing it, a problem appeared how to input a folder, that is, batch video input, and then output the frames of batch video, I look forward to your answer, thank you!
Hi, I hope it can be helpful! Unfortunately it does not directly support taking multiple video inputs at once.
My suggestion would be to work around this problem by running extractframes once per video, and then renaming all the files at the end. For example:
extract.py ../first.avi vid01_frame%04d.jpg
extract.py ../second.avi vid02_frame%04d.jpg
extract.py ../third.avi vid03_frame%04d.jpg
ls | sort | nl -v 0 -n rz | while read new_frame file_name; do mv -i $file_name out_$new_frame.jpg; done
(other suggestions for how to do the last step could be found here: https://stackoverflow.com/questions/3211595/renaming-files-in-a-folder-to-sequential-numbers )
Hope this helps!