← Memory
seo-shorts.md
# SEO Shorts Factory
## Estado: APARCADO (04/04/2026) — MVP funcional pero necesita mejoras
## Ubicacion
- **VPS path**: `/home/ubuntu/proyectos-cloud/seo-shorts/`
- **Stack**: Python + Edge TTS + faster-whisper + FFmpeg + Pillow
## Que hace
Pipeline automatico: tema → script (Gemini) → audio (TTS) → subtitulos karaoke → video MP4
- Formato: 1080x1920 vertical (YouTube Shorts / TikTok)
- Tiempo generacion: ~10-15 seg por video
## Archivos
```
seo-shorts/
├── generate.py # CLI principal
├── script_gen.py # Gemini Flash → scripts 30-60s
├── tts.py # Edge TTS + faster-whisper (timestamps) + alignment texto original
├── subtitles.py # ASS karaoke (palabra se ilumina al pronunciarse)
├── video.py # FFmpeg composicion (elige fondo aleatorio de backgrounds/)
├── config.py # Settings (voz, colores, fuentes, branding)
├── gen_backgrounds.py # Genera fondos animados (particles, bokeh, waves)
├── assets/
│ ├── Montserrat-Bold.ttf / Montserrat-Regular.ttf
│ └── backgrounds/ # Videos MP4 de fondo (generados con gen_backgrounds.py)
├── output/ # Videos finales
└── temp/ # Archivos temporales
```
## Uso
```bash
python3 generate.py "Que es el SEO tecnico"
python3 generate.py --text "Script directo..."
python3 generate.py --file script.txt
python3 generate.py "Link building" --bg-style particles-network
python3 generate.py "Core Web Vitals" --voice es-ES-ElviraNeural --mode groups
```
## Problemas resueltos
- Subtitulos decian "CEO" en vez de "SEO": se usa texto ORIGINAL del script + timestamps de whisper (alignment)
- Fondo estatico aburrido: generador de fondos animados (particles-network, bokeh, waves)
- geq filter lentisimo (6min): pre-renderizado one-time, composicion final en ~10seg
## QUE FALTA (para retomar)
1. **Voz**: Edge TTS suena robotico. Integrar ElevenLabs (key actual sin permisos TTS, necesita key nueva con permisos text_to_speech + voices_read)
2. **Fondos**: Los generados con Python son basicos. Opciones:
- Descargar stock videos reales (Pexels bloquea con Cloudflare, probar Mixkit u otros)
- Mejorar el generador Python (mas particulas, mejor estetica, mas variedad)
- Usar gameplay tipo Subway Surfers (engagement maximo)
3. **Subtitulos**: Mejorar estilo visual (mas grandes, colores mas vivos, animacion entrada/salida)
4. **Batch processing**: Generar en lote desde las 200h de transcripciones del Master SEO
5. **Calidad general**: Alex lo puntuo 4/10 — necesita subir bastante
## APIs / Keys
- **Gemini**: `AIzaSyB84Vfxlh12JY-Ni_byuoCnFFlQeWZjoEo` (misma de Factura OCR)
- **ElevenLabs**: `sk_9be6df90bfdc10712add0f530212e30b7546b4436e332ccc` (SIN PERMISOS TTS — regenerar)
- **Edge TTS**: gratis, sin key. Voz default: `es-ES-AlvaroNeural`