how to display and hide the watermark on a video using ffmpeg

i’m new to ffmpeg i want to add any animation to the watermark
this is my php code:

$source=$_SERVER['DOCUMENT_ROOT']."/content/uploads/".$row['source'];
            $command = "ffmpeg -i ".$source." -i medada.png";
            $command .= " -filter_complex "[0:v][1:v]";
            $command .= " overlay=25:150""; 
            $str = rand();
            $result = hash("sha256", $str);
            $path_info = pathinfo($source);
            $extension=$path_info['extension'];
            $command .= " -c:a copy ".$_SERVER['DOCUMENT_ROOT']."/content/downloads/".$result.".".$extension."";