DOKK / manpages / debian 12 / handbrake-cli / HandBrakeCLI.1.en
HANDBRAKECLI:(1) User Commands HANDBRAKECLI:(1)

HandBrakeCLI - versatile DVD ripper and video transcoder (command line)

Syntax: HandBrakeCLI [options] -i <device> -o <file>

Print help
Check for updates and exit
Be verbose (optional argument: logging level)
Use a built-in preset. Capitalization matters, and if the preset name has spaces, surround it with double quotation marks
See a list of available built-in presets
Do not use dvdnav for reading DVDs (experimental, enabled by default for testing)

Set input device
Select a title to encode (0 to scan all titles only, default: 1)
Set the minimum title duration (in seconds). Shorter titles will not be scanned (default: 10).
Scan selected title only.
Detect and select the main feature title.
Select chapters (e.g. "1-3" for chapters 1 to 3, or "3" for chapter 3 only, default: all chapters)
Select the DVD angle
Select how many preview images are generated (max 30), and whether or not they're stored to disk (0 or 1). (default: 10:0)
Start encoding at a given preview.
Start encoding at a given frame, duration (in seconds), or pts (on a 90kHz clock)
Stop encoding at a given frame, duration (in seconds), or pts (on a 90kHz clock)

Set output file name
Set output format (mp4/mkv, default: autodetected from file name)
Add chapter markers (mp4 and mkv output formats only)
-4, --large-file
Use 64-bit mp4 files that can hold more than 4 GB. Note: Breaks iPod, PS3 compatibility.
Optimize mp4 files for HTTP streaming
Mark mp4 files so 5.5G iPods will accept them

Set video library encoder Options: x264 / ffmpeg4 / ffmpeg2 / theora (default: ffmpeg4)
When using x264, selects the x264 preset:
ultrafast / superfast / veryfast / faster / fast / medium / slow / slower / veryslow / placebo
When using x264, selects the x264 tuning:
film / animation / grain / stillimage / psnr / ssim / fastdecode / zerolatency
Specify advanced encoder options in the same style as mencoder (x264 and ffmpeg only): option1=value1:option2=value2
When using x264, ensures compliance with the specified h.264 profile:
baseline / main / high / high10 / high422 / high444
Set video quality
Set video bitrate (default: 1000)
-2, --two-pass
Use two-pass mode
When using 2-pass use the turbo options on the first pass to improve speed (only works with x264, affects PSNR by about 0.05dB, and increases first pass speed two to four times)
Set video framerate (5 / 10 / 12 / 15 / 23.976 / 24 / 25 / 29.97 / 30 / 50 / 59.94 / 60) 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 --cfr when -r is given and --vfr otherwise

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.
Audio encoder(s):
faac
ffaac
copy:aac
ffac3
copy:ac3
copy:dts
copy:dtshd
lame
copy:mp3
vorbis
ffflac
copy
copy:* will passthrough the corresponding audio unmodified to the muxer if it is a supported passthrough audio type. Separated by commas for more than one audio track. (default: faac for mp4, lame for mkv)
Set audio codecs that are permitted when the "copy" audio encoder option is specified (aac/ac3/dts/dtshd/mp3, default: all). 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 bitrate(s) (default: depends on the selected codec, mixdown and samplerate) Separated by commas for more than one audio track.
Set audio quality metric (default: depends on the selected codec) Separated by commas for more than one audio track.
Set audio compression metric (default: depends on the selected codec) Separated by commas for more than one audio track.
-6, --mixdown <string>
Format(s) for surround sound downmixing Separated by commas for more than one audio track. (mono/stereo/dpl1/dpl2/6ch, default: up to 6ch for ac3, up to dpl2 for other encoders)
Set audio samplerate(s) (22.05/24/32/44.1/48 kHz) Separated by commas for more than one audio track.
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. Separated by commas for more than one audio track.
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.
Audio track name(s), Separated by commas for more than one audio track.

Set picture width
Set picture height
Set cropping values (default: autocrop)
Always crop to a multiple of the modulus Specifies the maximum number of extra pixels which may be cropped (default: 15)
Set maximum height
Set maximum width
Store pixel aspect ratio in video stream
Store pixel aspect ratio with specified width
Store pixel aspect ratio in video stream and directly control all parameters.
Set the width to scale the actual pixels to at playback, for custom anamorphic.
Preserve the source's display aspect ratio when using custom anamorphic
Set a custom pixel aspect for custom anamorphic (--display-width and --pixel-aspect are mutually exclusive and the former will override the latter)
Use wider, ITU pixel aspect values for loose and custom anamorphic, useful with underscanned sources
Set the number you want the scaled pixel dimensions
<number>
to divide cleanly by. Does not affect strict anamorphic mode, which is always mod 2 (default: 16)
Set the color space signaled by the output (Bt.601 is mostly for SD content, Bt.709 for HD, default: set by resolution)

Deinterlace video with yadif/mcdeint filter (default 0:-1:-1:1)
-5, --decomb <MO:ME:MT:ST:BT:BX:BY:MG:VA:LA:DI:ER:NO:MD:PP:FD>
Selectively deinterlaces when it detects combing (default: 7:2:6:9:80:16:16:10:20:20:4:2:50:24:1:-1)
-9, --detelecine <L:R:T:B:SB:MP:FD>
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) (default 1:1:4:4:0:0:-1)
-8, --denoise <SL:SC:TL:TC> or <weak/medium/strong>
Denoise video with hqdn3d filter (default 4:3:6:4.5)
-7, --deblock <QP:M>
Deblock video with pp7 filter (default 5:2)
Flips images axes (default 3)
Grayscale encoding

Select subtitle track(s), separated by commas More than one output track can be used for one input. Example: "1,2,3" for multiple tracks. A special track name "scan" adds an extra 1st 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.
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'. Separated by commas for more than one subtitle track. 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 "number" is omitted, the first track is burned. "number" is an index into the subtitle list specified with '--subtitle'.
Flag the selected subtitle as the default subtitle to be displayed upon playback. Setting no default means no subtitle will be automatically displayed If "number" is omitted, the first track is default. "number" is an index into the subtitle list specified with '--subtitle'.
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 iso639-2 code (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.

--srt-file <string> SubRip SRT filename(s), separated by commas.

Character codeset(s) that the SRT file(s) are encoded in, separated by commas. Use 'iconv -l' for a list of valid codesets. If not specified latin1 is assumed
Offset in milli-seconds to apply to the SRT file(s) separated by commas. If not specified zero is assumed. Offsets may be negative.
Language as an iso639-2 code fra, eng, spa et cetera) for the SRT file(s) separated by commas. If not specified then 'und' is used.
Flag the selected srt as the default subtitle to be displayed upon playback. Setting no default means no subtitle will be automatically displayed If "number" is omitted, the first srt is default. "number" is an 1 based index into the srt-file list
October 2012 HandBrakeCLI 0.9.8