Skip to content

Instantly share code, notes, and snippets.

@devna13
Forked from zulhfreelancer/handbrake_cli.md
Created September 9, 2019 22:14
Show Gist options
  • Save devna13/e59b37b8d6159639237c6383cc6cf52c to your computer and use it in GitHub Desktop.
Save devna13/e59b37b8d6159639237c6383cc6cf52c to your computer and use it in GitHub Desktop.
How to compress video using Handbrake CLI?

Step 1

Download HandBrake CLI for your OS here.

Step 2

cd into the folder where you have the HandBrakeCLI file and run this inside it:

./HandBrakeCLI -i /path/to/input.mov -o /path/to/output.mp4 -e x264 -q 28 -r 15 -B 64 -X 1280 -O

Step 3

Done!

Reference:

http://thanhsiang.org/faqing/node/196


Result

root@ubuntu:/handbrake_test# ls -l --block-size=M
total 1118M
-rw-r--r-- 1 root root 631M Jan  7 22:00 input.mp4
-rw-r--r-- 1 root root 488M Jan  7 23:14 output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment