Skip to content

Instantly share code, notes, and snippets.

@mattak
Created August 2, 2022 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattak/0709fb2479f96da6c5a97ac9ccb61fc8 to your computer and use it in GitHub Desktop.
Save mattak/0709fb2479f96da6c5a97ac9ccb61fc8 to your computer and use it in GitHub Desktop.
create small size mp4
#!/bin/sh
set -xe
if [ $# -eq 0 ]; then
echo "usage: <input_mp4>"
exit 1
fi
f1=$1
f2=${f1%.*}_small.mp4
ffmpeg -y -i $f1 -vf 'scale=320:trunc(ow/a/2)*2' $f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment