LinuxCommandLibrary

handbrake

open-source video transcoder

TLDR

Convert video to MP4

$ HandBrakeCLI -i [input.mkv] -o [output.mp4]
copy
Use preset
$ HandBrakeCLI -i [input.mkv] -o [output.mp4] --preset="Fast 1080p30"
copy
Specify quality
$ HandBrakeCLI -i [input.mkv] -o [output.mp4] -q [20]
copy
Convert DVD
$ HandBrakeCLI -i [/dev/dvd] -o [output.mp4]
copy
List presets
$ HandBrakeCLI --preset-list
copy
Extract specific title
$ HandBrakeCLI -i [input.mkv] -o [output.mp4] -t [2]
copy

SYNOPSIS

HandBrakeCLI [options] -i source -o output

DESCRIPTION

HandBrake is an open-source video transcoder. HandBrakeCLI is the command-line interface for batch processing, scripting, and headless operation.
It supports various input formats including DVDs, Blu-rays, and common video files, outputting to MP4, MKV, and WebM containers.

PARAMETERS

-i source

Input file or device.
-o file
Output file.
-t title
Title number to encode.
--preset name
Use preset configuration.
-q quality
Quality (0-51, lower is better).
-e encoder
Video encoder (x264, x265, nvenc).
-E encoder
Audio encoder (aac, mp3, flac).
-B bitrate
Audio bitrate.
-r fps
Framerate.
--width pixels
Output width.
--height pixels
Output height.

CAVEATS

DVD decryption requires libdvdcss. Hardware encoding needs compatible GPU. High-quality encoding is slow. Preset names are case-sensitive.

HISTORY

HandBrake was created by Eric Petit in 2003 as a tool for ripping DVDs on BeOS. It evolved into a general-purpose video transcoder and is now maintained by a community of developers.

SEE ALSO

ffmpeg(1), vlc(1), mencoder(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community