is an option that specifies whether to create a video with a transparency channel.
VideoTransparency
is an option that specifies whether to create a video with a transparency channel.
Details
- Transparent videos are typically used at an intermediate stage of a process for separating foreground from background or overlaying videos.
- Typical settings for VideoTransparency are:
-
False create a video with no transparency True when transparent frames are generated, create a transparent video when possible, fail otherwise Automatic when transparent frames are generated, create a transparent video when possible, drop transparency otherwise - Whether transparency can be stored in the generated video file depends on the video container and codec.
- Use RemoveAlphaChannel to explicitly remove the alpha channel from a video.
Examples
open all close allBasic Examples (1)
By default, many functions create non-transparent videos:
VideoGenerator[ImageRotate[[image], #, All]&, 2π]
Information[%, "Transparency"]Generate a video with an alpha channel:
VideoGenerator[ImageRotate[[image], #, All]&, 2π, VideoTransparency -> True]
Information[%, "Transparency"]Overlay the transparent video over an image:
OverlayVideo[[image], %%]Scope (3)
If VideoTransparency is set to False, the alpha channel of all frames is dropped:
i = SetAlphaChannel[[image], [image]];
v = SlideShowVideo[i, VideoTransparency -> False]Information[v, "Transparency"]If VideoTransparency is set to Automatic, the alpha channel will be preserved if possible:
i = SetAlphaChannel[[image], [image]];
v = SlideShowVideo[i, VideoTransparency -> Automatic];Since not all encoders support alpha channels, an appropriate one needs to be chosen:
Information[v, {"Transparency", "VideoEncoding"}]If the selected encoder does not support transparency, the alpha channel is dropped:
v = SlideShowVideo[i, VideoEncoding -> "H264", VideoTransparency -> Automatic];
Information[v, {"Transparency", "VideoEncoding"}]Not all formats support an encoder that is capable of encoding an alpha channel:
v = SlideShowVideo[i, GeneratedAssetFormat -> "Ogg", VideoTransparency -> Automatic];
Information[v, {"Transparency", "VideoEncoding"}]If VideoTransparency is set to True, the alpha channel of the images will be preserved:
i = SetAlphaChannel[[image], [image]];
v = SlideShowVideo[i, VideoTransparency -> True];Since not all encoders support alpha channels, an appropriate one needs to be chosen:
Information[v, {"Transparency", "VideoEncoding"}]If the selected encoder does not support alpha channels, the evaluation will fail:
SlideShowVideo[i, VideoEncoding -> "H264", VideoTransparency -> True];Applications (1)
Create a transparent video that can be presented on a variety of backgrounds:
vid = AnimationVideo[Graphics[{Inset[[image], ImageScaled[{x - .2, Sqrt@Abs[(.1) ^ 2 - (x - Round[x, .2]) ^ 2] + .025}], {Left, Bottom}]}, IconizedObject[«opts»]],
{x, 1, 0, -1 / 60},
VideoTransparency -> True, RasterSize -> {474, 336}
]Overlay the transparent video onto a virtual background:
OverlayVideo[[image], vid]Properties & Relations (2)
Setting VideoTransparency to True will not create an alpha channel if one does not already exist:
i = ConstantImage[Red];
ImageMeasurements[i, "Transparency"]v = SlideShowVideo[i, VideoTransparency -> True];
Information[v, "Transparency"]Use SetAlphaChannel to explicitly add an alpha channel to a video:
a = SetAlphaChannel[v];
Information[a, "Transparency"]By default, images are blended with White if the alpha channel needs to be removed:
i = SetAlphaChannel[[image], [image]];v = SlideShowVideo[i];
VideoExtractFrames[v, Quantity[1, "Frames"]]Use RemoveAlphaChannel to control how the alpha channel is removed:
v = RemoveAlphaChannel[SlideShowVideo[i, VideoTransparency -> True], Blue];
VideoExtractFrames[v, Quantity[1, "Frames"]]Related Guides
History
Text
Wolfram Research (2022), VideoTransparency, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoTransparency.html.
CMS
Wolfram Language. 2022. "VideoTransparency." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VideoTransparency.html.
APA
Wolfram Language. (2022). VideoTransparency. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoTransparency.html
BibTeX
@misc{reference.wolfram_2026_videotransparency, author="Wolfram Research", title="{VideoTransparency}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/VideoTransparency.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_videotransparency, organization={Wolfram Research}, title={VideoTransparency}, year={2022}, url={https://reference.wolfram.com/language/ref/VideoTransparency.html}, note=[Accessed: 13-June-2026]}