Monday, November 15, 2010

How to set chroma key effect using MLT framework ?

This is one of the big issue that every MLT developer faced while trying to set chroma effect to a video clip. I had a research on this issue and finally got its solution.....the solution is some how like this..........you first declare your video clip and then use the following expression...

"melt avformat:clip1.avi in=0 out=1000 -filter chroma key=#00FF00 variance=0.385"

in the above code "key" is nothing but the colors declared in a hexadecimal format .You can set multiple keys to the filter itself. "variance" is used to set opacity level .you can also vary it as per your preferences.

for any query on MLT framework you can contact me ..my email id is.."animeshnanda@gmail.com"

6 comments:

  1. Thanks animesh..........your code is working fine.......

    ReplyDelete
  2. It's good have your documentation over MLT framework using chroma key effect..Thanks a lot.

    ReplyDelete
  3. hello. I dont get how does it work. it is supposed chromakey needs two clips. One as background and other as chromakeyed. When i run this example i get the same clip even when i set variance=1. Is there something i dont get?
    Thanks

    ReplyDelete
  4. Chromakey doesn't need two clips. It's a filter only which will remove a specified color from your video file. For running two videos at a time you need to apply overlapping concept.You can follow the link given below.

    http://animeshnanda.blogspot.com/2010/11/how-to-set-video-clip-and-audio-track.html

    In chromakey concept chroma defines a filter and key defines a color and variance defines how much transperancy you want for your overlaping video.Remember you need to apply chroma key filter over the overlapped video.
    Let me know if it works fine.

    ReplyDelete
  5. Replies
    1. Can u please send me your scenario...where u get stuck

      Delete