handbrake also has the command line tool 'HandBrakeCLI'
You can tweak parameters in plain text in a shell script & set the job running & then evaluate what works best for your media.
Some of the handbrake apps give you a clue to the command they are using for various settings, so you can read about the arguments via 'man HandBrakeCLI' (on Mac or Linux).
Using --start-at-preview 1 --stop-at duration:30 gives you short clips to demo.
ffmpeg is another free option too, but I got bored of compiling that on my Mac.
MPEGStreamclip should also handle the files if you need a GUI (installed codec's permitting)…
NB: replace the [dots]and[slashes] - I'm new so the filter says NO links