Media optimizer command (CLI) for use in scripts

I want to choose what and when to optimize tv recordings (.ts -> .mp4) using an shell script.

Please implement the media optimizer command (CLI) for use in scripts, with quality, performance and input/output file options.

mceclip1

optimize