Creating transparent Movies for Keynote with ffmpeg
Table of Contents
I wanted to integrate a transparent video into my master thesis presentation. Unfortunately Keynote requires special encoding to support transparency in video.
Encode the video #
Videos have to be encoded with qtrle
. For a folder containing numbered xx.png
files we can create the video in the following way:
ffmpeg -framerate 2 -i %02d.png -vcodec qtrle movie.mov
Generating transparent Images #
With imagemagick it is also possible to replace the background of white images to a transparent background:
mogrify -transparent white *.png
This will replace the white color in all images ending with .png
with the alpha value 0
. Imagemagick will also take a fuzz value -fuzz 2%
.
For more details see this stackoverflow post.
Note that convert
will take a single file where as mogrify
will apply these changes to multiple images.