---
name: logo-anim
description: Animated logo sting / intro generator. Drop in a logo PNG, pick a preset (fade-rise, glitch-stutter, neon-flicker, scale-bounce, spotlight-sweep, ink-bleed), get a 2-4s MP4 intro for music videos, releases, or YouTube channel openers. Pure ffmpeg + PIL. Optional sound effect overlay. Use when the user asks for a logo animation, intro sting, channel opener, brand intro, or wants their logo to "drop with motion" before a video.
---


# logo-anim

Turn a static logo PNG into a 2–4s animated MP4 intro sting. Pick a motion preset, optionally layer a sound effect, drop it at the head of any video.

## Usage

```bash
python3 scripts/anim.py --logo path/to/logo.png --output sting.mp4 --preset fade-rise
```

### All flags

| Flag | Default | Description |
|------|---------|-------------|
| `--logo` | (required) | Input logo PNG (transparent or solid bg). |
| `--output` | (required) | Output MP4 path. |
| `--preset` | `fade-rise` | One of: `fade-rise`, `glitch-stutter`, `neon-flicker`, `scale-bounce`, `spotlight-sweep`, `ink-bleed`. |
| `--duration` | `3.0` | Total length in seconds (2.0–4.0 recommended). |
| `--bg-color` | `#000000` | Solid background hex color behind the logo. |
| `--size` | `1920x1080` | Output resolution `WIDTHxHEIGHT`. |
| `--audio` | (optional) | Sound effect file (WAV/MP3) to mux as the audio track. |
| `--fps` | `30` | Output framerate. |

## Presets

- **fade-rise** — Logo fades in from below, holds, fades out. Cinema-clean.
- **glitch-stutter** — Hard-cut alpha blink + tiny x-jitter. Datamosh sting.
- **neon-flicker** — Sin-wave + noise alpha modulation with `gblur` glow. Sign-on-the-fritz vibe.
- **scale-bounce** — Zoompan keyframe punch (1.5 → 0.9 → 1.0). Punchy reveal.
- **spotlight-sweep** — Animated radial mask sweeps across logo via `geq`. Cinematic light pass.
- **ink-bleed** — Alpha erode/dilate over time via `alphaextract` + `curves`. Stamped-in-ink look.

## Examples

```bash
# Cinematic fade for a release card
python3 scripts/anim.py --logo brand.png --output intro.mp4 --preset fade-rise --duration 3

# Glitchy YouTube channel opener with sting SFX
python3 scripts/anim.py --logo logo.png --output open.mp4 --preset glitch-stutter --audio whoosh.wav

# Vertical reel intro
python3 scripts/anim.py --logo mark.png --output reel-intro.mp4 --preset scale-bounce --size 1080x1920
```

## Pipeline

Pair with **clip-stitch** to stitch the sting onto the head of any longer video:

```bash
python3 scripts/anim.py --logo brand.png --output 00_intro.mp4 --preset fade-rise
# then stitch: 00_intro.mp4 + 01_main.mp4 → final.mp4
```

## Notes

- Pure ffmpeg + PIL. No ML deps.
- Transparent-PNG logos are recommended for best preset behavior.
- Output is `libx264 yuv420p +faststart` — drop-in ready for streaming and Telegram.
