Categories:
  🠪  General

Email
  🠪  Servers
  🠪  Testing
  🠪  Tips

Hardware
  🠪  3D Printing
  🠪  Apple
  🠪  Batteries
  🠪  Drives
  🠪  Edgerouter
  🠪  Electronics
  🠪  Laptop
  🠪  Modems
  🠪  Phone
  🠪  Printers
  🠪  Raspberry Pi
  🠪  Tablets
  🠪  Testing
  🠪  Virtualization

hidden
  🠪  General

Links
  🠪  Interesting
  🠪  Media

Network
  🠪  Data
  🠪  Testing
  🠪  VPN

Scripts
  🠪  Batch
  🠪  Linux
  🠪  Powershell

Servers
  🠪  Databases
  🠪  Misc
  🠪  Website

Software
  🠪  Other

Utilities
  🠪  Backup
  🠪  Fix Issues
  🠪  Recovery

Video
  🠪  Editing

Websites
  🠪  HTML
  🠪  Testing

Windows
  🠪  Adjustments
  🠪  Issues
  🠪  Remote Desktop
  🠪  Security
  🠪  Slow
  🠪  Software
  🠪  Startup

Submit Entry
Airin's Notes

Category: Scripts 🠪 Batch
Handbrake Batch File to convert passed folders/files
November 27, 2023

@echo off

REM Loop through each argument (dragged item)
:loop
if "%~1"=="" goto end

REM Create a directory for the current item
mkdir "D:\video\temp\%~n1"

FOR /F "tokens=*" %%G IN ('DIR "%~1" /B /S /A:-d') do (
FOR /F "tokens=*" %%H IN ('DIR "%%G" /B /A:-d') do (
"C:\Program Files\Handbrake\HandBrakeCLI" -i "%%G" --optimize -o "D:\video\temp\%~n1\%%~nH.mp4" -e nvenc_h265 -q 26 --cfr --aencoder av_aac --verbose=1
)
)

REM Shift arguments to process the next item
shift
goto loop

:end
pause


Thanks to Dave for this script: https://www.youtube.com/watch?v=dJJpCxoNgoM


Keywords: Handbrake, batch, convert, mpeg




This site is meant to be used as a reference for myself, although others may find it useful. I use it to keep track of certain fixes, software, and other solutions which I may need while assisting customers. The page layout is pure HTML/CSS and is kept simple to optimize loading time and fast results.

Return to Airin's Computers