Repo for Dockerized HandbrakeCLI
Image is built without ENTRYPOINT and only CMD ["HandBrakeCLI","--help"], so
to run it you will need to run the image as such:
$ docker run --name hbcli \
-it tigerj/hbcli \
HandBrakeCLI -i /path/to/input -o /path/to/output
To login to a running container, use either the container name (i.e.
--name hbcli from usage example) or id (i.e. check with docker ps -a) and
then execute:
$ docker exec -it $CONTAINER_NAME_OR_ID bash
From here you can poke around in the file system
Using docker cp it is possible to copy files out of the container:
$ docker cp $CONTAINER_NAME_OR_ID:/path/to/your/file /path/to/host/directory
Using the -v option we can mount a directory from host to container as
follows:
$ docker run -d \
--name hbcli \
-v /host/input/path:/container/input/path
-v /host/output/path:/host/output/path
tigerj/hbcli \
HandBrakeCLI -i /container/input/path/YOURFILE.mkv \
-o /container/output/path/YOURFILE.m4v
HandBrake 1.3.1
Usage: HandBrakeCLI [options] -i <source> -o <destination>
General Options --------------------------------------------------------------
-h, --help Print help
--version Print version
--json Log title, progress, and version info in
JSON format
-v, --verbose[=number] Be verbose (optional argument: logging level)
-Z. --preset <string> Select preset by name (case-sensitive)
Enclose names containing spaces in double quotation
marks (e.g. "Preset Name")
-z, --preset-list List available presets
--preset-import-file <filespec>
Import presets from a json preset file.
'filespec' may be a list of files separated
by spaces, or it may use shell wildcards.
--preset-import-gui Import presets from GUI config preset file.
--preset-export <string>
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.
--preset-export-file <filename>
Write new preset generated by '--preset-export'
to file 'filename'.
--preset-export-description <string>
Add a description to the new preset created with
'--preset-export'
--queue-import-file <filename>
Import an encode queue file created by the GUI
--no-dvdnav Do not use dvdnav for reading DVDs
Source Options ---------------------------------------------------------------
-i, --input <string> Set input file or device ("source")
-t, --title <number> Select a title to encode (0 to scan all titles
only, default: 1)
--min-duration Set the minimum title duration (in seconds).
Shorter titles will be ignored (default: 10).
--scan Scan selected title only.
--main-feature Detect and select the main feature title.
-c, --chapters <string> Select chapters (e.g. "1-3" for chapters
1 to 3 or "3" for chapter 3 only,
default: all chapters)
--angle <number> Select the video angle (DVD or Blu-ray only)
--previews <number:boolean>
Select how many preview images are generated,
and whether to store to disk (0 or 1).
(default: 10:0)
--start-at-preview <number>
Start encoding at a given preview.
--start-at <string:number>
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.
--stop-at <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
-f, --format <string> Select container format:
av_mp4
av_mkv
av_webm
default: auto-detected from destination file name)
-m, --markers Add chapter markers
--no-markers Disable preset chapter markers
-O, --optimize Optimize MP4 files for HTTP streaming (fast start,
s.s. rewrite file to place MOOV atom at beginning)
--no-optimize Disable preset 'optimize'
-I, --ipod-atom Add iPod 5G compatibility atom to MP4 container
--no-ipod-atom Disable iPod 5G atom
--align-av Add audio silence or black video frames to start
of streams so that all streams start at exactly
the same time
--inline-parameter-sets Create adaptive streaming compatible output.
Inserts parameter sets (SPS and PPS) inline
in the video stream before each IDR.
Video Options ----------------------------------------------------------------
-e, --encoder <string> Select video encoder:
x264
x264_10bit
x265
x265_10bit
x265_12bit
mpeg4
mpeg2
VP8
VP9
theora
--encoder-preset <string>
Adjust video encoding settings for a particular
speed/efficiency tradeoff (encoder-specific)
--encoder-preset-list <string>
List supported --encoder-preset values for the
specified video encoder
--encoder-tune <string>
Adjust video encoding settings for a particular
type of source or situation (encoder-specific)
--encoder-tune-list <string>
List supported --encoder-tune values for the
specified video encoder
-x, --encopts <string> Specify advanced encoding options in the same
style as mencoder (all encoders except theora):
option1=value1:option2=value2
--encoder-profile <string>
Ensure compliance with the requested codec
profile (encoder-specific)
--encoder-profile-list <string>
List supported --encoder-profile values for the
specified video encoder
--encoder-level <string>
Ensures compliance with the requested codec
level (encoder-specific)
--encoder-level-list <string>
List supported --encoder-level values for the
specified video encoder
-q, --quality <float> Set video quality (e.g. 22.0)
-b, --vb <number> Set video bitrate in kbit/s (default: 1000)
-2, --two-pass Use two-pass mode
--no-two-pass Disable two-pass mode
-T, --turbo When using 2-pass use "turbo" options on the
first pass to improve speed
(works with x264 and x265)
--no-turbo Disable 2-pass mode's "turbo" first pass
-r, --rate <float> 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
--vfr, --cfr, --pfr 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
Audio Options ----------------------------------------------------------------
--audio-lang-list <string>
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 'und' (Unknown) to match all languages.
--all-audio Select all audio tracks matching languages in
the specified language list (--audio-lang-list).
Any language if list is not specified.
--first-audio Select first audio track matching languages in
the specified language list (--audio-lang-list).
Any language if list is not specified.
-a, --audio <string> 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.
-E, --aencoder <string> Select audio encoder(s):
none
av_aac
copy:aac
ac3
copy:ac3
eac3
copy:eac3
copy:truehd
copy:dts
copy:dtshd
mp3
copy:mp3
vorbis
flac16
flac24
copy:flac
opus
copy
"copy:<type>" will pass through the corresponding
audio track without modification, if pass through
is supported for the audio type.
Separate tracks by commas.
Defaults:
av_mp4 av_aac
av_mkv mp3
av_webm vorbis
--audio-copy-mask <string>
Set audio codecs that are permitted when the
"copy" audio encoder option is specified
(aac/ac3/eac3/truehd/dts/dtshd/mp3/flac)
Separated by commas for multiple allowed options.
--audio-fallback <string>
Set audio codec to use when it is not possible
to copy an audio track without re-encoding.
-B, --ab <number> Set audio track bitrate(s) in kbit/s.
(default: determined by the selected codec, mixdown,
and samplerate combination).
Separate tracks by commas.
-Q, --aq <float> Set audio quality metric.
Separate tracks by commas.
-C, --ac <float> 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
Separate tracks by commas.
Defaults:
none up to dpl2
av_aac up to 7point1
ac3 up to 5point1
eac3 up to 5point1
mp3 up to dpl2
vorbis up to dpl2
flac16 up to 7point1
flac24 up to 7point1
opus up to 7point1
--normalize-mix Normalize audio mix levels to prevent clipping.
<string> Separate tracks by commas.
0 = Disable Normalization (default)
1 = Enable Normalization
-R, --arate Set audio samplerate(s)
(8/11.025/12/16/22.05/24/32/44.1/48 kHz)
or "auto". Separate tracks by commas.
-D, --drc <float> 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.
--gain <float> 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.
--adither <string> Select dithering to apply before encoding audio:
auto (default)
none
rectangular
triangular
triangular_hp
lipshitz_ns
Separate tracks by commas.
Supported by encoder(s):
none
av_aac
copy:aac
ac3
copy:ac3
eac3
copy:eac3
copy:truehd
copy:dts
copy:dtshd
mp3
copy:mp3
vorbis
flac16
flac24
copy:flac
opus
copy
-A, --aname <string> Set audio track name(s).
Separate tracks by commas.
Picture Options --------------------------------------------------------------
-w, --width <number> Set storage width in pixels
-l, --height <number> Set storage height in pixels
--crop <top:bottom:left:right>
Set picture cropping in pixels
(default: automatically remove black bars)
--loose-crop Always crop to a multiple of the modulus
--no-loose-crop Disable preset 'loose-crop'
-Y, --maxHeight <number>
Set maximum height in pixels
-X, --maxWidth <number>
Set maximum width in pixels
--non-anamorphic Set pixel aspect ratio to 1:1
--auto-anamorphic Store pixel aspect ratio that maximizes storage
resolution
--loose-anamorphic Store pixel aspect ratio that is as close as
possible to the source video pixel aspect ratio
--custom-anamorphic Store pixel aspect ratio in video stream and
directly control all parameters.
--display-width <number>
Set display width in pixels, for custom anamorphic.
This determines the display aspect during playback,
which may differ from the storage aspect.
--keep-display-aspect Preserve the source's display aspect ratio
when using custom anamorphic
--no-keep-display-aspect
Disable preset 'keep-display-aspect'
--pixel-aspect <par_x:par_y>
Set pixel aspect for custom anamorphic
(--display-width and --pixel-aspect are mutually
exclusive.
--itu-par Use wider ITU pixel aspect values for loose and
custom anamorphic, useful with underscanned sources
--no-itu-par Disable preset 'itu-par'
--modulus <number> Set storage width and height modulus
Dimensions will be made divisible by this number.
(default: set by preset, typically 2)
-M, --color-matrix <string>
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 --------------------------------------------------------------
--comb-detect[=string] 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:
permissive
fast
Custom Format:
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
Default:
mode=3:spatial-metric=2:motion-thresh=1:
spatial-thresh=1:filter-mode=2:block-thresh=40:
block-width=16:block-height=16
--no-comb-detect Disable preset comb-detect filter
-d, --deinterlace[=string]
Deinterlace video using FFmpeg yadif.
Presets:
skip-spatial
bob
Custom Format:
mode=m:parity=p
Default:
mode=3
--no-deinterlace Disable preset deinterlace filter
-5, --decomb[=string] Deinterlace video using a combination of yadif,
blend, cubic, or EEDI2 interpolation.
Presets:
bob
eedi2
eedi2bob
Custom Format:
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
Default:
mode=7
--no-decomb 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-left=s:skip-right=s:skip-top=s:
skip-bottom=s:strict-breaks=s:plane=p:parity=p:
disable=d
Default:
skip-left=1:skip-right=1:skip-top=4:
skip-bottom=4:plane=0
--no-detelecine Disable preset detelecine filter
-8, --hqdn3d[=string] Denoise video with hqdn3d filter
Presets:
ultralight
light
medium
strong
Custom Format:
y-spatial=y:cb-spatial=c:cr-spatial=c:
y-temporal=y:cb-temporal=c:cr-temporal=c
Default:
y-spatial=3:cb-spatial=2:cr-spatial=2:
y-temporal=2:cb-temporal=3:cr-temporal=3
--no-hqdn3d Disable preset hqdn3d filter
--denoise[=string] Legacy alias for '--hqdn3d'
--nlmeans[=string] Denoise video with NLMeans filter
Presets:
ultralight
light
medium
strong
Custom Format:
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
Default:
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
--no-nlmeans Disable preset NLMeans filter
--nlmeans-tune <string> Tune NLMeans filter to content type
Tunes:
none
film
grain
highmotion
animation
tape
sprite
Applies to NLMeans presets only (does not affect
custom settings)
--chroma-smooth[=string] Sharpen vi
Content type
Image
Digest
Size
208.4 MB
Last updated
over 6 years ago
docker pull tigerj/hbcli