How do I export videos with transparent background?

I have used all of the Alpha presets while exporting the video but it just doesn’t work. I don’t get any transparent background in the exported video. There is just a black background.

Is there any specific method for exporting a video with transparent background ?

I’m trying to export a video with transparent background for using it as a transition in OBS.

Any kind of suggestion would really help me a lot.

1 Like

Not sure, but i think there is no video format/codec for transparency like in PNG for example. You can use masking in video editing, but you need some background that shines through, so that you can deterime what background/color you want.

1 Like

Hello.
Thank You for the response !

Unfortunately that doesn’t provide me transparency on that video.

But I will try that out. Thanks !

Just googled for you (video codec with transparency / alpha channel).
You could try export formats like Apple ProRes 4444 / Apple ProRes 4444 XQ
or DNxHD or DNxHR for example.
Not sure if all are offered in SC, but i think the DNxHD/R are available.

Good Luck!

1 Like

I have used the Quicktime Animation format in Shotcut export to produce a transparent video in the past. You can see it is transparent if you put it on a V2 track in Shotcut and see that the video on V1 shows through.

Below is a snapshot of this in action. The Heartbeat.mov video is transparent and overlaid on top of another. Of course if you open this transparent video in the VLC video player it will have a black background, since that is the underlying layer of VLC. I haven’t tried in in an HTML file, but I’m reasobly sure it will work correctly.

2 Likes

Read this thread starting at this post to the end:

It provides options for Animated PNG with transparency. It also explains the trick of putting a Chroma Key on the Output track to create transparency that the compositor will preserve through the export process.

Most likely, your videos don’t have transparency because there are multiple tracks, causing the compositor to merge tracks against a hidden black background layer. It needs to be keyed out whenever multiple tracks are involved.

As for video formats that support transparency, ProRes 4444 as well as the options under Export panel > stock > alpha will work. DNxHD/DNxHR will not.

2 Likes

I was making this test while you guys answered to @Deeptanu_Dhar question:

A simple 3 tracks project with 2 images moving on top of a green background (track V1).

2021-03-09_07.44.58

I exported to the .mov format, following the method bellow.
Then used the exported clip on another project.

  • Image on track V1
  • My new .mov clip on track V2 (no filter applied)

2021-03-09_07.55.45

Result:
https://streamable.com/2xt522
https://streamable.com/2xt522 (If the Streamable preview doesn’t work, use this link)

Follow these steps:

  • Create a project with GREEN color clip on V1.
  • Save project.
  • Go to Timeline Menu > Other and choose Copy Timeline to Source
  • Apply Chroma Key: Simple filter on the Source video, with color set to the same green as in V1
  • Go to Export
  • Make sure Source is selected in the From dropdown menu
  • Choose alpha > Quicktime Animation in the Export Presets
  • Activate Advance mode.
  • The Format dropdown menu should be set to mov
  • In the Codec tab, the Codec dropdown should be set to qtrle
  • In the Audio tab, check Disable audio
  • In the Other tab, pix_fmt=argb should be present in the Other text box.
  • Click Export File.
2 Likes

Hello.

Thank you for the response !

The method you’ve stated is correct.
However, this doesn’t work when I have videos on multiple tracks.

Hello.

Thanks for the response.

I have gone through all of the steps you’ve written.
But When I add the chroma key to the source video, it doesn’t do anything. The color that I select From the V1 clip doesn’t get keyed out. As a result I don’t get a transparent background.
I had even selected “from source” in the export dropdown options.

You will not see anything happening when you apply Chromakey on the Source video.
Did you try to export anyway ?

Yeah, I had exported the video and I was getting that green background, which remained un-keyed.

I know… If you play back the exported video in a media player, you’ll still see the green background.

But did you try to use the MOV file in a project ? That’s were you’ll see if it worked or not.

Yes, I had put that .mov file (that I had exported from the source) on another project and the background wasn’t transparent.

Can I see a screenshot of you Shotcut window ?
With the timeline and the preview window visible ?

Yeah sure.

For example here I want to key the green color in the background and make it transparent and I did that in the source and exported the video and put it over another background but as you can see The green background is still visible and it wasn’t keyed

Hey man ! Tried that out once again. And I can’t thank you enough ! I’ve been struggling with that for so many days and finally it worked. Thanks to you !

1 Like

What I see on your capture is a #FFFF00 color clip on V1 and a #FFAAFF color clip on track V2
where is the .mov clip ?

Well… you’re welcome.
Why didn’t it work ? What was the problem ?

1 Like

Good :slight_smile:
It’s important to follow all the steps.
I often forget the Copy Timeline to Source step.

1 Like

I don’t know. Maybe I was doing something wrong that I wasn’t aware of. But I’m happy that it works now :smiley:

1 Like