Skip to content

Instantly share code, notes, and snippets.

@benatwork
Created July 11, 2012 14:37
Show Gist options
  • Save benatwork/3090791 to your computer and use it in GitHub Desktop.
Save benatwork/3090791 to your computer and use it in GitHub Desktop.
ffmpeg bash script to generate thumbnails for all videos in a folder
for f in *.mov; do ffmpeg -y -i "$f" -f image2 -ss 10 -vframes 1 -an "${f%.mov}.jpg"; done
@mezcalf
Copy link

mezcalf commented Apr 15, 2015

for subdirectories:
find . -name "*.mp4" -type f -execdir sh -c 'ffmpeg -y -i "$0" -ss 10 -vframes 1 "${0%.mp4}.jpg"' {} ;

@Flavien06
Copy link

Hi, for subdirectories I have

find: missing argument to `-execdir'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment