how can I convert a stack of PNGs with transparency to a video playable with Keynote
Asked Answered
W

1

-1

I used to convert a stack of PNGs with alpha transparency using ffmpeg:

ffmpeg -i frame_%03d.png -vcodec png output.mov

I have an old mov where this worked. Now I tried to do that again a while later (on an M1 Mac now). Now it doesn't work anymore. Here are the file properties:

property old movie (works) new movie (does not work)
resolution 378 × 378 1600 × 1000
codec Apple ProRes 4444 PNG
alpha channel yes ?
color profile SD (6-1-6) ?
software Lavf57.41.100 Lavf59.16.100

The ? shows that I cannot open the new file in Quicktime, nor import it in Keynote. Any idea how I can use ffmpeg to convert my image stack to a file with transparency that works in Keynote / Quicktime?

Whoredom answered 27/6, 2022 at 20:8 Comment(0)
W
0

This page and experimenting helped me find a solution:

ffmpeg -i frame_%03d.png -c:v prores_ks -profile:v 5  -bits_per_mb 8000 -pix_fmt yuva422p10le output.mov

The key seems to be the a in yuva444p10le which enables an alpha channel and to use the profile 4 or 5 (didn't see a difference). Using the encoder prores or prores_aw also gave no alpha in my experiments.

Bonus: on a Mac, a right-click on the resulting file and selecting the video-encoding option opens a dialogue. Using one of the HEVC options and selecting the checkmark to keep transparency brings the file size way down (from 109 MB to 3 MB in my case).

Whoredom answered 28/6, 2022 at 12:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.