diff --git a/ffmpeg-service/main.py b/ffmpeg-service/main.py index a343ae6..5055ba0 100644 --- a/ffmpeg-service/main.py +++ b/ffmpeg-service/main.py @@ -862,12 +862,20 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)): if has_watermark: if request.store_name: - # Ouro Party Mode - # 1. Scaling the logo large for the center - fc_parts.append(f"[{watermark_idx}:v]scale=-1:300[wm]") - # 2. Placing it in the center, and fading it IN during the last 5 seconds - v_chain += f"[v_pre_wm];[v_pre_wm][wm]overlay=(W-w)/2:(H-h)/2-100:enable='between(t,{logo_start_time},{video_duration})'" - # 3. Drawing the Store Name below the logo using ASS subtitles instead of drawtext! + # Ouro Party Mode + Persistent bottom right + + # We need two scaled versions of the logo + # [wm_small]: Bottom right persistent logo + fc_parts.append(f"[{watermark_idx}:v]scale=200:-1,split=2[wm_small_base][wm_large_base]") + fc_parts.append(f"[wm_large_base]scale=-1:300[wm_large]") + + # 1. Place small logo in bottom right throughout the whole video + v_chain += "[v_pre_small];[v_pre_small][wm_small_base]overlay=W-w-20:H-h-20" + + # 2. Place large logo in the center, and fading it IN during the last 5 seconds + v_chain += f"[v_pre_large];[v_pre_large][wm_large]overlay=(W-w)/2:(H-h)/2-100:enable='between(t,{logo_start_time},{video_duration})'" + + # 3. Drawing the Store Name below the logo using ASS subtitles outro_ass_path = job_dir / "outro.ass" generate_outro_ass( request.store_name, outro_ass_path, logo_start_time, video_duration