Skip to content

Instantly share code, notes, and snippets.

@miyucy
Created November 15, 2018 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miyucy/654e98eeda9d49e13c8241eb23150d1e to your computer and use it in GitHub Desktop.
Save miyucy/654e98eeda9d49e13c8241eb23150d1e to your computer and use it in GitHub Desktop.
movをgifに変換するやつ https://github.com/dergachev/screengif ぽいやつ
#!/bin/bash
function func_mov2gif {
local outname
for inname in "${@}"; do
if [ -f "${inname}" ]; then
outname="$(dirname "${inname}")/$(basename -s ".mov" "${inname}").gif"
ffmpeg -i "${inname}" -r 10 -f gif - | gifsicle --threads --optimize --output "${outname}"
fi
done
}
func_mov2gif "${@}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment