@echo off
:: set paths (no quotes)
set ffmpeg=ffmpeg.exe

@echo.
@echo on
for %%f in (*.mp4) do MD "%%~dpnf" && "%ffmpeg%" -y ^
  -hide_banner ^
  -i "%%~dpnxf" ^
  -vsync passthrough ^
  -vf "scale=sws_flags=lanczos:in_color_matrix=bt709,format=yuv444p" ^
  -f image2 ^
  %%~dpnf\%%06d.png
@echo off
if errorlevel 1 pause
@echo.