← ClaudeAtlas

social-media-slideshow-videolisted

PIL + ffmpeg slideshow videos: product reviews, promos, TikTok/Reels/Shorts.
kevinnft/ai-agent-skills · ★ 13 · Code & Development · score 74
Install: claude install-skill kevinnft/ai-agent-skills
# Social Media Slideshow Video Generator ## When to use Use when users request: product review videos, promotional slideshow videos, TikTok/Reels/Shorts content from static images, photo-based video with text overlays, hijab/fashion/beauty review videos, unboxing recap videos, or any image-to-video social media content with designed slides. ## Stack | Layer | Tool | Purpose | |-------|------|---------| | Imaging | Pillow (PIL) | Slide design, text rendering, image manipulation | | Encoding | ffmpeg (CLI) | Frame sequence → MP4 encoding | | Core | Python 3 | Orchestration | No GPU, no moviepy, no heavy dependencies needed. ## Architecture: File-Based Frame Pipeline **Critical: Do NOT store all frames as numpy arrays in memory.** A 15-second 1080×1920 video at 24fps = 360 frames × ~6MB each = 2.1GB RAM → OOM kill. ### Correct approach: ``` 1. Render each SLIDE as a static PIL Image (5-10 slides in memory is fine) 2. For each slide, generate per-frame variations (fade, zoom) and SAVE AS PNG to tmpdir 3. Feed the PNG sequence to ffmpeg via -i pattern 4. Clean up temp files ``` ### Why not pipe to ffmpeg stdin? Piping raw RGB frames to ffmpeg stdin causes deadlocks and broken pipe errors in many environments. The file-based approach is robust and debuggable. ## Resolution Presets | Platform | Resolution | Aspect | FPS | |----------|-----------|--------|-----| | TikTok / Reels / Shorts | 1080×1920 | 9:16 | 24 | | YouTube landscape | 1920×1080 | 16:9 | 24-30 | | Instagram