Skip to content

Instantly share code, notes, and snippets.

@Sid3y1
Created August 29, 2017 10:45
Show Gist options
  • Save Sid3y1/9da55c56bb6faaa298dc8974ed7ec5c3 to your computer and use it in GitHub Desktop.
Save Sid3y1/9da55c56bb6faaa298dc8974ed7ec5c3 to your computer and use it in GitHub Desktop.
get pictures from movie with ffmpeg
find . -name "*.MOV" | while read movie;do
# ffmpeg -i "$movie" -f flv "${movie%.mov}.flv"
echo $movie
dir=`dirname "$movie"`
fn=`basename "$movie"`
mkdir -p "_images/$dir"
#ffmpeg -i "$movie" -vf fps=1 "_images/$dir/${fn}_%3d.jpg"
#ffmpeg -i "./Cinéma/H44A4224.MOV" -vf "select='eq(not(mod(n\,100))*pict_type,PICT_TYPE_I)'" -vsync vfr "_images/./Cinéma/H44A4224.MOV_%3d.png"
echo "ffmpeg -i \"$movie\" -vf \"select='eq(not(mod(n\,100))*pict_type,PICT_TYPE_I)'\" -vsync vfr \"_images/$dir/${fn}_%3d.jpg\""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment