@weely I'm not familiar with encoding software but since Handbrake was mentioned search for HandbrakeCLI. They have thorough instructions.

Sent from my HTC 10 using Tapatalk