0% found this document useful (0 votes)
229 views3 pages

HandBrake Documentation - CLI Options

The document provides instructions on using the command line interface for HandBrake, including common commands for navigating directories and listing files on Windows, Mac and Linux. It also gives examples of basic and advanced HandBrakeCLI commands for encoding video with options for input, output, encoding profile and audio settings.

Uploaded by

Julie Walter
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
229 views3 pages

HandBrake Documentation - CLI Options

The document provides instructions on using the command line interface for HandBrake, including common commands for navigating directories and listing files on Windows, Mac and Linux. It also gives examples of basic and advanced HandBrakeCLI commands for encoding video with options for input, output, encoding profile and audio settings.

Uploaded by

Julie Walter
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Instructions:

All

Linux

Mac

Windows

Docs > English > HandBrake Latest > CLI Options

This article is a draft and may contain incomplete or incorrect information.

CLI Options
Quick Tutorial on the Command Line.
On Windows, youll want to open the Command Prompt app. This is similar to the
Terminal app on Mac and Linux although the commands to navigate vary a bit.
This guide is not going to go into a lot of detail on using your systems command line as
there are dierences on various dierent platforms. Instead it will oer some hints. We
suggest you Google for a tutorial for your given command line of choice.

Useful Commands
Command

Platform

Action

dir

Windows

List the contents of the current directory

ls

Mac and
Linux

Lists the contents of the current directory

cd

Both

Change to the given folder.

cd ..

Both

Go up a directory

pwd

Mac and
Linux

Unlike Windows, the terminal does not show you the full path to
your current directory. This command will show you were you are
on the le system.

When you extract HandBrakeCLI, you will need to navigate to where you extracted it on
the le system, before trying to execute. You can do so with the above commands.
Typically, a command prompt / terminal will start in your home directory. So, if you
download HandBrake and have a source ready, youd run the following commands: cd
Downloads

HandBrakeCLI -i /path/to/source -o ../Desktop/my_output.mp4


If HandBrake is in a dierent directory than your in, you can always access it via the full
path. i.en
./path/to/HandBrakeCLI -i /path/to/source -o ../Desktop/my_output.mp4
Remember, Linux and Mac can be congured to be case sensitive.

HandBrake Command Line Basics


First, simple input and output.
HandBrakeCLI -i source -o destination
That will encode with default Normal Preset.
Easy, right? So now you can start customizing those settings. You can pile on all sorts of
things, and end up with a monster like:
HandBrakeCLI -i /Volumes/MyBook/BLURAY_DISC -o
/Volumes/MyBook/Bluray.mkv -m -E copy audio-copy-mask ac3,dts,dtshd
audio-fallback ac3 -e x264 -q 20 -x level=4.1:ref=4:badapt=2:direct=auto:me=umh:subq=8:rc-lookahead=50:psyrd=1.0,0.15:deblock=-1,-1:vbv-bufsize=30000:vbv-maxrate=40000:slices=4
For now, think about less complex stu:
HandBrakeCLI -i VIDEO_TS -o movie.mp4 -e x264 -q 20 -B 160
That will encode a source video located at the path VIDEO_TS to an output le called
movie.mp4. It will use x264 with a CRF (Constant Quality) of 20 to encode the video, and
encode the audio as 160 Kbps AAC.
If you want to see the full list of available commands, try the following command:
HandBrakeCLI help
This will display every command with a brief explanation of what it does and a sample of
relevant options you can pass to it.

This article is part of the HandBrake Documentation and was written by Bradley Sepos (BradleyS). Join us on GitHub to
contribute your thoughts and ideas, and to suggest any corrections.
Copyright 2016 HandBrake Team. CC BY-SA 4.0. Credits.

You might also like