Answers.Body: <p>To me it is just the matter of the edge color</p>
  <p>The <a href="https://ffmpeg.org/ffmpeg-filters.html#colorkey" rel="nofollow noreferrer">colorkey</a> has a similarity parameter; should you try not using 1</p>
  <p>Since i don't have any asset to try on this parameter, good luck.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-06T02:36:22.637Z
Answers.LastActivityDate: 2020-09-06T02:36:22.637Z
Answers.UserDisplayName: xer-rex
Body: <p>I have a video of a person on green background and I'm trying to turn background transparent:</p>
  <pre class="lang-bash prettyprint-override"><code>ffmpeg -i bg.mp4 -i man.mp4 -filter_complex '[1:v]colorkey=0x00ff00:0.3:0.3[ckout];[0:v][ckout]overlay[out]' -map '[out]' result.mp4
  </code></pre>
  <p>Colorkey gives this quite noticeable green edge around the person's figure.<br />
  Any attempts to increase opacity or blend parameters result in disappearing facial features.</p>
  <p><a href="https://i.sstatic.net/RxBJ1.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RxBJ1.png" alt="enter image description here" /></a></p>
  <p>Is there any smart way to change pure green <code>0x00ff00</code> pixels with transparent ones?</p>
  
Tags: <ffmpeg><chromakey>
Title: FFmpeg: chromakey without green edges
UserDisplayName: Igniter
ThreadText: # FFmpeg: chromakey without green edges
  
  (Asked by: username_0 on 2020-09-05)
  
  I have a video of a person on green background and I'm trying to turn background transparent:
  
  ```bash
  ffmpeg -i bg.mp4 -i man.mp4 -filter_complex '[1:v]colorkey=0x00ff00:0.3:0.3[ckout];[0:v][ckout]overlay[out]' -map '[out]' result.mp4
  
  ```
  
  Colorkey gives this quite noticeable green edge around the person's figure.  
  Any attempts to increase opacity or blend parameters result in disappearing facial features.
  
  [![enter image description here](https://i.sstatic.net/RxBJ1.png)](https://i.sstatic.net/RxBJ1.png)
  
  Is there any smart way to change pure green `0x00ff00` pixels with transparent ones?
  
  **Tags:** ffmpeg, chromakey
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-09-06. Score: 0
  
  To me it is just the matter of the edge color
  
  The [colorkey](https://ffmpeg.org/ffmpeg-filters.html#colorkey) has a similarity parameter; should you try not using 1
  
  Since i don't have any asset to try on this parameter, good luck.
  
  
  ---
  
  