从PNG文件制作Alpha Mask视频
For RenPy it uses the notion of an Alpha Mask video https://www.renpy.org/doc/html/movie.html#movie-displayables-and-movie-sprites
我可以将一堆带有Alpha通道的PNG转换为 http://wiki.webmproject.org/howtos/convert-png-frames-to-webm-video 我想知道如何在不创建仅包含Alpha的另一组PNG文件的情况下执行相同的操作框架.
I can convert the a bunch of PNGs with alpha channel to http://wiki.webmproject.org/howtos/convert-png-frames-to-webm-video I was wondering how to do the same sort of thing without creating another set of PNG files with just the alpha frame.
如果需要,我会在中间使用imagemagik的东西没问题.
I'll be okay with something that uses imagemagik in the middle if needed.
您可以使用ffmpeg一次创建两个文件.
You can use ffmpeg to create both files at once.
ffmpeg -i img%d.png -filter_complex "alphaextract[a]" \
-map 0:v -pix_fmt yuv420p -c:v libvpx -b:v 0 -crf 20 color.webm \
-map "[a]" -pix_fmt yuv420p -c:v libvpx -b:v 0 -crf 20 alpha.webm
根据您的shell,可能需要用单引号将map arg引用.
Depending on your shell, you may need to quote the map arg in single quotes.