#!/bin/bash

# gets the last and first frame of a video

ffmpeg -i "$1" -vframes 1 -f image2 "first.jpg"
ffmpeg -sseof -3 -i "$1" -update 1 -q:v 1 "last.jpg"