brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: HandBrakeCLI -z lists the presets you can use with -Z

CLI
~/tips/tip-handbrakecli-preset-list

HandBrakeCLI -z

Prints the available HandBrake presets so you can encode from the terminal with one of them.

HandBrake has a command-line version, and it is less scary than its long help text suggests. The presets from the app are available there too, and one option is enough to start.

HandBrakeCLI -z
HandBrakeCLI -i input.mkv -o output.mp4 -Z "Preset Name"

-z (--preset-list) prints the presets your build knows. -Z (--preset) selects one by name. Replace Preset Name with a name from that list, spelled exactly as printed.

The name is case-sensitive, and names with spaces need quotes. The list can differ per operating system and hardware, so don’t copy a name from a forum post without checking it against your own -z output.

-i is the source and -o the destination file. The container follows the extension you give, so .mp4 and .mkv both work.

A preset is a starting point. Options you add after it override the preset, for example -q 22.0 to set the quality or -e x265 to pick another encoder. The reference also lists --preset-import-file, which loads presets from a JSON file exported from the app, so a preset you tuned in the GUI can be reused in scripts.

Further reading: HandBrake command line reference

More CLI tips printf 'GET /\r\n' | hexdump -C hexdump -C -s 512 -n 64 disk.img wget --limit-rate=2m https://example.com/big-file.iso wget --spider https://example.com/file.zip rg 'apiKey' -g '!*.min.js' -g '!package-lock.json' All CLI tips (46) All topics

Link