To convert webm file to gif :

            I wish the lovely webm ♥ be the world's preferred video/audio format!

            # install ffmpeg on mac
            $ brew install ffmpeg

            # on ubuntu Linux
            $ sudo apt update
            $ sudo apt install ffmpeg

            # windows not easy!
            refer: https://www.iwingeek.com/install-use-ffmpeg-on-windows-10/


            # convert webm file to gif
	    # ------------------------

            # make a shell script webm2gif.sh
            $ ffmpeg -i $1  -r 2 $1.gif
            # uset it :
            $ bash webm2gif.sh input.webm

            OR  
            $ ffmpeg -i input.webm -r 2 input.webm.gif

        

To convert webm file to mp4 :

            $ ffmpeg -i input.webm -crf 26  output.mp4
        
Refer