I could not send a mp4 using Yahoo! mail because it took around 30 minutes.
On Ubuntu MATE 18.04, I reduced the size using
ffmpeg -i sm_Julia1.mpr -s hd480 -strict -2 output.mp4
But the file was still too big.
Is there another option?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Using the file duration (72 seconds) you can use two-pass encoding to output approximately your desired output file size (25 MB). From FFmpeg Wiki: H.264 - Two-Pass:
(25 MiB * 8192 [converts MiB to kBit]) / 72 seconds = ~2844 kBit/s total bitrate 2844 kBit/s - 128 kBit/s (desired audio bitrate) = 2716 kBit/s video bitrate - 5% safety margin = 2580 kBit/s
ffmpeg -y -i input.mp4 -c:v libx264 -an -pass 1 -b:v 2580k -f mp4 /dev/null && ffmpeg -i input.mp4 -c:v libx264 -c:a aac -b:v 2580k -b:a 128k -pass 2 -movflags faststart output.mp4
Result ≈ 24 MB.