#!/usr/bin/env bash # take in mp4, take screenshot at given interval, output same filename but with jpg extension FILE="$1" NEWFILE="${FILE%.mp4}.jpg" INTERVAL=$2 echo "file - $FILE" ffmpeg -y -i $FILE -f mjpeg -vframes 1 -ss $INTERVAL $NEWFILE