Skip to content

Instantly share code, notes, and snippets.

@mariogarcia-ar
Forked from nkint/gist:8563954
Created August 10, 2021 17:19
Show Gist options
  • Save mariogarcia-ar/58d073d126e4bd896ce860e4eee682b2 to your computer and use it in GitHub Desktop.
Save mariogarcia-ar/58d073d126e4bd896ce860e4eee682b2 to your computer and use it in GitHub Desktop.
ffmpeg in the shell: extracting the first frame of video
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