Skip to content

Instantly share code, notes, and snippets.

@keima
Last active September 29, 2021 13:11
Show Gist options
  • Save keima/1cc8239a88031fe4d4ecc8ac1da17298 to your computer and use it in GitHub Desktop.
Save keima/1cc8239a88031fe4d4ecc8ac1da17298 to your computer and use it in GitHub Desktop.
@echo off
setlocal enabledelayedexpansion
echo %*
for %%f in (%*) do (
set FILE_INPUT=%%~f
set FILE_OUTPUT=%%~dpf%%~nf_encode.m4v
echo input: !FILE_INPUT!
echo output: !FILE_OUTPUT!
@REM "h265 cpu cq27" preset is required or modify prefered preset name
HandBrakeCLI.exe ^
--preset-import-gui ^
--preset "h265 cpu cq27" ^
--maxHeight 720 ^
-i "!FILE_INPUT!" ^
-o "!FILE_OUTPUT!"
echo *** DONE !FILE_OUTPUT! ***
)
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment