bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.61k stars 1.59k forks source link

Record Activity - How to apply color key filter for FFmpegFrameRecorder #1207

Open Mohammed3194 opened 5 years ago

Mohammed3194 commented 5 years ago

Hi @saudet @lfdversluis @pachev , I am following this Url to capture the video to remove Green(Chroma key effect) - https://github.com/bytedeco/javacv/blob/master/samples/RecordActivity.java

To record the video by applying ffmpeg color key filter as filterString = "colorkey=#3BBD1E:0.33:0.23"; But, unable to apply the filter while recording the video Please help me, if i am going wrong in filter command

saudet commented 5 years ago

What happens?

Mohammed3194 commented 5 years ago

What happens?

I am able to record the video after applying the filter (filterString = "colorkey=#3BBD1E:0.33:0.23") But, while recording the video, If i face camera towards a green screen camera does not make green color as transparent. It will capture green color also. My requirement is too make the green portion transparent when i face the camera to green screen/objects.

saudet commented 5 years ago

Try to increase the "similarity" option.

Mohammed3194 commented 5 years ago

Try to increase the "similarity" option.

Okay, i will try doing that and update you

Mohammed3194 commented 5 years ago

Try to increase the "similarity" option.

Okay, i will try doing that and update you

@saudet, I tried changing filterString by (filterString = "colorkey=#3BBD1E:0.43:0.33") There is no change while recording the video and also in output file

And, i am following the same code of URL https://github.com/bytedeco/javacv/blob/master/samples/RecordActivity.java And have just changed the filterString in the code with this (filterString = "colorkey=#3BBD1E:0.43:0.33")

Please help me out in resolving this

SonamKamble commented 4 years ago

I am facing same issue applying filter. No change is applied. Kindly help soon.