@echo off
set inDir=.\in
set outDir=.\out
if not exist %inDir% goto :eof
for /r %%i in (%inDir%\*.mp4) do set video=%%~ni& call :convert
goto :eof
:convert
if not exist %outDir% md %outDir%
ffmpeg -threads 0 -i %inDir%\%video%.mp4 -vcodec libx264 -crf 28 -an -tune zerolatency -movflags +faststart %outDir%\%video%.mp4