1

I have some smartphone video that is absurdly large for what is low-quality casual video: 100MB per minute. What is the easiest way to compress this (on Mac) using command-line or GUI, given that I don't want to optimize settings for this casual video -- just some sort of default?

I have found answers online (often quite outdated) to use ffmpeg -i in.mp4 -vf scale=1280:720 -preset slow -crf 18 out.mp4 or the like, but I am none too sure about what might be an acceptable default.

I also tried ffmpeg -i in.mp4 -fs 100M out.mp4, which gives decent results -- I am interested in any further good ideas.

2 Answers 2

1

I'd recommend a simple GUI app, such as Smart Converter [can't remember if it's free or paid, App Store won't tell you once you own it] or Handbrake (freeware) which is a lot like ffmpeg, but without all the typing.
In both you can set up, or choose from existing, presets.

0

This bash script may be useful. It simply uses ffmpeg to compress all large (>150MB) mp4 files in a directory to half the size.

#!/usr/bin/env bash
set -x
set -u
set -e

for fn in *.mp4 ; do
  filesize=$( ls  -l "$fn" | awk '{print $5}')
  if [ "$filesize" -gt "150000000" ]; then
    new_filesize=$(($filesize / 2 ))
    new_filesize_MB=$(($new_filesize / 1000000 ))
    fn_base="${fn%%.*}"
    fn_ext="${fn#*.}"
    ffmpeg -i "${fn}"  -fs $new_filesize "${fn_base}.${new_filesize_MB}M.${fn_ext}"
  fi
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.