Skip to main content

How to transcode a video using HandBrakeCLI

· 3 min read

Setting up#

First make sure you have HandBrake installed and that you have the path to the HandBrakeCLI binary.

Running the CLI#

A typical HandBrake command looks like the following:

HandBrakeCLI -i "C:\Transcode\input.mkv" -o "C:\Transcode\output.mkv" -e x265

So you have the binary, the input file, the output file and then some transcode settings. At the end of the example, you can see we're using the x265 encoder.

The following provides further encoders available to use:

x264x264_10bitqsv_h264nvenc_h264x265x265_10bitx265_12bitqsv_h265nvenc_h265mpeg4mpeg2VP8VP9theora

HandBrake also has presets available for different devices. Here's an example using a preset:

HandBrakeCLI -i "C:\Transcode\input.mkv" -o "C:\Transcode\output.mkv" -Z "Very Fast 1080p30"

The following provides further presets:

Very Fast 1080p30Very Fast 720p30Very Fast 576p25Very Fast 480p30Fast 1080p30Fast 720p30Fast 576p25Fast 480p30HQ 1080p30 SurroundHQ 720p30 SurroundHQ 576p25 SurroundHQ 480p30 Surround"Super HQ 1080p30 SurroundSuper HQ 720p30 SurroundSuper HQ 576p25 SurroundSuper HQ 480p30 SurroundGmail Large 3 Minutes 720p30Gmail Medium 5 Minutes 480p30Gmail Small 10 Minutes 288p30Vimeo YouTube HQ 2160p60 4KVimeo YouTube HQ 1440p60 2.5KVimeo YouTube HQ 1080p60Vimeo YouTube HQ 720p60Vimeo YouTube 720p30Android 1080p30Android 720p30Android 576p25Android 480p30Apple 2160p60 4K HEVC SurroundApple 1080p60 SurroundApple 1080p30 SurroundApple 720p30 SurroundApple 540p30 SurroundApple 240p30Chromecast 2160p60 4K HEVC SurroundChromecast 1080p60 SurroundChromecast 1080p30 SurroundAmazon Fire 2160p60 4K HEVC SurroundAmazon Fire 1080p30 SurroundAmazon Fire 720p30Playstation 1080p30 SurroundPlaystation 720p30Playstation 540p30Roku 2160p60 4K HEVC SurroundRoku 1080p30 SurroundRoku 720p30 SurroundRoku 576p25Roku 480p30Windows Mobile 1080p30Windows Mobile 720p30Windows Mobile 540p30Windows Mobile 480p30Xbox 1080p30 SurroundXbox Legacy 1080p30 SurroundH.265 MKV 2160p60H.265 MKV 1080p30H.265 MKV 720p30H.265 MKV 576p25H.265 MKV 480p30H.264 MKV 2160p60H.264 MKV 1080p30H.264 MKV 720p30H.264 MKV 576p25H.264 MKV 480p30VP9 MKV 2160p60VP9 MKV 1080p30VP9 MKV 720p30VP9 MKV 576p25VP9 MKV 480p30VP8 MKV 1080p30VP8 MKV 720p30VP8 MKV 576p25VP8 MKV 480p30Production MaxProduction StandardProduction Proxy 1080pProduction Proxy 540p

By default HandBrake may remove audio and subtitles so to keep them use the following command:

--all-audio --all-subtitles

Use HandBrakeCLI --help for a full list of arguments.

info

Get started using Tdarr transcode automation for free with this link:

https://tdarr.io/download/