El error del admin ('High download failure rate... rebuild image') era
engañoso: el fallo real no era descarga sino transcripción de un vídeo SUBIDO
sin pista de audio (un clip generado por IA, Gen-4 de Runway). faster-whisper
revienta dentro de libav con 'tuple index out of range' cuando el fichero no
tiene audio.
- transcribe_media detecta la ausencia de pista de audio (ffprobe) ANTES de
transcribir y lanza NoAudioError con mensaje claro; main.py lo convierte en
un fallo user-facing ('NO_AUDIO: este vídeo no tiene audio...') en vez de un
traceback. Verificado en contenedor con vídeo con/sin audio.
- La alerta de tasa de fallos ya no culpa siempre a la descarga: clasifica el
último error (proxy / youtube download / no audio / transcription / gemini /
ffmpeg) y lo pone en el título.
123 tests (nuevos: vídeo mudo + clasificación de fallos).
El free ya no exige Google: cualquier cuenta Google o de email permanente
entra. Para que no sea un grifo de minutos gratis:
- Bloqueo de dominios desechables/temp-mail en el registro por email
(cloud/disposable_domains.txt, 155 dominios: los clásicos temp-mail + los
vistos en nuestra propia DB). Refrescable desde el proyecto upstream.
- Normalización de alias: gmail dots/+tags y +tags de otros proveedores se
colapsan a una sola cuenta canónica, para que foo+1@ / f.oo@ no minten
cuentas infinitas. Aplicado en magic-link y en Google OAuth.
- free_plan_eligible: Google siempre; email solo si el dominio no es
desechable (defensa en profundidad además del bloqueo en registro).
- Popup de bienvenida ahora sale una vez por navegador en el primer registro
(Google o email), no solo a los no-entitled; el botón free arranca directo
sin forzar Google.
Verificado: registro con mailinator/luckfeed -> 400; gmail -> 200. 115 tests
(9 nuevos de email_policy).
- Plan free resuelto en metering (sin fila Stripe): 20 min/mes para cuentas
Google, período sintético de mes natural con reset automático
- TRIAL_DAYS=0 para nuevos checkouts; trials en curso grandfathered
- Watermark drawtext en clips free (pasada única post-render, sobrevive
subtítulos/hooks); thumbnails IA solo de pago
- Anti-abuso: 3 jobs/día por cuenta, 5 por IP, rate-limit de probes,
contador mensual de GB de proxy con alerta Telegram a 100 GB
- Clips free caducan a 7 días (purge_free_expired); purge_expired respeta
a cancelados que ahora son free
- Galería UGC pública pasa a opt-in (share_to_gallery, antes publicaba
producto+guion de todos los usuarios sin permiso)
- Emails: clips listos (con star-ask) y sin-minutos (cooldown 24h)
- Frontend: card Free en pricing, copy sin trial (landing/legal/gates),
StarBanner en resultados y TopUpModal, upsell de watermark
- log_view.py: whitelist-based cloud log view — transcription percentage,
clip counters, errors; no file paths, model names or pipeline internals.
Self-host (BILLING off) and DEBUG_LOGS keep the full raw output.
- transcribe_backends: emit '🎙️ Transcribing… NN% (Xs)' at 25% steps from
both parakeet and whisper paths.
- dashboard: profile selector shows connected networks instead of the
auto-generated os_<hash> id.
Replaces the single whole-transcript call with windowed scoring + focused
detailing (from PR #50), for better clip coverage on long videos:
- clip_selection.py: build_transcript_windows (sentence-aligned overlapping
windows), snap_clip_to_words (cuts land in pauses, not mid-word), model
price table.
- gemini_worker.py: score/detail prompts + Pydantic response schemas + robust
JSON parsing and multi-stage cost accounting (incl. thinking tokens).
- main.py get_viral_clips: pass 1 scores windows in batches and shortlists the
top (scaled by duration); pass 2 details the shortlist; every clip is snapped
to word boundaries. Cost is summed across both passes. Falls back to
whole-video conversion (caller) if it yields nothing.
- 13 clip_selection unit tests (63 total).
Ported from PR #50 (Themegaindex) onto current main, adapted to the
billing-mode app.py and the Lumen dashboard:
- subtitles.py: karaoke ASS generation (word-level highlight, glow/pop/box
effects, dim/uppercase), whisper continuation-word merging, env-configurable
whisper model, ASS/font input sanitization, faststart
- editor.py + edit_builder.py: Auto-Edit v2 — Gemini returns a structured
edit-decision list and the FFmpeg filter is built deterministically with
hard caps (no raw filter strings from the LLM), 2s dry-run + one
self-repair round, caption-safe mode blocks zooms on subtitled clips
- app.py: /api/subtitle karaoke fields + re-subtitle prefix walk-back
(fixes double subtitles), has_captions passed to Auto-Edit
- hooks.py: emoji rendering (color-emoji font with strip fallback),
char-level hard wrap, unique temp PNGs, ffmpeg timeouts; keeps the
duration/enable overlay from b1113d7
- translate.py: exponential-backoff retries for transient ElevenLabs errors
- dashboard: 11 caption presets in SubtitleModal; karaoke burns server-side
- tests/: 50 pytest tests; .github/workflows/ci.yml runs them + fe build
Encode settings kept at CRF 18 (medium for post-process steps) per f791a74.
Co-authored-by: Themegaindex <themegaindex@users.noreply.github.com>