<p>While not a direct solution, AVISynth supports creating a mask from a Chroma key using <a href="http://avisynth.nl/index.php/Layer#ColorKeyMask" rel="nofollow">ColorKeyMask</a>.  You can then use that mask to blend the two layers together by using Mask on the top layer and then Layering them together.</p>

<p>You could then just feed files in to the script and use FFMPEG or something similar to write out the frame stream from AVISynth.  </p>

<p>Note that you will still need to adjust the color of the background and the tolerance if they lighting isn't really consistent between shots of the green background though.</p>

CC BY-SA 3.0
2014-04-07T14:51:51.527Z
2014-04-07T14:51:51.527Z
AJ Henderson
<p>Do you know about any video processing software that can do chroma key of two video files, but run from command line as well?</p>

<p>I have two static video files (let's say MP4, same length) - one with green bg and another to be used as background video. I need to do chroma key effect. And it doesn't have to be perfect.</p>

<p>Two video files -> [software] -> one output video. Just so.</p>

CC BY-SA 3.0
2014-04-07T13:41:38.070Z
Relevant questions on other stackexchange sites: http://stackoverflow.com/q/8299252/1256347 and http://superuser.com/q/549448/141595
Saaru Lindestøkke
<greenscreen><chromakey>
Chroma Key video software for command line
cadavre
# Chroma Key video software for command line

(Asked by: username_0 on 2014-04-07)

Do you know about any video processing software that can do chroma key of two video files, but run from command line as well?

I have two static video files (let's say MP4, same length) - one with green bg and another to be used as background video. I need to do chroma key effect. And it doesn't have to be perfect.

Two video files -> [software] -> one output video. Just so.

**Tags:** greenscreen, chromakey

> **Comments:**
> **username_1**: Relevant questions on other stackexchange sites: http://stackoverflow.com/q/8299252/1256347 and http://superuser.com/q/549448/141595  

---

## 1 answers

### Answer by username_2 on 2014-04-07. Score: 1

While not a direct solution, AVISynth supports creating a mask from a Chroma key using [ColorKeyMask](http://avisynth.nl/index.php/Layer#ColorKeyMask). You can then use that mask to blend the two layers together by using Mask on the top layer and then Layering them together.

You could then just feed files in to the script and use FFMPEG or something similar to write out the frame stream from AVISynth.

Note that you will still need to adjust the color of the background and the tolerance if they lighting isn't really consistent between shots of the green background though.


---

