How do I make a video animation with transparent background?

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Tue Aug 9 21:50:43 EDT 2016


On Wednesday, August 10, 2016 at 12:44:30 AM UTC+12, Martin Schöön wrote:

> What I have failed to achieve is a graph with a transparent
> background.

While it is possible to render image frames with alpha transparency channels, as far as I know none of the motion-video image formats supports transparency. They all assume that the image fills the entire frame and completely covers anything behind.

You could invent your own player which draws the frames one after another itself. Note that the JPEG image format doesn’t support transparency; you would have to use a bulkier format like PNG.

Another option would be to have an additional video track where the image is interpreted purely as transparency masking information for the “proper” video track. You would still need to write your own player to handle this.



More information about the Python-list mailing list