Created
January 14, 2021 09:30
-
-
Save ebual/dc0a253007f184e9f322cfa968be0c77 to your computer and use it in GitHub Desktop.
Mac Automator script for converting a video file to GIF
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/bash | |
| originalFilePath=$1 | |
| #extension=$(echo "$originalFilePath" | rev | cut -d"." -f1 | rev) | |
| pathWithoutExtension=$(echo "$originalFilePath" | rev | cut -d"." -f2- | rev) | |
| /Applications/ffmpeg -i "$originalFilePath" -filter_complex "[0:v] fps=15,split [a][b];[a] palettegen [p];[b][p] paletteuse" "$pathWithoutExtension.gif" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment