Compositing video with second alpha video

Hello, I would like to add a video with alpha channel from animation software Synfig. And in the background I would like to have some image or another non-transparent video.

There’s already a thread for this exact combination of main video and second video with alpha channel, but I’m unable to get the results.

Here is the timeline. I have tried what I understand from the original thread. Then I tried all the combinations of Compositing button and even switched the V2 - V3 tracks.

Am I doing something wrong, or is there something wrong with my input files?

I’m running Shotcut version 18.06.02, Ubuntu 16.04 x64, GPU effects are off

Here are the two source video files:
Synfig (437.1 KB)

Thanks for any tips.

The original thread discusses using a video file with alpha stored within it (the example given is a QuickTime file - other formats may also support alpha, but it’s not commonplace).

With two separate video files, you’d need some facility to set one video as the alpha for another, and Shotcut currently doesn’t offer that.

So you would have to generate your video file with alpha embedded straight out of Synfig, or use ffmeg to combine the two videos to a format that embeds the alpha in the video file.

In your specific case, you may also be able to get away with a Chroma Key filter (selecting the background color as what’s needed to be transparent), but it’s not ideal.

Quicktime Animation is ideal for this, but it seems Synfig does not offer it yet:

Here is an ffmpeg command line to merge them into one Quicktime Animation file using the ffmpeg.exe that comes with Shotcut (Windows example):
c:\Users\ddennedy\Downloads\Synfig files>"C:\Program Files\Shotcut\ffmpeg.exe" -i "Synfig Animation 1.avi" -i "Synfig Animation 1-alpha.avi" -filter_complex "[0:v][1:v]alphamerge" -shortest -c:v qtrle -an "Synfig Animation"

Now, load the mov file on V2.

1 Like

Thanks to you both of you for a really quick answer.
Now I understand, that the video in Shotcut has to have alpha channel in it.

The export of PNGs of every frame and then converting to MOV works fine.
ffmpeg -i bar.%04d.png -c:v qtrle

The example for ffmpeg joining two videos and exporting to MOV works perfectly, this is the way I will use it in my workflow.

Thank you for exact command line parameters @shotcut. I would never create those parameters myself, you saved me lot of time!

Thanks for your quick answer and for creating and supporting Shotcut!


P.S: and the “money shot” :slight_smile:

1 Like