Man page - handbrakecli(1)

Packages contas this manual

Manual

HANDBRAKE(1) User Commands HANDBRAKE(1)

HandBrake - manual page for HandBrake 1.9.2

HandBrakeCLI [options] -i <source> -o <destination>

General Options --------------------------------------------------------------

Print help
Print version
Log title, progress, and version info in JSON format
Be verbose (optional argument: logging level)
Select preset by name (case-sensitive) Enclose names containing spaces in double quotation marks (e.g. "Preset Name")
List available presets
Import presets from a json preset file. 'filespec' may be a list of files separated by spaces, or it may use shell wildcards.
Import presets from GUI config preset file.
Create a new preset from command line options and write a json representation of the preset to the console or a file if '--preset-export-file' is specified. The required argument will be the name of the new preset.
Write new preset generated by '--preset-export' to file 'filename'.
Add a description to the new preset created with '--preset-export'
Import an encode queue file created by the GUI
Do not use dvdnav for reading DVDs

Source Options ---------------------------------------------------------------

Set input file or device ("source")
Select a title to encode (0 to scan all titles only, default: 1)
Set the minimum title duration (in seconds). Shorter titles will be ignored (default: 10).
Scan selected title only.
Detect and select the main feature title.
Keep duplicate titles when scanning (Blu-ray only)
1 to 3 or "3" for chapter 3 only, default: all chapters)
Select the video angle (DVD or Blu-ray only)
Select how many preview images are generated, and whether to store to disk (0 or 1). (default: 10:0)
Start encoding at a given preview.
Start encoding at a given offset in seconds, frames, or pts (on a 90kHz clock) (e.g. seconds:10, frames:300, pts:900000). Units must match --stop-at units, if specified.
<string:number> Stop encoding after a given duration in seconds, frames, or pts (on a 90kHz clock) has passed (e.g. seconds:10, frames:300, pts:900000). Duration is relative to --start-at, if specified. Units must match --start-at units, if specified.

Destination Options ----------------------------------------------------------

-o, --output <filename> Set destination file name

Select container format: av_mp4 av_mkv av_webm
default: auto-detected from destination file name)
Add chapter markers
Disable preset chapter markers
Optimize MP4 files for HTTP streaming (fast start, s.s. rewrite file to place MOOV atom at beginning)
Disable preset 'optimize'
Add iPod 5G compatibility atom to MP4 container
Disable iPod 5G atom
Add audio silence or black video frames to start of streams so that all streams start at exactly the same time
Inserts parameter sets (SPS and PPS) inline in the video stream before each IDR.

Video Options ----------------------------------------------------------------

Select video encoder: svt_av1 svt_av1_10bit ffv1 x264 x264_10bit x265 x265_10bit x265_12bit mpeg4 mpeg2 VP8 VP9 VP9_10bit theora
Adjust video encoding settings for a particular speed/efficiency tradeoff (encoder-specific)
List supported --encoder-preset values for the specified video encoder
Adjust video encoding settings for a particular type of source or situation (encoder-specific)
List supported --encoder-tune values for the specified video encoder
Specify advanced encoding options in the same style as mencoder (all encoders except theora): option1=value1:option2=value2
Ensure compliance with the requested codec profile (encoder-specific)
List supported --encoder-profile values for the specified video encoder
Ensures compliance with the requested codec level (encoder-specific)
List supported --encoder-level values for the specified video encoder
Set video quality (e.g. 22.0)
Set video bitrate in kbit/s (default: 1000)
Use multi-pass mode
Disable multi-pass mode
When using multi-pass use "turbo" options on the first pass to improve speed (works with x264 and x265)
Disable 2-pass mode's "turbo" first pass
Set video framerate (5/10/12/15/20/23.976/24/25/29.97/ 30/48/50/59.94/60/72/75/90/100/120 or a number between 1 and 1000). Be aware that not specifying a framerate lets HandBrake preserve a source's time stamps, potentially creating variable framerate video
Select variable, constant or peak-limited frame rate control. VFR preserves the source timing. CFR makes the output constant rate at the rate given by the -r flag (or the source's average rate if no -r is given). PFR doesn't allow the rate to go over the rate specified with the -r flag but won't change the source timing if it's below that rate. If none of these flags are given, the default is --pfr when -r is given and --vfr otherwise
Use 'nvdec' to enable NVDec
Disable hardware decoding of the video track, forcing software decoding instead

Audio Options ----------------------------------------------------------------

Specify a comma separated list of audio languages you would like to select from the source title. By default, the first audio matching each language will be added to your output. Provide the language's ISO 639-2 code (e.g. fre, eng, spa, dut, et cetera) Use code 'any' to match all languages.
Select all audio tracks matching languages in the specified language list (--audio-lang-list). Any language if list is not specified.
Select first audio track matching languages in the specified language list (--audio-lang-list). Any language if list is not specified.
Select audio track(s), separated by commas ("none" for no audio, "1,2,3" for multiple tracks, default: first one). Multiple output tracks can be used for one input.
none fdk_aac fdk_haac av_aac copy:aac ac3 copy:ac3 eac3 copy:eac3 truehd copy:truehd copy:dts copy:dtshd copy:mp2 mp3 copy:mp3 opus copy:opus vorbis copy:vorbis flac16 flac24 copy:flac alac16 alac24 copy:alac copy
"copy:<type>" will enable passthru of the
corresponding audio track without modification if passthru is supported for the audio type. Separate tracks by commas. Defaults:
fdk_aac
fdk_aac
opus
Set audio codecs that are permitted when the "copy" audio encoder option is specified (aac/ac3/eac3/truehd/dts/dtshd/mp2/mp3/opus/vorbis/flac/alac) Separated by commas for multiple allowed options.
Set audio codec to use when it is not possible to copy an audio track without re-encoding.
Set audio track bitrate(s) in kbit/s. (default: determined by the selected codec, mixdown, and samplerate combination). Separate tracks by commas.
Set audio quality metric. Separate tracks by commas.
Set audio compression metric. (available depending on selected codec) Separate tracks by commas.
-6, --mixdown <string>
Format(s) for audio downmixing/upmixing: mono left_only right_only stereo dpl1 dpl2 5point1 6point1 7point1 5_2_lfe
Defaults:
up to dpl2
up to 7point1
up to 7point1
up to 7point1
up to 5point1
up to 5point1
up to 5point1
up to dpl2
up to 7point1
up to dpl2
up to 7point1
up to 7point1
up to 7point1
up to 7point1
Normalize audio mix levels to prevent clipping.
<string>
Separate tracks by commas. 0 = Disable Normalization (default) 1 = Enable Normalization
Set audio samplerate(s) (8/11.025/12/16/22.05/24/32/44.1/48/88.2/96/176.4/192 kHz) or "auto". Separate tracks by commas.
Apply extra dynamic range compression to the audio, making soft sounds louder. Range is 1.0 to 4.0 (too loud), with 1.5 - 2.5 being a useful range. Separate tracks by commas.
Amplify or attenuate audio before encoding. Does NOT work with audio passthru (copy). Values are in dB. Negative values attenuate, positive values amplify. A 1 dB difference is barely audible.
Select dithering to apply before encoding audio: auto (default) none rectangular triangular triangular_hp lipshitz_ns
Supported by encoder(s):
flac16
Set audio track name(s). Separate tracks by commas.

Picture Options --------------------------------------------------------------

<number> Set storage width in pixels
Set storage height in pixels
Choose which crop mode to operate in. Default: auto unless --crop is set in which case custom
<top:bottom:left:right> Set picture cropping in pixels (default: automatically remove black bars)
Number of pixels difference before we consider the frame to be a different aspect ratio (default: 9)
Number of frames that must be different to trigger smart crop (default: 4, 6 or 8 scaling with preview count)
Set maximum height in pixels
<number> Set maximum width in pixels
Set pixel aspect ratio to 1:1
Store pixel aspect ratio that maximizes storage resolution
Store pixel aspect ratio that is as close as possible to the source video pixel aspect ratio
Store pixel aspect ratio in video stream and directly control all parameters.
Set display width in pixels, for custom anamorphic. This determines the display aspect during playback, which may differ from the storage aspect.
Preserve the source's display aspect ratio when using custom anamorphic
Disable preset 'keep-display-aspect'
Set pixel aspect for custom anamorphic (--display-width and --pixel-aspect are mutually exclusive.
Use wider ITU pixel aspect values for loose and custom anamorphic, useful with underscanned sources
Disable preset 'itu-par'
Set storage width and height modulus Dimensions will be made divisible by this number. (default: set by preset, typically 2)
Set the color space signaled by the output: Overrides color signalling with no conversion.
2020
709 601 ntsc (same as 601) pal
(default: auto-detected from source)

Filters Options --------------------------------------------------------------

Detect interlace artifacts in frames. If not accompanied by the decomb or deinterlace filters, this filter only logs the interlaced frame count to the activity log. If accompanied by the decomb or deinterlace filters, it causes these filters to selectively deinterlace only those frames where interlacing is detected. Presets:
fast
mode=m:spatial-metric=s:motion-thresh=m: spatial-thresh=s:filter-mode=f:block-thresh=b: block-width=b:block-height=b:disable=d
mode=3:spatial-metric=2:motion-thresh=1: spatial-thresh=1:filter-mode=2:block-thresh=40: block-width=16:block-height=16
Disable preset comb-detect filter
Deinterlace video using FFmpeg yadif. Presets:
bob
mode=m:parity=p
mode=3
Disable preset deinterlace filter
Deinterlace video using FFmpeg bwdif. Presets:
Custom Format:
Default:
mode=3
Disable preset bwdif deinterlace filter
-5, --decomb[=string]
Deinterlace video using a combination of yadif, blend, cubic, or EEDI2 interpolation. Presets:
eedi2 eedi2bob
mode=m:magnitude-thresh=m:variance-thresh=v: laplacian-thresh=l:dilation-thresh=d: erosion-thresh=e:noise-thresh=n: search-distance=s:postproc=p:parity=p
mode=7
Disable preset decomb filter
-9, --detelecine[=string]
Detelecine (ivtc) video with pullup filter Note: this filter drops duplicate frames to restore the pre-telecine framerate, unless you specify a constant framerate (--rate 29.97 --cfr) Custom Format:
skip-bottom=s:strict-breaks=s:plane=p:parity=p: disable=d
skip-left=1:skip-right=1:skip-top=4: skip-bottom=4:plane=0
Disable preset detelecine filter
-8, --hqdn3d[=string]
Denoise video with hqdn3d filter Presets:
light medium strong
y-spatial=y:cb-spatial=c:cr-spatial=c: y-temporal=y:cb-temporal=c:cr-temporal=c
y-spatial=3:cb-spatial=2:cr-spatial=2: y-temporal=2:cb-temporal=3:cr-temporal=3
Disable preset hqdn3d filter
Legacy alias for '--hqdn3d'
Denoise video with NLMeans filter Presets:
light medium strong
y-strength=y:y-origin-tune=y:y-patch-size=y: y-range=y:y-frame-count=y:y-prefilter=y: cb-strength=c:cb-origin-tune=c:cb-patch-size=c: cb-range=c:cb-frame-count=c:cb-prefilter=c: cr-strength=c:cr-origin-tune=c:cr-patch-size=c: cr-range=c:cr-frame-count=c:cr-prefilter=c: threads=t
y-strength=6:y-origin-tune=1:y-patch-size=7: y-range=3:y-frame-count=2:y-prefilter=0: cb-strength=6:cb-origin-tune=1:cb-patch-size=7: cb-range=3:cb-frame-count=2:cb-prefilter=0
Disable preset NLMeans filter
Tunes:
film grain highmotion animation tape sprite
custom settings)
Sharpen video with chroma smooth filter Presets:
light medium strong stronger verystrong
cb-strength=c:cb-size=c:cr-strength=c:cr-size=c
cb-strength=1.2:cb-size=7
Disable preset chroma smooth filter
Tunes:
tiny small medium wide verywide
not affect custom settings)
Sharpen video with unsharp filter Presets:
light medium strong stronger verystrong
y-strength=y:y-size=y:cb-strength=c:cb-size=c: cr-strength=c:cr-size=c
y-strength=0.25:y-size=7:cb-strength=0.25: cb-size=7
Disable preset unsharp filter
Tunes:
ultrafine fine medium coarse verycoarse
custom settings)
Sharpen video with lapsharp filter Presets:
light medium strong stronger verystrong
y-strength=y:y-kernel=y:cb-strength=c: cb-kernel=c:cr-strength=c:cr-kernel=c
y-strength=0.2:y-kernel=isolap:cb-strength=0.2: cb-kernel=isolap
Disable preset lapsharp filter
Tune lapsharp filter Tunes:
film grain animation sprite
custom settings)
-7, --deblock[=string]
Deblock video with avfilter deblock Presets:
light medium strong stronger verystrong
strength=s:thresh=t:blocksize=b:disable=d
strength=strong:thresh=20
Disable preset deblock filter
Tune deblock filter Tunes:
medium large
custom settings)
Rotate image or flip its axes. angle rotates clockwise, can be one of:
0, 90, 180, 270
hflip=1 flips the image on the x axis (horizontally). Custom Format:
Default:
angle=180:hflip=0
Pad image with borders (e.g. letterbox). The padding color may be set (default black). Color may be an HTML color name or RGB value. The position of image in pad may also be set. Custom Format:
left=l:right=r
Convert colorspace, transfer characteristics or color primaries. Presets:
bt709 bt601-6-525 bt601-6-625
primaries=p:transfer=t:matrix=m:range=r: tonemap=t:param=p:desat=d:npl=n
Grayscale encoding
Disable preset 'grayscale'

Subtitles Options ------------------------------------------------------------

Specify a comma separated list of subtitle languages you would like to select from the source title. By default, the first subtitle matching each language will be added to your output. Provide the language's ISO 639-2 code (e.g. fre, eng, spa, dut, et cetera)
Select all subtitle tracks matching languages in the specified language list (--subtitle-lang-list). Any language if list is not specified.
Select first subtitle track matching languages in the specified language list (--subtitle-lang-list). Any language if list is not specified.
Select subtitle track(s), separated by commas More than one output track can be used for one input. "none" for no subtitles. Example: "1,2,3" for multiple tracks. A special track name "scan" adds an extra first pass. This extra pass scans subtitles matching the language of the first audio or the language selected by --native-language. The one that's only used 10 percent of the time or less is selected. This should locate subtitles for short foreign language segments. Best used in conjunction with --subtitle-forced.
Set subtitle track name(s). Separate tracks by commas.
Only display subtitles from the selected stream if the subtitle has the forced flag set. The values in 'string' are indexes into the subtitle list specified with '--subtitle'. Separate tracks by commas. Example: "1,2,3" for multiple tracks. If "string" is omitted, the first track is forced.
"Burn" the selected subtitle into the video track. If "subtitle" is omitted, the first track is burned. "subtitle" is an index into the subtitle list specified with '--subtitle' or "native" to burn the subtitle track that may be added by the 'native-language' option.
Flag the selected subtitle as the default subtitle to be displayed upon playback. Setting no default means no subtitle will be displayed automatically. 'number' is an index into the subtitle list specified with '--subtitle'. "none" may be used to override an automatically selected default subtitle track.
Specify your language preference. When the first audio track does not match your native language then select the first subtitle that does. When used in conjunction with --native-dub the audio track is changed in preference to subtitles. Provide the language's ISO 639-2 code (e.g. fre, eng, spa, dut, et cetera)
Used in conjunction with --native-language requests that if no audio tracks are selected the default selected audio track will be the first one that matches the --native-language. If there are no matching audio tracks then the first matching subtitle track is used instead.
SubRip SRT filename(s), separated by commas.
Character codeset(s) that the SRT file(s) are encoded as, separated by commas. If not specified, 'latin1' is assumed. Command 'iconv -l' provides a list of valid codesets.
file(s), separated by commas. If not specified, zero is assumed. Offsets may be negative.
SRT track language as an ISO 639-2 code (e.g. fre, eng, spa, dut, et cetera) If not specified, then 'und' is used. Separate by commas.
Flag the selected SRT as the default subtitle to be displayed during playback. Setting no default means no subtitle will be automatically displayed. If 'number' is omitted, the first SRT is the default. 'number' is a 1-based index into the 'srt-file' list
"Burn" the selected SRT subtitle into the video track. If 'number' is omitted, the first SRT is burned. 'number' is a 1-based index into the 'srt-file' list
SubStationAlpha SSA filename(s), separated by commas.
file(s), separated by commas. If not specified, zero is assumed. Offsets may be negative.
SSA track language as an ISO 639-2 code (e.g. fre, eng, spa, dut, et cetera) If not specified, then 'und' is used. Separate by commas.
Flag the selected SSA as the default subtitle to be displayed during playback. Setting no default means no subtitle will be automatically displayed. If 'number' is omitted, the first SSA is the default. 'number' is a 1-based index into the 'ssa-file' list
"Burn" the selected SSA subtitle into the video track. If 'number' is omitted, the first SSA is burned. 'number' is a 1-based index into the 'ssa-file' list

The full documentation for HandBrake is maintained as a Texinfo manual. If the info and HandBrake programs are properly installed at your site, the command

info HandBrake

should give you access to the complete manual.

November 2025 HandBrake 1.9.2