Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chromakey: ffmpeg green color video removal

I am using ffmpeg on Mac to remove green background of video and add other background as image it is converting properly the video but auido is missing. I am using below command.

Am I doing anything wrong here?

ffmpeg -i bg.jpg -i input.mp4 -filter_complex "[1:v]colorkey=0x3BBD1E:0.3:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" output.mp4
like image 720
AppleBee Avatar asked Nov 19 '25 10:11

AppleBee


1 Answers

I solved it my own.

ffmpeg -i bg.jpg -i input.mp4 -filter_complex "[1:v]chromakey=0x3BBD1E:0.1:0.2[ckout];[0:v][ckout]overlay[o]" -map [o] -map 1:a output.mp4

we need to add flags for audio.

like image 198
AppleBee Avatar answered Nov 22 '25 02:11

AppleBee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!