home / skills / openclaw / skills / veo3-video-gen

veo3-video-gen skill

/skills/bluelyw/veo3-video-gen

This skill generates short MP4 videos from prompts using Veo 3.x and stitches segments to create consistent, reusable clips for ads and demos.

npx playbooks add skill openclaw/skills --skill veo3-video-gen

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
2.2 KB
---
name: veo3-video-gen
description: Generate and stitch short videos via Google Veo 3.x using the Gemini API (google-genai). Use when you need to create video clips from prompts (ads, UGC-style clips, product demos) and want a reproducible CLI workflow (generate, poll, download MP4, optionally stitch multiple segments).
---

# Veo 3 Video Generation (Gemini API)

Use the bundled script to generate an MP4 from a text prompt.

## Generate (text → video)

```bash
uv run {baseDir}/scripts/generate_video.py \
  --prompt "A close up of ..." \
  --filename "out.mp4" \
  --model "veo-3.1-generate-preview" \
  --aspect-ratio "9:16" \
  --poll-seconds 10
```

## Generate a longer video by stitching segments

Veo commonly outputs ~8s clips per request. Use `--segments` to generate multiple clips and concatenate them with ffmpeg.

**Important:** This skill sends **one prompt per segment** (one Veo request per segment). Use `--base-style` to keep style consistent across segments.

```bash
uv run {baseDir}/scripts/generate_video.py \
  --prompt "Same scene, consistent style..." \
  --filename "out-24s.mp4" \
  --model "veo-3.1-generate-preview" \
  --aspect-ratio "9:16" \
  --segments 3 \
  --segment-style continuation
```

Options:
- `--base-style "..."`: prepended to every segment prompt (recommended).
- `--segment-prompt "..."` (repeatable): provide one prompt per segment (overrides `--prompt`).
- `--segment-style continuation` (default): appends continuity instructions per segment (only when using `--prompt`).
- `--segment-style same`: uses the exact same prompt for each segment (only when using `--prompt`).
- `--use-last-frame`: for segment >=2, extract previous segment last frame and pass it as `lastFrame` for continuity.
- `--emit-segment-media`: print `MEDIA:` for each segment as it finishes (useful for progress).
- `--keep-segments`: keep intermediate `*.segXX.mp4` files.
- `--reference-image path.jpg` (repeatable): guide generation with product/style references.

## Requirements

- `GEMINI_API_KEY` env var (or `--api-key`).
- `ffmpeg` on PATH when using `--segments > 1`.

## Troubleshooting

- 429/RESOURCE_EXHAUSTED: API key has no quota/billing for video.
- 503/UNAVAILABLE: model overloaded; retry later.

Overview

This skill generates and stitches short MP4 videos using Google Veo 3.x via the Gemini API. It provides a reproducible CLI workflow to generate clips from text prompts, poll for completion, download MP4s, and optionally concatenate multiple segments into a longer video. It is optimized for ads, UGC-style clips, and product demos.

How this skill works

The bundled Python script sends text prompts to the Veo generate model and polls the Gemini API until each segment is ready, then downloads the resulting MP4. For longer outputs it issues one Veo request per segment, optionally injecting continuity instructions or a last-frame reference, and uses ffmpeg to concatenate segments into a single final MP4. Environment variables or flags supply the GEMINI_API_KEY and other options.

When to use it

  • Create short promotional videos from text prompts (ads, intros, demos).
  • Produce UGC-style vertical clips for social platforms (9:16 aspect).
  • Generate reproducible video pipelines from CLI for automation or CI.
  • Stitch multiple segments into longer content while maintaining visual continuity.
  • Prototype product demos with reference images and consistent style across segments.

Best practices

  • Set GEMINI_API_KEY or pass --api-key to avoid interactive failures.
  • Use --base-style to prepend consistent style instructions across segments.
  • Prefer --segment-style continuation or --use-last-frame for smoother transitions between segments.
  • Set --poll-seconds to a sensible interval to avoid hitting rate limits while keeping responsiveness.
  • Use --keep-segments during debugging to inspect intermediate clips before final stitching.

Example use cases

  • Single-shot product demo: generate a 8s MP4 with a detailed prompt and a product reference image.
  • 30s social ad: generate 3 segments with --segments 3 and --segment-style continuation, then concatenate with ffmpeg.
  • Consistent multi-scene UGC: provide --base-style and different --segment-prompt entries for each beat.
  • Automated pipeline: call the script from CI to generate creatives and store outputs in a build artifact.
  • Style-locked series: reuse the same base prompt and reference-image inputs to produce visually consistent episodes.

FAQ

What do I need to run this skill?

You need a valid GEMINI_API_KEY (or --api-key), Python environment with the script, and ffmpeg on PATH if using --segments > 1.

Why are segments used and how long are outputs?

Veo typically returns ~8 second clips per request. The script issues one request per segment and concatenates segments with ffmpeg to create longer videos.

How do I keep visual continuity across segments?

Use --base-style to apply consistent instructions, set --segment-style continuation or same as needed, and enable --use-last-frame to pass the previous segment's last frame as a reference.