Converting .gif to .webm using ffmpeg

When recording animations for my posts I use a gif recorder. However, using .webm files is more efficient and works in most browsers today. This ffmpeg command converts a .gif to a more efficient .webm file:

ffmpeg -i file.gif -c vp9 -b:v 0 -crf 40 file.webm