@echo off
setlocal
cd /d "%~dp0"
set "PYTHON_EXE="
set "PYTHON_ARGS="
if exist "%~dp0..\runtime\python\python.exe" set "PYTHON_EXE=%~dp0..\runtime\python\python.exe"
if "%PYTHON_EXE%"=="" where py >nul 2>nul && set "PYTHON_EXE=py" && set "PYTHON_ARGS=-3"
if "%PYTHON_EXE%"=="" where python >nul 2>nul && set "PYTHON_EXE=python"
if "%PYTHON_EXE%"=="" (
  echo Python runtime was not found.
  exit /b 1
)
"%PYTHON_EXE%" %PYTHON_ARGS% -c "import imageio_ffmpeg, cv2" >nul 2>nul || (
  echo Built-in helper dependencies are not available.
  exit /b 1
)
"%PYTHON_EXE%" %PYTHON_ARGS% "%~dp0qda_local_video_helper.py"
