Render WebM with Transparency in Kdenlive
This guide explains how to configure a custom render profile in Kdenlive to export WebM videos with transparency (alpha channel) using the VP8 or VP9 codecs. By setting up a custom FFmpeg profile, you can successfully preserve transparent backgrounds for web graphics, overlays, and stream alerts.
To export a video with a transparent background in Kdenlive, you must
create a custom rendering profile that forces the FFmpeg encoder to use
a pixel format that supports alpha channels (yuva420p).
Step 1: Open the Render Widget
Open your project in Kdenlive. Ensure that your timeline contains transparent areas (for example, text or animations over an empty track with no solid background color). Open the render dialog by clicking the Render button in the top toolbar or by pressing Ctrl + Enter.
Step 2: Create a Custom Render Profile
- In the Render window, click the Create New Profile icon (represented by a document icon with a plus sign) located next to the profile search bar.
- In the configuration window that appears, set the
Group to
WebM Custom. - Set the Profile Name to
WebM VP9 with Alpha. - Set the Extension to
webm.
Step 3: Enter the Render Parameters
In the Parameters field, copy and paste one of the following configuration strings depending on your preferred codec.
For VP9 (Recommended for better compression and quality):
f=webm vcodec=libvpx-vp9 pix_fmt=yuva420p lossy=1 strict=-2 acodec=libopus
For VP8 (Better compatibility with older systems):
f=webm vcodec=libvpx pix_fmt=yuva420p acodec=libvorbis
Note: The inclusion of pix_fmt=yuva420p is critical,
as the “a” in “yuva” represents the alpha channel required for
transparency.
Step 4: Save and Render
- Click OK to save the new profile.
- Select your newly created profile from the list under the custom category.
- Choose your output file path and name.
- Click Render to File.
The exported WebM video will now retain its transparent background when imported into OBS Studio, web browsers, or other compatible video players.