Adding support for loading videos with an alpha channel would help creating fantastic overlays

Right now I can easily add things like a box with text and my name of it. That can easily be faded in and out. Great.

However, I would prefer to create a fully animated bar with all sorts of various features… I can do that with this tool:

The tool can generate two MP4 videos: one with the content (the bar and name) in RGB and another with the Alpha channel. From what I can see in shotcut, there is no way to load an MP4 as the alpha channel of another…

So I used ffmpeg to generate one movie that included both, the RGB and Alpha in one file. But the transparent part just appears black. I generated a bunch of PNG images with alpha and then generated a movie using:

ffmpeg -i bar.%04d.png -c:v qtrle

I checked that the output was RGBA and that is indeed the case.

exiftool -bitdepth

returns 32 bits and when using that movie with ffmpeg, it shows the format as being bgra.

Stream #1:0(eng): Video: qtrle (rle / 0x20656C72), bgra, 1280x720, 3088 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)

So… either way does not work yet with shotcut, it would be fantastic to have such a feature.

Case 1.

Load movie A, that’s the content (RGB)

Load movie B, that’s the alpha channel (A)

Apply a filter to merge A and B so we get an RGBA movie.

Case 2.

Load movie and make sure to read the alpha channel when available.

Then I could do my compositing as expected, directly in shotcut!

I can do the same with ffmpeg scripts, but that’s rather complicated… There is a very simple example to overlay two clips over each others:

ffmpeg -i background.mp4 -i -filter_complex "[0:v][1:v.60]overlay[out]" -map "[out]" -map "0:a:0" -strict experimental test.mp4

And it works as expected (meaning, again, that my has a valid alpha channel!)

That already works as long as you put it on a video track with composting enabled and have something on a lower track beneath it. I have Quicktime Animation files (qtrle) where that works fine.

That is correct at this time.

Oh, wow! I must have had all sorts of messes in my previous test. I tried today and my qtrle .mov file worked as expected! Cool, I’ll be able to do exactly what I want in a simple manner!