Created
March 4, 2020 19:47
-
-
Save Shujito/6e7e911ed21c100bcb37cc2e71846b14 to your computer and use it in GitHub Desktop.
convert videos to h264 baseline profile level 3.0
This file contains hidden or 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/sh | |
if ! [ "$1" ]; | |
then | |
echo "where file" | |
exit | |
fi | |
filename="${1%.*}" | |
extension="${1##*.}" | |
for size in 360 480 640 720 1080; do | |
# echo $size | |
ffmpeg -y -i "$1" \ | |
-acodec aac -ar 32k -aq 0 \ | |
-vcodec libx264 \ | |
-profile:v baseline \ | |
-level 3.0 \ | |
-r 30 -aspect 1:1 \ | |
-vf "scale=-1:$size" \ | |
-map_metadata -1 \ | |
"$filename-$size.$extension" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment