How can I add a moving logo to a long video with FFMPEG?

I tested out the moving logo on a short clip using the following code:

ffmpeg -i input.mp4 -i logo.png -filter_complex "[1:v]scale=200:-1[logo];[0:v][logo]overlay=x='(W-w)/2*(1+sin(2*PI*t/5))':y='(H-h)/2*(1+cos(2*PI*t/7))'" -c:a copy output.mp4

The results are sufficient for what I’d like. So now I was wondering, could I take a 4 hour long video and insert 20 seconds of the moving logo every 10 minutes? I’m fairly new to all this so I apologize if this is super easy and/or ridiculous. Thanks!

Read more here: Source link