Last active
November 8, 2022 16:29
-
-
Save fnx4/8fc315608f7ec8e4020b0ae6ef47afad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
@setlocal enableextensions enabledelayedexpansion | |
set exclude=_COMPRESSED_ | |
for /f "tokens=*" %%a in ('dir . /b') do ( | |
set fname=%%~na | |
set ext=%%~xa | |
if !ext!==.mp4 ( | |
echo !fname!!ext! | |
echo.!fname! | findstr /C:"!exclude!">nul && ( | |
echo skip: !fname! | |
) || ( | |
echo compressing... | |
ffmpeg -i "!fname!!ext!" -c:v hevc_nvenc "%exclude%!fname!!ext!" -hide_banner -n | |
rem ffmpeg -i "!fname!!ext!" -c:v av1_nvenc -preset p7 -tune hq -pix_fmt yuv420p -g 60 -b:v 8M "%exclude%!fname!!ext!" -hide_banner -n | |
) | |
echo. | |
) | |
) | |
echo.DONE | |
endlocal | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment