gifsicle or brew install gifsicle
GIF
ffmpeg -ss 00:28:07 -i video.mkv -t 00:00:10 -s 480x270 -pix_fmt rgb24 -f image2 %03d.gif
gifsicle --delay=5 --loop *.gif > animation.gif
Using ffmpeg from brew install ffmpeg
and ImageMagick from brew install imagemagick
(I had some ffmpeg flags, but I'm not sure which... possibly --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libass --enable-openssl --enable-nonfree --enable-vda
- Start: 00:28:07
- For how long: ten seconds 00:00:10
PNG
ffmpeg -ss 00:28:07 -i video.mkv -t 00:00:10 -s 480x270 -f image2 %03d.png
- start from number 6
- go to number 167
- skipping every 3
seq -f %03.png 6 3 167
may want to mess with o8x8,8
(7,8,9) to get a color pallete of under 256, in which case replace +map animation.gif
with -append -format %k info:
convert -delay 1x8 `seq -f %03g.png 10 3 72` \
-ordered-dither o8x8,8 \
-coalesce -layers OptimizeTransparency \
+map animation.gif
- creating animated gifs from the shell using ffmpeg and imagemagick - @cdv2722
- cutting videos based on start and end time using ffmpeg - stackoverflow
- convert video to giff using ffmpeg - stackoverflow
- mov to gif - chris messina