#!/bin/bash -ex for F in *.gif; do ffmpeg -i "$F" -auto-alt-ref 0 -c:v libvpx -crf 12 -b:v 500K "${F%.*}.webm"; done