# Is it possible to make a video with transparency?

**URL:** https://discourse.julialang.org/t/is-it-possible-to-make-a-video-with-transparency/113860
**Category:** Visualization
**Tags:** makie
**Created:** [May 5, 2024, 11:45am UTC](https://discourse.julialang.org/t/is-it-possible-to-make-a-video-with-transparency/113860 "2024-05-05T11:45:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [May 5, 2024, 11:45am UTC](https://discourse.julialang.org/t/is-it-possible-to-make-a-video-with-transparency/113860/1 "2024-05-05T11:45:31Z")

</div>

Is it possible to make a video with transparency? I am remaking the DynamicalSystems.jl logo and I would be happy to make a video itself transparent so that it can obtain whatever background color the website has.

The question is, is it even possible?

If anyone knows of a solution I would be glad to hear it! Preferably using Makie!

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [May 5, 2024, 11:52am UTC](https://discourse.julialang.org/t/is-it-possible-to-make-a-video-with-transparency/113860/2 "2024-05-05T11:52:24Z")

</div>

You can render to a gif with transparency using Makie, would that work?

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [May 5, 2024, 11:56am UTC](https://discourse.julialang.org/t/is-it-possible-to-make-a-video-with-transparency/113860/3 "2024-05-05T11:56:27Z")

</div>

Video with transparency is technically possible but support for playing it back varies in my experience. I haven’t tried with Makie, but if you can store images with transparency you can also concat them into a video with ffmpeg. So this workaround for GLMakie applies for example

[https://docs.makie.org/stable/how-to/save-figure-with-transparency/](https://docs.makie.org/stable/how-to/save-figure-with-transparency/)

I would google around a bit first what’s the best compatibility options for using transparent videos on websites, there will be some ffmpeg incantations around on stackoverflow etc. At the time I wanted one to use in powerpoint and that took a while to get the codec set up exactly right…

Found this just now for example [How to use transparent videos on the web in 2023 - Rotato | Rotato](https://rotato.app/blog/transparent-videos-for-the-web) with the interesting tidbit:

> We’ve had transparent video formats for years. So why isn’t this simple? Long legal story short: There are two significant browsers from two big companies. Google and Chrome think open source is fantastic, so they made their own open-source format. Apple and Safari want to stick to the MPEG standard, so they support HEVC (H265).
> 
> The results?
> 
> - Safari supports **HEVC** with alpha, and Chrome does not.
> - Chrome supports **VP9** with alpha, and Safari does not.
> 
> Now what? You guessed it: We’ll have to provide _both_ formats and let each browser choose.

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [May 5, 2024, 12:03pm UTC](https://discourse.julialang.org/t/is-it-possible-to-make-a-video-with-transparency/113860/4 "2024-05-05T12:03:49Z")

</div>

thanks both, I will do some research. GIF is always possible, but my main problem is that it creates massive file sizes for the amount of animation I would like to bake in. I’ll see if I can reduce the framerate or something else to make it more approachable.

---

<div class="post-metadata">

### Author: ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)
#### Post date: [May 5, 2024, 2:39pm UTC](https://discourse.julialang.org/t/is-it-possible-to-make-a-video-with-transparency/113860/5 "2024-05-05T14:39:45Z")

</div>

If you only have a few themes, it’s possible to use CSS to select a version of the GIF/video to display - then you could have one version per theme.
