Chromakey Filter
Hello,
Do you have an example for the Chromakey Filter?
Hello, @hasnhasan
Most filters are working pretty straightforward - just
- create new one with
gmf.NewFilter()and pass filter description - put frame into with
filter.AddFrame() - get filtered frame with
filter.GetFram()
No needs for extra stuff. You can get any example from examples/ and add filter there and it will work.
Watermark example is a little bit tricky, that is why it's there.
I want to apply chromakey to the data coming from rtmp server. Then I want to give many different overlays to the transparent stream and send it to the rtmp client.
Example Code;
ffmpeg -i sources/source.mp4 -vf "chromakey=0x276100:0.060:0,despill=green=-1,boxblur=0:0:0:0:3:2" -c:v prores -pix_fmt yuva444p10le transparent.mkv -y
Overlay;
ffmpeg -i transparent.mkv -stream_loop 1 -i mask1.mp4 -filter_complex "[1:v][0:v]overlay[out]" -map "[out]" -f flv rtmp://127.0.0.1/live/test1
ffmpeg -i transparent.mkv -stream_loop 1 -i mask2.mp4 -filter_complex "[1:v][0:v]overlay[out]" -map "[out]" -f flv rtmp://127.0.0.1/live/test2...