Skip to content

Instantly share code, notes, and snippets.

@shinmiy
Created July 6, 2020 06:38
Show Gist options
  • Save shinmiy/9db9b832d55a22889029d29e6a8a40b0 to your computer and use it in GitHub Desktop.
Save shinmiy/9db9b832d55a22889029d29e6a8a40b0 to your computer and use it in GitHub Desktop.
#!/bin/bash
SCALE="720"
fullpath=$1
if [ $fullpath ];then
echo $fullpath
else
echo No file provided
exit 1
fi
filename=$(basename -- "$fullpath")
extension="${filename##*.}"
name="${filename%.*}"
ffmpeg -i $fullpath -vf scale=-2:${SCALE} ${name}_${SCALE}p.mp4
rm -i $fullpath
open .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment