#!/usr/bin/env bash
# Redact the runtime-selection badge in the captured 2560x1600 resume videos.
# Arguments: SIDE INPUT OUTPUT. Run one ffmpeg process at a time.
set -eu
case "$1" in
 base) box='drawbox=x=1010:y=386:w=340:h=76:color=0xdddddd:t=fill' ;;
 head) box='drawbox=x=1010:y=482:w=340:h=76:color=0xdddddd:t=fill:enable=gte(t\,54)' ;;
 *) exit 1 ;;
esac
ffmpeg -v error -i "$2" -vf "$box" -an -c:v libx264 -preset fast -crf 20 -pix_fmt yuv420p -map_metadata -1 "$3"
