#for each 3 frames in the source we only keep 1 mkdir frames3; cd frames3 #unfortunately this video has a lot of unnecessary noise added to it to represent water reflection caustics or something so we brutally denoise it with hqdn3d time mplayer ../nucleostream-wip.mp4 -vf-add hqdn3d=30:30:10:10 -vf-add framestep=3 -x 480 -y 270 -vf-add scale -vo jpeg cd .. #using the same color map for all frames reduces file size and flickering convert frames3/00000060.jpg -geometry 480 -dither none -colors 250 colormap250.gif #i'm doing the conversion in imagemagick so i can compare consecutive frames. delay 1x15 is 1/15th of a second #pixel values closer than 5% are considered "the same" and set to transparent in the next frame start=1 step=1 end=737; time convert -limit memory 2GiB -delay 1x15 `seq -f "frames3/%08g.jpg" $start $step $end` -geometry 480 +repage -coalesce +dither -map colormap250.gif -fuzz "5%" -layers OptimizeTransparency nucleostream_fuzz5_250c.gif # you may get an error like this: # convert-im6.q16: cache resources exhausted `frames3/00000583.jpg' @ error/cache.c/OpenPixelCache/4083. # see https://github.com/ImageMagick/ImageMagick/issues/396 # imagemagick pukes if you don't have enough memory available in the system config. # i guess it loads all frames into ram first and then does its thing # even though i set files to 1000 i still have a max of 768? dunno, it works for this 737-frame animation at least... # #$ cat /etc/ImageMagick-6/policy.xml # # # # # # # # # # # # # # #... # #$ identify -list resource #Resource limits: # Width: 16KP # Height: 16KP # List length: 18.446744EP # Area: 512MP # Memory: 2GiB # Map: 2GiB # Disk: 8GiB # File: 768 # Thread: 4 # Throttle: 0 # Time: unlimited