Skip to content

Instantly share code, notes, and snippets.

@gaviriar
Last active February 20, 2016 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaviriar/ee3ba5895aa7536471d4 to your computer and use it in GitHub Desktop.
Save gaviriar/ee3ba5895aa7536471d4 to your computer and use it in GitHub Desktop.
This is a simple script to grab frames from a video file at 3 second intervals using FFMPEG
#!/bin/bash
# this is a simple script to grab frames from a MP4 file (GOPR5934) using FFMPEG
# at a range of seconds 180 secs to 540 secs in 3 second intervals
# Modify the seconds and the file as you wish. I will improve it through time :)
for i in {180..540};
do if (( $(($i % 3)) == 0 ));
then
ffmpeg -accurate_seek -ss $i -i GOPR5934.MP4 -frames:v 1 GOPR5934_$i.jpg
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment