PrismeFoot commited on
Commit
294efb0
·
verified ·
1 Parent(s): 091ee5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -10
app.py CHANGED
@@ -193,16 +193,24 @@ def fabriquer_video(joueur: str, texte: str) -> str | None:
193
  slideshow
194
  ], check=True, capture_output=True)
195
 
196
- # ── 4. Overlay texte + audio ───────────────────────────────────────
197
- titre_court = texte_clean[:55] + ("..." if len(texte_clean) > 55 else "")
198
- vf = (
199
- f"drawbox=y=ih/2-110:color=black@0.65:width=iw:height=300:t=fill,"
200
- f"drawtext=text='PRISME FOOT':fontcolor=yellow:fontsize=42:x=(w-text_w)/2:y=160,"
201
- f"drawtext=text='{joueur_up}':fontcolor=white:fontsize=55"
202
- f":x=(w-text_w)/2:y=305:box=1:boxcolor=red@0.8,"
203
- f"drawtext=text='{titre_court}':fontcolor=white:fontsize=28"
204
- f":x=(w-text_w)/2:y=(h-text_h)/2+55"
205
- )
 
 
 
 
 
 
 
 
206
  subprocess.run([
207
  "ffmpeg", "-y",
208
  "-i", slideshow,
 
193
  slideshow
194
  ], check=True, capture_output=True)
195
 
196
+ # ── 4. Overlay texte + audio ───────────────────────────────────────────────
197
+ titre_court = texte_clean[:55] + ("..." if len(texte_clean) > 55 else "")
198
+ vf = (
199
+ # Bandeau bas semi-transparent
200
+ "drawbox=y=ih-220:color=black@0.70:width=iw:height=220:t=fill,"
201
+ # Bandeau haut semi-transparent
202
+ "drawbox=y=0:color=black@0.55:width=iw:height=90:t=fill,"
203
+ # Logo chaîne en haut
204
+ f"drawtext=text='⚽ PRISME FOOT':fontcolor=yellow:fontsize=38"
205
+ f":x=(w-text_w)/2:y=20:shadowcolor=black:shadowx=2:shadowy=2,"
206
+ # Nom du joueur en grand — toujours présent, impossible à manquer
207
+ f"drawtext=text='{joueur_up}':fontcolor=white:fontsize=62:bold=1"
208
+ f":x=(w-text_w)/2:y=ih-200"
209
+ f":box=1:boxcolor=red@0.85:boxborderw=14,"
210
+ # Titre de l'actu en dessous
211
+ f"drawtext=text='{titre_court}':fontcolor=white:fontsize=26"
212
+ f":x=(w-text_w)/2:y=ih-110:shadowcolor=black:shadowx=1:shadowy=1"
213
+ )
214
  subprocess.run([
215
  "ffmpeg", "-y",
216
  "-i", slideshow,