Yogas
Yogas

Reputation: 13

How to include both audios when overlay video on video with FFMPEG

I have 2 inputs: video.mp4 (with audio) and notif.mov (with audio). I want to overlay notif.mov on video.mp4. I tried this code:

ffmpeg -y -i video.mp4  -i "notif.mov" -filter_complex "[0:v][1:v]overlay=0:0" output.mp4

Both videos playing simultaneously, but sound missing from second input (notif.mov).

Upvotes: 1

Views: 964

Answers (2)

Seb
Seb

Reputation: 75

ffmpeg -i back.mp4 -i petite.mp4 -filter_complex "overlay=20:20" output.mp4

ffmpeg -y -i out.mp4 -i 1080_Happy_Holidays_Red_Videvo.mov -i logo.png -filter_complex "[0]scale=iw/4:-1[pip];[1][pip]overlay=100:100[watermark];[watermark][2]overlay=main_w-overlay_w-10:main_h-overlay_h-10" output.mp4

Upvotes: 0

llogan
llogan

Reputation: 133743

Add the amix filter:

ffmpeg -i video.mp4 -i notif.mov -filter_complex "[0:v][1:v]overlay;[0:a][1:a]amix" output.mp4

Upvotes: 2

Related Questions