Since 2016 · 50,000+ customers · ★ 5.0 on Google Live chatWhatsAppTelegramOpen a ticket
Get started
Windows Server

How to Use HandBrakeCLI on Windows Server (with Examples)

How to use HandBrakeCLI on Windows Server guide by 99RDP

HandBrake is the best-known free video converter, and its command-line version, HandBrakeCLI, is ideal for servers: no GUI to click through, easy to script, and perfect for converting whole folders overnight on a Windows VPS or dedicated server. This guide shows how to install HandBrakeCLI on Windows Server, the commands you'll use most, ready-to-use examples, and a PowerShell script for batch conversion.

Quick answer

HandBrakeCLI.exe -i "input.mkv" -o "output.mp4" --preset "Fast 1080p30"

That converts a video to MP4 (H.264 + AAC) with HandBrake's standard 1080p preset.

Steps to use HandBrakeCLI on Windows Server: download, extract, run with a preset, check the output
Using HandBrakeCLI

Step 1: Download and install HandBrakeCLI

  1. Go to the official site, handbrake.fr, open Downloads → Other → Command Line Version, and download the Windows x86_64 ZIP. (The current stable series is 1.11, released in 2026.)
  2. Extract it to a folder such as C:\Tools\HandBrakeCLI. There's no installer; HandBrakeCLI.exe is self-contained.
  3. Add the folder to the PATH so you can run it from anywhere:
    [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Tools\HandBrakeCLI", "Machine")
    Open a new PowerShell window afterwards.
  4. Check it works:
    HandBrakeCLI.exe --version

If you use Chocolatey, choco install handbrake-cli does the same. Unlike the HandBrake GUI, the CLI doesn't need the .NET Desktop Runtime.

Step 2: Learn the basic options

OptionWhat it does
-i, --inputSource file (or DVD/Blu-ray folder)
-o, --outputOutput file; the extension sets the container (.mp4, .mkv, .webm)
-Z, --presetUse a built-in preset, e.g. "Fast 1080p30"
-z, --preset-listList all built-in presets
-e, --encoderVideo encoder: x264, x265, svt_av1, nvenc_h264, qsv_h264 …
-q, --qualityConstant quality (lower = better; ~20–23 for x264)
-b, --vbAverage video bitrate in kbps (instead of -q)
--encoder-presetSpeed vs size, e.g. veryfast, medium, slow
-w, -l / --maxWidthWidth/height, or limit the maximum size
-E, -BAudio encoder and bitrate, e.g. -E av_aac -B 160
--all-audio, --all-subtitlesKeep every audio or subtitle track
--start-at, --stop-atEncode only part of the video

See everything with HandBrakeCLI.exe --help.

Step 3: Useful HandBrakeCLI examples

Convert to MP4 with a preset

HandBrakeCLI -i "D:\Videos\talk.mkv" -o "D:\Out\talk.mp4" -Z "Fast 1080p30"

Smaller files with H.265

HandBrakeCLI -i in.mp4 -o out.mkv -e x265 -q 24 --encoder-preset medium -E av_aac -B 128

Resize to 720p for the web

HandBrakeCLI -i in.mov -o out.mp4 -e x264 -q 22 --maxWidth 1280 --maxHeight 720 --optimize

--optimize moves the MP4 index to the front so the video starts playing before it's fully downloaded.

Keep all audio and subtitle tracks

HandBrakeCLI -i movie.mkv -o movie-small.mkv -Z "H.265 MKV 1080p30" --all-audio --all-subtitles

Cut a clip

HandBrakeCLI -i in.mp4 -o clip.mp4 -Z "Fast 1080p30" --start-at seconds:60 --stop-at seconds:30

This starts at 1:00 and encodes 30 seconds.

Use a preset exported from the GUI

Create the perfect settings in the HandBrake GUI on your PC, choose Presets → Export, copy the JSON file to the server, then:

HandBrakeCLI --preset-import-file "C:\Tools\mypreset.json" -Z "My Preset" -i in.mkv -o out.mp4
Diagram of automated encoding: Task Scheduler runs a batch script that loops over files with HandBrakeCLI
Automating encodes

Step 4: Batch convert a folder with PowerShell

$in  = "D:\Videos\Incoming"
$out = "D:\Videos\Converted"
New-Item -ItemType Directory -Force -Path $out | Out-Null

Get-ChildItem $in -Include *.mkv,*.avi,*.mov -Recurse | ForEach-Object {
    $target = Join-Path $out ($_.BaseName + ".mp4")
    if (-not (Test-Path $target)) {
        HandBrakeCLI -i $_.FullName -o $target -Z "Fast 1080p30" 2>&1 |
            Out-File -Append "$out\handbrake.log"
    }
}

The script skips files already converted and writes the encoder output to a log file. Save it as convert.ps1 and run it from Task Scheduler at night with powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\Tools\convert.ps1.

HandBrakeCLI batch: a PowerShell loop encodes each file from the input folder into the output folder
How the batch script works

Performance tips for servers

  • CPU encoders (x264, x265, SVT-AV1) use every core. On a VPS, a faster --encoder-preset (veryfast, faster) cuts encoding time a lot for a small size increase.
  • Hardware encoders (nvenc_h264/nvenc_h265, qsv_*, vce_*) are much faster but only work if the server has a supported GPU and driver. Most standard VPS plans don't, so use CPU encoders there.
  • Run one encode at a time per server; x264/x265 already use all cores, so parallel jobs only compete.
  • Keep source and output on fast local disks, not network shares.

Frequently asked questions

Where do I download HandBrakeCLI for Windows?

From handbrake.fr → Downloads → Command Line Version. It's a ZIP file containing HandBrakeCLI.exe.

How do I list HandBrake presets from the command line?

Run HandBrakeCLI --preset-list (or -z).

Can HandBrakeCLI use my GPU?

Yes, with -e nvenc_h264, nvenc_h265, qsv_h264 or similar, if the computer has a supported NVIDIA, Intel or AMD GPU and current drivers.

Does HandBrakeCLI work on Windows Server?

Yes. It runs on Windows Server like any 64-bit console program and doesn't need the GUI or a logged-in desktop when started from Task Scheduler.

Minakshi, Server Administrator L1 at 99RDP
Written byMinakshiServer Administrator L1, 99RDP. Part of the team that runs our servers and answers support.
Keep reading

More Windows Server guides

All Windows Server guides

Need a server for this?

✓ Setup in minutes✓ Full admin access✓ 7-day refund on new services