style(ffmpeg): reduce font size to 30 for cleaner text overlay

This commit is contained in:
Jacques committed 2026-01-23 20:22:42 +01:00
1 parent 3d15a2e1f6
commit b33c9a30be
2 files changed
+7 -5

No files matched your search

+5 -5
View File
@@ -480,8 +480,8 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)):
if has_tts:
# Subtitles (TikTok style) using SRT (already generated in TTS block)
print(f"🎬 Overlaying subtitles from TTS SRT: {tts_srt_path}")
# White color (&H00FFFFFF), Size 64, Black outline
style = f"FontName=DejaVu Sans,FontSize=64,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=3,Shadow=0,Bold=1,Alignment=2,MarginV=250"
# White color (&H00FFFFFF), Size 30, Black outline
style = f"FontName=DejaVu Sans,FontSize=30,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=3,Shadow=0,Bold=1,Alignment=2,MarginV=250"
srt_path_str = str(tts_srt_path).replace("\\", "/").replace(":", "\\:")
text_filter = f"subtitles='{srt_path_str}':force_style='{style}'"
else:
@@ -490,10 +490,10 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)):
std_srt_path = job_dir / "std_text.srt"
generate_simple_srt(request.text, std_srt_path)
# White color (&H00FFFFFF), Size 64, Black outline
style = f"FontName=DejaVu Sans,FontSize=64,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=3,Shadow=0,Bold=1,Alignment=2,MarginV=250"
# White color (&H00FFFFFF), Size 30, Black outline
style = f"FontName=DejaVu Sans,FontSize=30,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=3,Shadow=0,Bold=1,Alignment=2,MarginV=250"
srt_path_str = str(std_srt_path).replace("\\", "/").replace(":", "\\:")
text_filter = f"subtitles='{srt_path_str}':force_style='{style}'"
text_filter = f"subtitles='{std_srt_path}':force_style='{style}'"
# Combine formatting + text
video_filters_str += f",{text_filter}"
+2
View File
@@ -122,6 +122,8 @@ Ajout d'une fonctionnalité complète de création de Reels Facebook permettant
- [x] **Refactor FFmpeg** : Passage à un pipeline `filter_complex` unifié pour éviter les conflits et garantir l'overlay.
- [x] **Fix Indentation** : Correction de l'erreur de syntaxe Python introduite.
- [x] **Fix F-String Syntax** : Correction de l'erreur `f-string expression part cannot include a backslash`.
- [x] **Final Robust Fix** : Switch complet vers le filtre `subtitles` et format `.srt` pour contourner l'absence de `drawtext` dans l'environnement.
- [x] **Style Adjustment** : Réduction de la taille du texte à 30 pour un rendu plus élégant.
## Progress Log