mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
feat: Introduce FastAPI service for video processing, supporting TTS, dynamic subtitles, and video stabilization.
This commit is contained in:
1 parent
7e5c73cad9
commit
40a057e924
1 file changed
+4
-2
@@ -592,7 +592,9 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)):
|
||||
try:
|
||||
# Add User-Agent to avoid 403 on some CDNs
|
||||
headers = {"User-Agent": "Mozilla/5.0"}
|
||||
response = requests.get(request.watermark_url, headers=headers, stream=True)
|
||||
response = requests.get(
|
||||
request.watermark_url, headers=headers, stream=True
|
||||
)
|
||||
response.raise_for_status()
|
||||
with open(job_dir / "watermark.png", "wb") as f:
|
||||
shutil.copyfileobj(response.raw, f)
|
||||
@@ -793,7 +795,7 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)):
|
||||
v_chain += text_filter
|
||||
|
||||
if has_watermark:
|
||||
fc_parts.append(f"[{watermark_idx}:v]scale=150:-1[wm]")
|
||||
fc_parts.append(f"[{watermark_idx}:v]scale=200:-1[wm]")
|
||||
v_chain += "[v_pre_wm];[v_pre_wm][wm]overlay=W-w-20:H-h-20"
|
||||
|
||||
# End of video chain
|
||||
|
||||
Reference in new issue
Block a user