#!/usr/bin/env bash

input_file="$1"

if [[ "$input_file" = "" ]]; then
    echo "Error: file missing."
    echo -n "Please drag&drop a file: "
    read input_file
fi

if [[ ! -f "$input_file" ]]; then
    echo "Error: '$input_file' is not a file."
    exit 1
fi

ffmpeg -i "$input_file" -f framemd5 "${input_file}_md5.txt"
