Spaces:
Sleeping
Sleeping
Tu Nombre commited on
Commit ·
598630d
1
Parent(s): 0bbdd3e
logo Teshua tapa marca Veo
Browse files
app.py
CHANGED
|
@@ -41,8 +41,8 @@ VOCES = {
|
|
| 41 |
|
| 42 |
def log(m): print(m, flush=True)
|
| 43 |
|
| 44 |
-
# Detecta la marca "
|
| 45 |
-
# Si
|
| 46 |
def quitar_marca_meta(path, _cache={}):
|
| 47 |
exts_v = (".mp4",".mov",".webm",".avi",".mkv")
|
| 48 |
exts_i = (".jpg",".jpeg",".png",".webp")
|
|
@@ -58,8 +58,9 @@ 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 "
|
| 62 |
-
|
|
|
|
| 63 |
es_video = low.endswith(exts_v)
|
| 64 |
salida = path + ("_clean.mp4" if es_video else "_clean.png")
|
| 65 |
if os.path.exists("logo.png"):
|
|
|
|
| 41 |
|
| 42 |
def log(m): print(m, flush=True)
|
| 43 |
|
| 44 |
+
# Detecta la marca "Veo" en la esquina abajo-derecha y la tapa con el logo de Teshua.
|
| 45 |
+
# Si falla, devuelve el clip original (nunca rompe el montaje).
|
| 46 |
def quitar_marca_meta(path, _cache={}):
|
| 47 |
exts_v = (".mp4",".mov",".webm",".avi",".mkv")
|
| 48 |
exts_i = (".jpg",".jpeg",".png",".webp")
|
|
|
|
| 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 pequena. Coordenadas ajustadas:
|
| 62 |
+
bw = int(0.18 * W); bh = int(0.06 * H)
|
| 63 |
+
bx = W - bw - int(0.02 * W); by = H - bh - int(0.02 * H)
|
| 64 |
es_video = low.endswith(exts_v)
|
| 65 |
salida = path + ("_clean.mp4" if es_video else "_clean.png")
|
| 66 |
if os.path.exists("logo.png"):
|