Reputation: 23
This is my code
ffmpeg -i video.mp4 -i anim.gif -filter_complex "[1:v] loop=-1,scale=300:-1 [ol], [0:v] [ol] overlay=W-w:H-h-10" -codec:a copy -y out.mp4
But am unable to put it in loop the gif according to video length
Am also trying to scale the gif width to 30% of th main video width Gif positioing working here am able to position the gif at the bootom right corner But i also need to scale it according to main video width
Upvotes: 0
Views: 472
Reputation: 1084
add -ignore_loop 0
to gif input:
ffmpeg -i video.mp4 -ignore_loop 0 -i anim.gif -filter_complex "
[1:v][0:v]scale2ref=w=iw*0.3:h=ow*mdar [ol][bg];
[bg][ol] overlay=W-w:H-h-10:eof_action=pass
" -shortest -c:a copy -y out.mp4
use scale2ref
for 30% scale of input video
Upvotes: 1