3

I have 2 video files. One file is the main content and the other file has an alpha channel emulated with black and white (white = opacity 100 and black = opacity 0). Sometimes the emulated alpha channel file has only full black and full white frames, but I think some videos that I want to create will have complex alpha channel emulation with gray scales.

Is it possible to make with ffmpeg an vp8,vp9 -pix_fmt yuva420p ready .webm movie?

1 Answer 1

3

The alphaextract/alphamerge filters are meant for this.

Since your alpha reference is already greyscale, we only need the alphamerge filter

ffmpeg -i main.mp4 -i alpha.mp4 -filter_complex [0][1]alphamerge,format=yuva420p -c:v libvpx -auto-alt-ref 0 out.webm
1
  • Wonderfull! A perfect result with b/w and complex greyscale alphaemulated movies:). Now i can relaxed wait that my Videoediting and Animating Software implement this automatically. Commented Apr 9, 2018 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.