Last active
September 18, 2020 19:56
-
-
Save garrytrinder/3aa8469b82d87ce473d1836261fba732 to your computer and use it in GitHub Desktop.
Converts the given GIFs to MP4 and WEBM
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
#!/usr/bin/env zsh | |
path='../public/img/managedidentity' | |
files=( | |
"${path}/configure-logic-app" | |
"${path}/create-logic-app" | |
"${path}/enable-managed-identity" | |
"${path}/grant-microsoft-graph-permission" | |
"${path}/run-logic-app" | |
"${path}/view-managed-identity-service-principal" | |
) | |
for file in "${files[@]}"; do | |
echo "$file" | |
$(/usr/local/Cellar/ffmpeg/4.3.1_1/bin/ffmpeg -loglevel quiet -an -i "$file.gif" -vcodec h264 -strict -2 -pix_fmt yuv420p "$file.mp4" -y) | |
$(/usr/local/Cellar/ffmpeg/4.3.1_1/bin/ffmpeg -loglevel quiet -an -i "$file.gif" -c vp9 -b:v 0 -crf 41 "$file.webm" -y) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated MP4 conversion to support QuickTime ensuring that MP4s now work in Safari and iOS.
Added
-an
flag to ignore audio