I am a researcher, trying to string together a bunch of png files of a protein to a short video. I have all the png images with transparent backgrounds, but I can't seem to get this in the video.
I use this (on macOS terminal) to convert:
ffmpeg -framerate 20 -pattern_type glob -i '*.png' -c:v libx264 -preset slow -profile:v high -level:v 4.0 -pix_fmt yuv420p -vf pad="width=ceil(iw/2)*2:height=ceil(ih/2)*2" -crf 22 -codec:a aac -pix_fmt yuva420p SST4.mp4
I added the
-pix_fmt yuva420p that I found as an accepted answer here, but it doesn't work for me. I also tried other options (
bgra, etc.), but none I have tried works. I get a nice video, just with black background instead of transparent.