encode GIFs in-house