Created
September 2, 2012 12:48
-
-
Save mirakui/3598303 to your computer and use it in GitHub Desktop.
ffmpeg+ImageMagickによる分割アニメーション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
# 元の動画をトリミング | |
ffmpeg -i DSC_3872.avi -vcodec copy -acodec copy -ss '00:00:04.33' -t '00:00:05.48' trim01.avi | |
# 横幅500px(tumblrの上限)にリサイズしつつ animated gif に変換 | |
convert -resize 500 trim01.avi trim01.gif | |
# 明るさ・コントラストをいじりつつ63色に減色(クロップ処理後に1MBに収まるように色数調整) | |
convert -brightness-contrast 40x40 -colors 63 trim01.gif trim01-v3.gif | |
# 横3x縦2にクロップする(画像同士の間隔は10px) | |
convert -crop 160x135+0+0 +repage trim01-v3.gif trim01-v3-1.gif | |
convert -crop 160x135+170+0 +repage trim01-v3.gif trim01-v3-2.gif | |
convert -crop 160x135+340+0 +repage trim01-v3.gif trim01-v3-3.gif | |
convert -crop 160x136+0+145 +repage trim01-v3.gif trim01-v3-4.gif | |
convert -crop 160x136+170+145 +repage trim01-v3.gif trim01-v3-5.gif | |
convert -crop 160x136+340+145 +repage trim01-v3.gif trim01-v3-6.gif | |
# 結果: http://diary.mirakui.com/post/30721296029/tjparty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment