#!/usr/bin/env bash
set -euo pipefail
# Redact the unrelated local CLI path in Settings; preserve all updater UI.
source=$1
target=$2
mkdir -p "$target"
convert "$source/result.png" -fill '#555555' -draw 'rectangle 398,321 568,338' "$target/result.png"
ffmpeg -y -i "$source/stall.mp4" -vf 'drawbox=x=398:y=321:w=170:h=17:color=0x555555:t=fill' -c:v libx264 -crf 23 -preset fast -pix_fmt yuv420p "$target/recording.mp4" > "$target/encoding.log" 2>&1
