SUMMARY Video clip with alpha channel shows up with a black background. This issue has a community discussion on it here: https://discuss.kde.org/t/rendering-video-with-alpha-renders-transparent-content-as-black-23-04-0/4930/9 STEPS TO REPRODUCE 1. In Kdenlive, Export a video with the Alpha VP8 preset, making sure it has a transparent background (use the chromakey effect for example) 2. Check that the rendered video has an alpha channel (look at its properties), and import it into Kdenlive OBSERVED RESULT The video isn't transparent and shows up with a black background. EXPECTED RESULT It should show up with a transparent background, or there should be a setting somewhere to "turn on alpha transparency" for the video clip. SOFTWARE/OS VERSIONS Windows: 11 ADDITIONAL INFORMATION I tried the workaround described in the discussion above, but it didn't work. The value in my .mlt script file was a single “0”. I changed it to “#00000000” as per the discussion above, ran the script, and brought the resulting video back into Kdenlive, but the same issue remains and the transparent background is still black. I also tried applying the “Alpha Operations” effect, but there is no “Selection on Transparent” option there. I asked Perplexity about this and it pointed me to some project monitor setting to show the alpha transparency, but I’m not finding this, so it may be an AI hallucination.
You can test video transparency here: https://rotato.app/tools/transparent-video
Just to be sure I understand: the rendered video has an alpha channel, but the transparency is show as black in the Clip Monitor ? If that is the issue, you can change the monitor background color in the monitor menu (hamburger menu besides the timecode) then Background Color > Checkerboard - see the screenshot attached
Created attachment 186812 [details] monitor background menu
Thanks for the pointer, I didn't know about this. But the issue appears to be with the project monitor - the background of the video file (with the alpha channel) still shows up as black in the project. I will try to attach the video file and a screenshot here if it lets me.
Created attachment 186851 [details] Project Monitor Issue (not showing transparent videos) Screenshot of project monitor showing that the background of a video with a transparent background, is displayed as black, as opposed to transparent (if it were transparent, the entire background should look like the chromakey green).
Created attachment 186852 [details] Video with Alpha This is a video with an alpha channel for transparent background.
(In reply to slt from comment #6) > Created attachment 186852 [details] > Video with Alpha > > This is a video with an alpha channel for transparent background. Using this example, it works for me (25.08.1 Flatpak on Pop!_OS 22.04 with X11). My default track compositing composition is set to qtblend. Check your Settings. I had, however, to set an IN point for the webm file because the first couple of seconds there is no alpha - at least the space around the character is shown as black.
(In reply to Bernd from comment #7) > (In reply to slt from comment #6) > > Created attachment 186852 [details] > > Video with Alpha > > > > This is a video with an alpha channel for transparent background. > > Using this example, it works for me (25.08.1 Flatpak on Pop!_OS 22.04 with > X11). My default track compositing composition is set to qtblend. Check your > Settings. interesting - went to settings dialog but couldn't find where to set this > > I had, however, to set an IN point for the webm file because the first > couple of seconds there is no alpha - at least the space around the > character is shown as black. it's just the video fading in, but ok I set the in IN point to about 00:00:00,20 in the clipMonitor, then I dragged the clip into my timeline, but it still shows the black fade-in.
(In reply to slt from comment #8) > interesting - went to settings dialog but couldn't find where to set this It's in the Misc section right above the settings for default duration
Thanks, found it. Tried again and the black background still appears in my project monitor. Will attach screenshots. Just to be clear: My expectation is that a video with alpha transparency should display with the transparency on, when imported into my timeline. This means no black background or even the checkered background. The elements directly below the video should be visible where the transparency is.
Created attachment 186902 [details] Clip monitor of video with alpha transparency
Created attachment 186903 [details] Project monitor showing video with alpha transparency but with black background
Attached screenshots showing issue, even after changing track compositing to qtblend, and setting IN point of clip to where the transparency starts.
(In reply to slt from comment #11) > Created attachment 186902 [details] > Clip monitor of video with alpha transparency The checkered background is the default for the Clip Monitor and is only visible if a clip has transparency. So this works as expected. You can change the background pattern and color by clicking on the hamburger menu (the three stacked lines) below the clip monitor and select Background Color.
(In reply to slt from comment #12) > Created attachment 186903 [details] > Project monitor showing video with alpha transparency but with black > background There is no other video clip below the clip to show through. Kdenlive renders black as the default background which is normally covered by clips but of course shows through if there is transparency in any clip that is not covered by any other clip below. So, your screenshot does NOT indicate any bug or faulty behavior of Kdenlive. Please confirm that this is indeed the case.
(In reply to Bernd from comment #15) > (In reply to slt from comment #12) > > Created attachment 186903 [details] > > Project monitor showing video with alpha transparency but with black > > background > > There is no other video clip below the clip to show through. Kdenlive > renders black as the default background which is normally covered by clips Ah... so this is why my green background is being blocked by the black background? Is there a way to turn this default off? If the video has transparency shouldn't the background display below the transparent areas of the video? > but of course shows through if there is transparency in any clip that is not > covered by any other clip below. > > So, your screenshot does NOT indicate any bug or faulty behavior of Kdenlive. > > Please confirm that this is indeed the case. Ok I will try this and report back
(In reply to slt from comment #16) > Ah... so this is why my green background is being blocked by the black > background? Is there a way to turn this default off? If the video has > transparency shouldn't the background display below the transparent areas of > the video? I don't know how else to explain it: if the only (video) clip in the timeline has transparency, there is nothing but black to see through the transparent areas. Only if there are color clips or other image or video clips in tracks below the clip with transparency, can you see the color clips or other image or video clips through the transparent areas. If you want YOUR video that contains a clip with transparency to have transparency, you need to render it with a format/codec that supports transparency (currently that is V8/V9 in a webm container, or Apple Quicktime in MOV).
(In reply to Bernd from comment #17) @bernd ok, confirming that items below the video DO show through. After more investigation I think I may have figured out why I thought the video was blocking the green background: It wasn't the video, but the video project's background which was black, over the green preview area background. The entire time I thought the preview area background was the video background. The problem now is I can't remember how I changed that preview background to green, and I can't figure out how to change the video background... > (In reply to slt from comment #16) > > Ah... so this is why my green background is being blocked by the black > > background? Is there a way to turn this default off? If the video has > > transparency shouldn't the background display below the transparent areas of > > the video? > > I don't know how else to explain it: if the only (video) clip in the > timeline has transparency, there is nothing but black to see through the > transparent areas. > > Only if there are color clips or other image or video clips in tracks below > the clip with transparency, can you see the color clips or other image or > video clips through the transparent areas. > > If you want YOUR video that contains a clip with transparency to have > transparency, you need to render it with a format/codec that supports > transparency (currently that is V8/V9 in a webm container, or Apple > Quicktime in MOV).
(In reply to slt from comment #18) > The problem now is I can't remember how I changed that preview background to > green, and I can't figure out how to change the video background... You can change the clip/project monitor background color in Settings > Colors and Guides. Please note this changes only the background in the application. A rendered video that has clips with transparency will always have a black background in those areas of transparency where there is no other clip underneath the one with transparency. If you want your final (rendered) video to show a different color as background where clips have transparency, you need to have a color clip on track V1 for the entire length of the video. Thanks for confirming that this works as designed and is in fact not a bug. I am closing this topic now. You can always reopen it if you think it needs further discussion.