Starting off I have this gif from google images:
Then I convert the blue to transparency:
convert octopus.gif -transparent "#00AEFF" octopus-transparent.gif
Now I have this (note glitchiness has already started to appear)
Now for the grand finale, I convert it to webm:
convert octopus-transparent.gif tmp%03d.png
ffmpeg -framerate 25 -f image2 -i ./tmp%03d.png -c:v libvpx -pix_fmt yuva420p octopus.webm
See the following screenshot. It is still transparent, but the sizing is no longer steady, and frankly it's starting to look a little creepy:
I don't really know much about video codecs and I've just got this far with others' help. I'd appreciate advice as to how I can change these commands to avoid the glitches.