I cannot figure out how to add video over video circular at specific time
The following command
ffmpeg -y -i blank.mp4 -i yellow.mp4 -filter_complex "[1:v]scale=0.15*iw:-1,pad=iw+20:ih+20:10:10:color=red,setpts=PTS-STARTPTS+2/TB[v1];[0:0][v1]overlay=W-w-20:H-h-20:eof_action=pass:enable='between(t\,2,4)'[vo1]; [0:a]adelay=0|0[a0]; [1:a]adelay=2000|2000[a1];[a0][a1]amix=inputs=2[outa]" -map "[vo1]" -map "[outa]" -c:a aac -c:v libx264 -preset slow output.mp4
Return
That's great, but I need it circular like this
I'm trying with
ffmpeg -y -i blank.mp4 -i yellow.mp4 -filter_complex "[1:v]geq='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),pow(min(W/2,H/2),2)),255,0)':128:128,scale=0.15*iw:-1,pad=iw+20:ih+20:10:10:color=red,setpts=PTS-STARTPTS+2/TB[v1];[0:0][v1]overlay=W-w-20:H-h-20:eof_action=pass:enable='between(t\,2,4)'[vo1]; [0:a]adelay=0|0[a0]; [1:a]adelay=2000|2000[a1];[a0][a1]amix=inputs=2[outa]" -map "[vo1]" -map "[outa]" -c:a aac -c:v libx264 -preset slow output.mp4
The result is not what I expect.
To fast generate blank.mp4 and yellow.mp4 use
ffmpeg -y -f lavfi -i "color=black:s=1280x720:r=25" -f lavfi -i "anullsrc=r=44100:cl=stereo" -c:a aac -c:v libx264 -preset slow -t 5 blank.mp4
ffmpeg -y -f lavfi -i "color=yellow:s=1280x720:r=25" -f lavfi -i "anullsrc=r=44100:cl=stereo" -c:a aac -c:v libx264 -preset slow -t 2 yellow.mp4