Add Avisynth video encoding workflow

This commit is contained in:
ajp_anton
2026-07-21 00:41:00 +00:00
parent f50f465465
commit 49296d6f45
37 changed files with 9487 additions and 76 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -euo pipefail
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
include_dir="${AVISYNTH_INCLUDE_DIR:-}"
if [[ -z "$include_dir" ]]; then
for candidate in \
/tmp/media_batch_avisynth/avisynthplus/avs_core/include \
/tmp/media_batch_avisynth/install/include/avisynth
do
if [[ -f "$candidate/avisynth_c.h" ]]; then
include_dir="$candidate"
break
fi
done
fi
if [[ -z "$include_dir" || ! -f "$include_dir/avisynth_c.h" ]]; then
echo "Could not find avisynth_c.h." >&2
echo "Set AVISYNTH_INCLUDE_DIR to an AviSynth+ include directory." >&2
exit 1
fi
build_one() {
local cc="$1"
local output="$2"
if ! command -v "$cc" >/dev/null 2>&1; then
echo "Skipping $output; $cc not found." >&2
return 0
fi
"$cc" -I"$include_dir" -O2 -Wall -Wextra \
-o "$script_dir/$output" "$script_dir/mbt_avs_runner.c"
echo "built $script_dir/$output"
}
build_one "${WIN64_CC:-x86_64-w64-mingw32-gcc}" mbt_avs_runner.exe
build_one "${WIN32_CC:-i686-w64-mingw32-gcc}" mbt_avs_runner32.exe