echo current dir:%~dp0
rem 批量压缩分辨率
set w=640
set h=480
set ex0="mkv"
set ex1="mp4"
mkdir "%~dp0%w%_%h%"
for %%a in ("%~dp0*.%ex0%") do ffmpeg -threads 2 -hwaccel dxva2 -i "%%a" -vcodec h264_nvenc -vf scale=%w%:%h% -preset fast -maxrate 500k -r 25 -c:a aac "%~dp0%w%_%h%\%%~na.%ex1%"
pause
标签:bat,set,ffmpeg,批量,%%,w%,windows10,h%
From: https://www.cnblogs.com/wei-huan/p/17063409.html