Transparent gif background

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:

  1. Uncheck “Use hardware encoder”

  2. Change “Format” to apng

  3. Video tab: nothing special is needed for APNG; use your normal settings

  4. Codec tab: change “Codec” to apng. The other settings on this tab don’t matter.

  5. Audio tab: check “Disable audio”

  6. Other tab: remove all contents then add this line: pix_fmt=rgba

  7. 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.

4 Likes