Handbrake has support for the command line.

https://handbrake.fr/docs/en/latest/cli/cli-options.html