Last active
March 13, 2021 02:45
-
-
Save LittleWat/44fb2b4a605dd68b768839cc807e89f1 to your computer and use it in GitHub Desktop.
QuickTimeで取得したmovファイルをgifに変換するスクリプト
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
#!/bin/bash | |
# same speed: $ bash ./mov2gif.sh hogehoge.mov | |
# X2 speed: $ bash ./mov2gif.sh hogehoge.mov 2 | |
INPUT_FILENAME=$1 | |
ARGSPEED=$2 | |
SPEED=${ARGSPEED:=1} | |
OUTPUT_FILENAME="$1-x${SPEED}.gif" | |
echo "${INPUT_FILENAME} -> ${OUTPUT_FILENAME}" | |
ffmpeg -i ${INPUT_FILENAME} -vf scale=320:-1 -vf setpts=PTS/${SPEED} -af atempo=${SPEED} -r 10 ${OUTPUT_FILENAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment