Created
July 6, 2020 06:38
-
-
Save shinmiy/9db9b832d55a22889029d29e6a8a40b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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