I am trying to overlay a logo on a video every 60 seconds for a duration of 5 seconds using ffmpeg. Here’s the command I am using:
ffmpeg -i input.mp4 -i logo.png -filter_complex "[0:v]setpts=PTS-STARTPTS[v0];[1:v]loop=-1:size=1:start=0,setpts=N/(FRAME_RATE*TB)[logo];[v0][logo]overlay=enable='mod(t,60)<5':x=W-w-10:y=H-h-10[out]" -map "[out]" -map 0:a -c:a copy output.mp4
However, I am encountering the following error:
[overlay @ 000002199e0b3f00] [Eval @ 000000f94f9feff0] Invalid chars '<5' at the end of expression 'mod(t,60)<5'
[overlay @ 000002199e0b3f00] Error when evaluating the expression 'mod(t,60)<5' for enable
[AVFilterGraph @ 000002199e098b00] Error initializing filters
Failed to set value '[0:v]setpts=PTS-STARTPTS[v0];[1:v]loop=-1:size=1:start=0,setpts=N/(FRAME_RATE*TB)[logo];[v0][logo]overlay=enable='mod(t,60)<5':x=W-w-10:y=H-h-10[out]' for option 'filter_complex': Invalid argument
Error parsing global options: Invalid argument
I am using ffmpeg version X.XX on [your OS here, e.g., Windows 10].
I want the logo to appear every 60 seconds for 5 seconds at the bottom-right corner of the video.
The input video and logo files are valid and can be processed with simpler ffmpeg commands.
How can I correctly format the ffmpeg command to overlay the logo every 60 seconds without encountering the invalid argument error?