RGB32 AVI source with transparency does not render

What is your operating system?
Windows 11 Home 23H2

What is your Shotcut version (see Help > About Shotcut)?
24.06.26

Can you repeat the problem? If so, what are the steps?

  1. Add two video tracks to the timeline.
  2. Add a color source to the lower track.
  3. Open an AVI file with pixel format RGB32 (includes alpha channel).
  4. Image displays in Source tab with black background.
  5. Drag to the empty upper track.
  6. Note that the source no longer renders in the Project tab.
  7. Note that muting the lower color track causes the AVI source to appear in the Project tab.

This sounds like the alpha channel is entirely transparent. That matches the subject of the thread as well. If so, that is by design: you cannot see something that is transparent when it is blended/composited with something else. Add the Alpha Channel: View filter to the AVI and show a screenshot in a reply.

The source is not entirely transparent. It consists of white text on a transparent background. On the Source tab, it displays as white text on a black background. When I add Show Alpha, I get all transparent in the Project tab. It shows as white text on black in Project if and only if there is nothing below it. So what appears to be happening is that the entire frame is treated as transparent even though many pixels are 100 percent opaque.

The Source player does not do anything with the alpha channel.

It shows as white text on black in Project if and only if there is nothing below it.

That too does nothing with the alpha channel since it is not blending with anything. Shotcut does not blend with a hidden black background. You need to add that if that is what you want.

When I add Show Alpha, I get all transparent in the Project tab.

I do not completely understand “get all transparent” since you did not include the screenshot as I asked. But from the description it sounds like FFmpeg is not able to read your alpha channel. If it is able to such as my example below then it does blend using the alpha channel.

You can upload your AVI somewhere for me to download if you want me to confirm or you can report a bug to FFmpeg that it is not reading your AVI’s alpha channel. I made an uncompressed bgra AVI via Shotcut, and it read the alpha OK

Seems to me the bug is in your AVI, not Shotcut. Or maybe you do not understand how an alpha channel works.

I have uploaded a sample file and screen recording to better illustrate the problem at Alpha issue - Google Drive
Thank you for looking into it.

I checked your AVI. This is not a bug. The problem is your AVI. This is how it looks in the highly regarded mpv video player that shows transparency with a checkered background.

And here is how it looks in blender

Since you reported this as a bug instead of asking for help, I will not explain how to make your video’s text appear on top of something else. You can use Shotcut’s own text features to add that text to your video.

I am well aware of how to add text in Shotcut. In fact, this is animated text produced by an AviSynth script; I only provided 5 seconds to keep the uncompressed file size down. I will investigate directly how FFmpeg handles this file and report back anything interesting that I find.

The issue is that the FFmpeg overlay filter expects straight alpha by default while the file actually contains premultiplied alpha values. Adding “alpha=1” to the filter options yields proper output. Indeed this is not a bug but a mismatch between expected and actual data. I will post a suggestion.

We do not use the FFmpeg overlay filter, and pre-multiplied alpha should still include a proper alpha channel. Pre-multiplication affects the non-alpha color components. Our overlay routines do not take pre-multiplied only, and I doubt that will change.