CHnge this so it works with an array of input folders.
the output folders should be named automatically
@echo off
setlocal enabledelayedexpansion
rem Set the directory containing the videos
set “input_folder=\wsl.localhost\Ubuntu\home\ulc\monolith\act_01\ACT_01-ANDI_01-CENTER”
set “output_folder=\wsl.localhost\Ubuntu\home\ulc\monolith\act_01\ACT_01-ANDI_01-CENTER\LowRes”
rem Create output folder if it doesn’t exist
if not exist “!output_folder!” mkdir “!output_folder!”
rem Loop through each video file in the input folder
for %%f in (“%input_folder%*.mp4”) do (
rem Get the filename without extension
set “filename=%%~nf”
rem Define input and output paths
set "output_file=!output_folder!\!filename!.mp4"
rem Run ffmpeg to convert the video to 1280x720
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i "!input_file!" -c:a copy -c:v h264_nvenc -cq:v 30 -vf "scale_cuda=1280:720, fps=30" "!output_file!"
)
echo Conversion complete!
pause