cshum / imagorvideo

imagor video thumbnail server in Go and ffmpeg C bindings
Apache License 2.0
180 stars 13 forks source link

How to apply chroma key? #68

Open hasnhasan opened 1 year ago

hasnhasan commented 1 year ago

How can I set the following code with this library?

ffmpeg -i source.mp4 -filter_complex "[0:v]chromakey=0x276100:1:0.1[out]" -map "[out]" -c:v prores -pix_fmt yuva444p10le transparent.mkv -y

ffmpeg -i transparent.mkv -i mask.mp4 -filter_complex "[0:v][1:v]overlay[out]" -map "[out]" final.mkv -y ffmpeg -i transparent.mkv -i mask-2.mp4 -filter_complex "[0:v][1:v]overlay[out]" -map "[out]" final-2.mkv -y

In order not to run chroma key continuously, apply chroma key once. I need to apply later.