Last active
August 9, 2022 06:17
-
-
Save dswwsd/3a794daecceae6009159bcdf5fb6579d to your computer and use it in GitHub Desktop.
mov to gif function
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
mov2gif () { | |
movie=$1 | |
height=$(mdls -name kMDItemPixelHeight ${movie} | grep -o '[0-9]\+') | |
width=$(mdls -name kMDItemPixelWidth ${movie} | grep -o '[0-9]\+') | |
dimensions="${width}x${height}" | |
ffmpeg -i ${movie} -s ${dimensions} -pix_fmt rgb24 -r 10 -f gif ${movie}.gif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment