ffmpeg windows10 批量转格式 .bat批处理文件
echo current dir:%~dp0
rem 批量压缩分辨率
set w=720
set h=544
set ex0="mkv"
set ex1="mp4"
mkdir "%~dp0%w%_%h%"
for %%a in ("%~dp0*.%ex0%") do ffmpeg -threads 4 -hwaccel dxva2 -i "%%a" -map 0:v:0 -map 0:a:1 -map 0:s:0 -vcodec h264_nvenc -c:a aac -c:s mov_text -vf scale=%w%:%h% -preset fast -maxrate 500k -r 25 "%~dp0%w%_%h%\%%~na.%ex1%"
pause