Answers.Body: <p>The alphaextract/alphamerge filters are meant for this.</p>
  
  <p>Since your alpha reference is already greyscale, we only need the alphamerge filter</p>
  
  <pre><code>ffmpeg -i main.mp4 -i alpha.mp4 -filter_complex [0][1]alphamerge,format=yuva420p -c:v libvpx -auto-alt-ref 0 out.webm
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-09T10:53:24.187Z
Answers.Text: 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.
Answers.UserDisplayName: CyberPunkBln
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-09T10:41:21.823Z
Answers.LastActivityDate: 2018-04-09T10:41:21.823Z
Answers.UserDisplayName: Gyan
Body: <p>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.</p>
  
  <p>Is it possible to make with ffmpeg an vp8,vp9 -pix_fmt yuva420p ready .webm movie?</p>
  
Tags: <ffmpeg><alpha><vp9>
Title: Create Alpha channel-Videos (obs stinger compatible) with ffmpeg and 2 files
UserDisplayName: CyberPunkBln
ThreadText: # Create Alpha channel-Videos (obs stinger compatible) with ffmpeg and 2 files
  
  (Asked by: username_0 on 2018-04-09)
  
  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?
  
  **Tags:** ffmpeg, alpha, vp9
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-04-09. Score: 3 | Accepted answer
  
  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
  
  ```
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  