Spaces:
Sleeping
Sleeping
Tu Nombre commited on
Commit ·
ad6678f
1
Parent(s): 598630d
Teshua dorado abajo derecha
Browse files
app.py
CHANGED
|
@@ -58,20 +58,21 @@ def quitar_marca_meta(path, _cache={}):
|
|
| 58 |
"-show_entries","stream=width,height","-of","csv=p=0:s=x", path],
|
| 59 |
capture_output=True, text=True).stdout.strip()
|
| 60 |
W, H = [int(v) for v in dims.split("x")[:2]]
|
| 61 |
-
# Marca "Veo": esquina ABAJO-DERECHA
|
| 62 |
-
bw = int(0.
|
| 63 |
-
bx = W - bw - int(0.
|
| 64 |
es_video = low.endswith(exts_v)
|
| 65 |
salida = path + ("_clean.mp4" if es_video else "_clean.png")
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
| 75 |
cmd += (["-c:a","copy",salida] if es_video else [salida])
|
| 76 |
subprocess.run(cmd, capture_output=True)
|
| 77 |
if os.path.exists(salida) and os.path.getsize(salida) > 0:
|
|
|
|
| 58 |
"-show_entries","stream=width,height","-of","csv=p=0:s=x", path],
|
| 59 |
capture_output=True, text=True).stdout.strip()
|
| 60 |
W, H = [int(v) for v in dims.split("x")[:2]]
|
| 61 |
+
# Marca "Veo": esquina ABAJO-DERECHA. Zona a tapar + logo Teshua dorado:
|
| 62 |
+
bw = int(0.22 * W); bh = int(0.08 * H)
|
| 63 |
+
bx = W - bw - int(0.01 * W); by = H - bh - int(0.003 * H)
|
| 64 |
es_video = low.endswith(exts_v)
|
| 65 |
salida = path + ("_clean.mp4" if es_video else "_clean.png")
|
| 66 |
+
# Texto "Teshua" dorado, fondo negro, borde dorado - muy abajo a la derecha
|
| 67 |
+
fs = max(22, int(H * 0.030))
|
| 68 |
+
pad = int(fs * 0.45)
|
| 69 |
+
vf = (
|
| 70 |
+
f"delogo=x={bx}:y={by}:w={bw}:h={bh},"
|
| 71 |
+
f"drawbox=x=W-tw-{pad*4}-4:y=H-{fs+pad*2}-4:w=tw+{pad*4}:h={fs+pad*2}:color=black@0.95:t=fill,"
|
| 72 |
+
f"drawbox=x=W-tw-{pad*4}-4:y=H-{fs+pad*2}-4:w=tw+{pad*4}:h={fs+pad*2}:color=0xFFD700:t=3,"
|
| 73 |
+
f"drawtext=text='Teshu\u00e1':fontsize={fs}:fontcolor=0xFFD700:x=W-tw-{pad*2}:y=H-{fs+pad}:font=serif:borderw=2:bordercolor=0x000000"
|
| 74 |
+
)
|
| 75 |
+
cmd = ["ffmpeg","-y","-v","error","-i",path,"-vf",vf]
|
| 76 |
cmd += (["-c:a","copy",salida] if es_video else [salida])
|
| 77 |
subprocess.run(cmd, capture_output=True)
|
| 78 |
if os.path.exists(salida) and os.path.getsize(salida) > 0:
|