Convert Video Files using ffmpeg
This is a command I use to reduce the size of the video lessons we make available on the Computational Logic website.
for file in *.mp4; do ffmpeg -i $file -vf "scale=iw/2:ih/2" $(basename $file ".mp4")-small.mp4; done
The command converts all mp4
files in the current folder reducing their
video size by half.
Further reduce with:
ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4
Both solutions (and others not listed here) taken from How can I reduce a video’s size with ffmpeg?