#!/usr/bin/env bash set -euo pipefail # Defaults tuned for screen recordings ENCODER="vt_h264" # vt_h264, vt_h265, vt_h265_10bit QUALITY=20 # Lower = better quality (and larger file) FRAMERATE="" # Empty -> same as source; e.g. 30 to force 30 fps usage() { cat <&2 [ -f "$out" ] && rm -f "$out" fi } have_files=false for ext in "${EXTENSIONS[@]}"; do for file in "$INPUT_DIR"/*."$ext"; do if [ ! -f "$file" ]; then continue fi have_files=true process_file "$file" done done if [ "$have_files" = false ]; then echo "No matching video files found in current directory." fi echo "Done."