Last active
September 7, 2023 05:18
-
-
Save nkint/8563954 to your computer and use it in GitHub Desktop.
ffmpeg in the shell: extracting the first frame of video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i=1 | |
for avi in *.mp4; do | |
name=`echo $avi | cut -f1 -d'.'` | |
jpg_ext='.jpg' | |
echo "$i": extracting the first frame of the video "$avi" into "$name$jpg_ext" | |
ffmpeg -loglevel panic -i $avi -vframes 1 -f image2 "$name$jpg_ext" | |
i=$((i+1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment