Skip to content

Instantly share code, notes, and snippets.

@mirakui mirakui/memo.txt
Created Sep 2, 2012

What would you like to do?
# 元の動画をトリミング
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
# 結果:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.