Skip to content

Instantly share code, notes, and snippets.

@acarabott
Created March 26, 2017 17:37
Show Gist options
  • Save acarabott/dffa21d450b5d32da27e82133044d2bc to your computer and use it in GitHub Desktop.
Save acarabott/dffa21d450b5d32da27e82133044d2bc to your computer and use it in GitHub Desktop.
extract stills using ffmpeg
function getstills {
if [[ ! -z $1 ]]; then
OUT=${2:-.}
START=${3:-00:00:00}
DUR=${4:-99:59:59}
ffmpeg -skip_frame nokey -i $1 -vsync vfr -ss $START -t $DUR "$OUT/still-%02d.png"
else
echo "usage: getstills FILENAME START (hh:mm:ss) DURATION OUTPUT_PATH";
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment