Depends on
ffmpeg
(brew install ffmpeg
)
Copy & Paste this function into your terminal:
function optimize() {
ffmpeg -i "$1" -vcodec libx264 -crf 24 "${1%.*}_optimized.${1#*.}"
}
Now run the following:
optimize video.mp4
Which will output video_optimized.mp4