Glam Prestige Journal

Bright entertainment trends with youth appeal.

I have two videos merged into one file using below command. Unfortunately second video covers first video and it is not visible. How to make second video transparent (eg. 50%)?

ffmpeg -i in1.mp4 -i in2.mp4 -filter_complex "nullsrc=size=480x360 [base]; [0:v] setpts=PTS-STARTPTS, scale=480x360 [top]; [1:v] setpts=PTS-STARTPTS, scale=480x360 [bottom]; [base][top] overlay=shortest=1 [temp]; [temp][bottom] overlay=shortest=1" -acodec libvo_aacenc -vcodec libx264 out.pm4
2

1 Answer

Use

ffmpeg \ -i in1.mp4 -i in2.mp4 \ -filter_complex " \ [0:v]setpts=PTS-STARTPTS, scale=480x360[top]; \ [1:v]setpts=PTS-STARTPTS, scale=480x360, \ format=yuva420p,colorchannelmixer=aa=0.5[bottom]; \ [top][bottom]overlay=shortest=1" \ -acodec libvo_aacenc -vcodec libx264 out.mp4

Set aa to the opacity value needed.

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy