FFMPEG Sound lost after doing overlay of images on a video

0

I am new to ffmpeg. trying to overlay multiple images on a video at a different intervals. I have used below command to do so,

ffmpeg -i _2.mp4  -i gloves.png -i socks.png -i shoes.png -filter_complex 
"[0][1]overlay=y=H-h:enable='between(t,3,8)'[v1]; 
 [v1][2]overlay=y=H-h:enable='between(t,6,8)'[v2];
 [v2][3]overlay=y=H-h:enable='between(t,8,10)'[v3]" 
-map "[v3]" outputVideo.mp4

Overlay is working as expected but in the output video there is no sound.

Please help me with this.

-Shobha

user1057053

Posted 2019-07-01T14:39:58.040

Reputation: 1

Answers

1

Since you already have one map assignment, you need to map the audio as well.

Use

ffmpeg -i _2.mp4 -i gloves.png -i socks.png -i shoes.png -filter_complex "[0][1]overlay=y=H-h:enable='between(t,3,8)'[v1]; [v1][2]overlay=y=H-h:enable='between(t,6,8)'[v2]; [v2][3]overlay=y=H-h:enable='between(t,8,10)'[v3]" -map "[v3]" -map 0:a -c:a copy outputVideo.mp4

See http://ffmpeg.org/ffmpeg.html#Stream-selection for details.

Gyan

Posted 2019-07-01T14:39:58.040

Reputation: 21 016

Thank you so much, it worked :) – user1057053 – 2019-07-01T14:51:42.627