How to Install HandBrake CLI on CentOS?

I’m using CentOS 7, and I want to install HandBrake CLI to encode videos on my server. However, I’m having difficulty finding a suitable installation method. Can you guide me on how to install HandBrake CLI on CentOS 7?

To easily install HandBrake and keep it updated, you can install Flatpak bundles of HandBrake for Linux which are available on the HandBrake’s official GitHub repository.

Download the suitable version of HandBrake.

Now Install Flatpak:

 sudo yum install flatpak

Install HandBrake:
Once the installation is complete, you can use the following command to install your downloaded HandBrake

flatpak install HandBrakeCLI-1.4.2-x86_64.flatpak

Run HandBrake:
Launch the HandBrake GUI from the command line

flatpak run fr.handbrake.ghb

The HandBrake GUI package also includes the CLI which you can use by running the following command.

flatpak run --command=HandBrakeCLI fr.handbrake.ghb

If you installed the stand-alone HandBrakeCLI Flatpak package, You can use the following command.

flatpak run fr.handbrake.HandBrakeCLI