If project requirements allow, Animated PNG is a good alternative. Compared to GIF, it can sometimes produce smaller file sizes along with color and transparency depth up to 24-bit.
Browser support for APNG is documented here: https://caniuse.com/apng
To export as APNG, go to the Export panel and click the Advanced button. Then:
-
Uncheck “Use hardware encoder”
-
Change “Format” to
apng
-
Video tab: nothing special is needed for APNG; use your normal settings
-
Codec tab: change “Codec” to
apng
. The other settings on this tab don’t matter. -
Audio tab: check “Disable audio”
-
Other tab: remove all contents then add this line:
pix_fmt=rgba
-
Export and give the filename a
.apng
extension
Also on the “Other” tab, a line can be added for plays=10
to make the APNG loop 10 times. plays=0
causes infinite looping. The default is plays=1
.
Remember that for transparency to work in Shotcut, all material must be on a single track. Multiple tracks will eliminate the transparency information and it’s back to the same boat we’re in today with GIF (transparency replaced with a black background).
Animated PNG has really grown in browser support in the last few years. I’m willing to create an Animated PNG export preset if there is interest.