Niraj Pathak
Niraj Pathak

Reputation: 19

Adding overlay image to video on specific position ffmpeg

I want to add one or multiple resized images anywhere over the video using ffmpeg. It works well for some position. However, it does not add images to the exact position I want. I have tested it on console and its embedded in php with dynamic variables.

ffmpeg -y -i vid_1561454052.mp4 -i Penguins.jpg -filter_complex "[0:v][1:v] overlay=221:127:enable='between(t,0,5)'" -pix_fmt yuv420p -aspect 16:9 -c:a copy vid_1562740969.mp4

Please Help me out...

Upvotes: 2

Views: 1912

Answers (1)

nico_lab
nico_lab

Reputation: 1194

use loop option

ffmpeg -y -i vid_1561454052.mp4 -loop 1 -i Penguins.jpg \
-filter_complex "[0:v][1:v] overlay=221:127:enable='between(t,0,5)'" \
-pix_fmt yuv420p -aspect 16:9 -c:a copy vid_1562740969.mp4

Upvotes: 3

Related Questions