name: media-generation
description: Generate images, videos, and audio using Google's Gemini APIs. Use for image generation/editing (Gemini 3 Pro Image), video generation (Veo 3), and speech (TBD). Trigger words - images: generate, create, draw, design, make, edit, modify image/picture. Video: generate video, create video, animate, make a video. Supports text-to-image, image-to-image editing, text-to-video, and image-to-video.
Media Generation
Image Generation
uv run ~/.claude/skills/media-generation/scripts/generate_image.py \
--prompt "description or editing instructions" \
--filename "output.png" \
[--input-image "source.png"] \
[--resolution 1K|2K|4K]
Resolution
1K (default) — also for: "low res", "1080p"
2K — also for: "medium", "2048"
4K — also for: "high res", "hi-res", "ultra"
Video Generation
uv run ~/.claude/skills/media-generation/scripts/generate_video.py \
--prompt "video description" \
--filename "output.mp4" \
[--model veo-3.0-generate-preview] \
[--negative "things to avoid"] \
[--input-image "first-frame.png"]
Models
veo-3.0-generate-001 (default) — stable, video only
veo-3.0-fast-generate-001 — faster, lower cost
veo-3.1-generate-preview — supports video extend, audio sync
veo-3.1-fast-generate-preview — fast with extend support
Prompting Tips
- Specify camera movements:
"slow zoom in", "pan left", "close-up"
- Add
"no talking, no dialogue" if character shouldn't speak
- Describe atmosphere:
"rain outside", "purple mystical energy"
Note: Veo requires paid tier. ~$0.40/sec standard, ~$0.15/sec fast.
Music Video from Image + Audio
Overview
- Start with character image + audio track (e.g., from Suno)
- Transcribe audio to get timestamps
- Generate clip 1 from image (veo-3.1)
- Extend each subsequent clip from previous (maintains continuity)
- Stitch clips + overlay audio with ffmpeg
Step 1: Transcribe audio for timing
whisper-ctranslate2 "song.mp3" --model large-v3 --output_dir /tmp --output_format srt
Step 2: Generate first clip from image
# Use veo-3.1 (required for extend feature)
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
image=types.Image(image_bytes=img_data, mime_type="image/jpeg"),
prompt="character description, scene action, no talking",
)
video1 = operation.result.generated_videos[0]
Step 3: Extend from previous clip
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
video=previous_video.video, # Pass previous video object
prompt="next scene description, continuous action, no talking",
)
Step 4: Stitch clips + add audio
# Create concat list
printf "file 'clip_01.mp4'\nfile 'clip_02.mp4'\n..." > concat.txt
# Stitch video clips
ffmpeg -f concat -safe 0 -i concat.txt -c copy combined.mp4
# Add audio track
ffmpeg -i combined.mp4 -i song.mp3 -c:v copy -c:a aac -map 0:v -map 1:a final.mp4
Cost estimate
- ~8 sec per clip × $0.40/sec = $3.20/clip
- 4-min song ≈ 30 clips ≈ $96
Audio Generation
- Music: Use Suno (external service)
- Speech: Gemini 2.5 TTS (Flash or Pro) - TBD script
API Key
Uses GEMINI_API_KEY env var, or pass --api-key KEY.
1---2name: media-generation3description: Generate images, videos, and audio using Google's Gemini APIs. Use for image generation/editing (Gemini 3 Pro Image), video generation (Veo 3), and speech (TBD). Trigger words - images: generate, crea4---5
6---
7name: media-generation
8description: Generate images, videos, and audio using Google's Gemini APIs. Use for image generation/editing (Gemini 3 Pro Image), video generation (Veo 3), and speech (TBD). Trigger words - images: generate, create, draw, design, make, edit, modify image/picture. Video: generate video, create video, animate, make a video. Supports text-to-image, image-to-image editing, text-to-video, and image-to-video.
9---
10
11# Media Generation
12
13## Image Generation
14
15```bash
16uv run ~/.claude/skills/media-generation/scripts/generate_image.py \
17 --prompt "description or editing instructions" \
18 --filename "output.png" \
19 [--input-image "source.png"] \
20 [--resolution 1K|2K|4K]
21```
22
23### Resolution
24- `1K` (default) — also for: "low res", "1080p"
25- `2K` — also for: "medium", "2048"
26- `4K` — also for: "high res", "hi-res", "ultra"
27
28## Video Generation
29
30```bash
31uv run ~/.claude/skills/media-generation/scripts/generate_video.py \
32 --prompt "video description" \
33 --filename "output.mp4" \
34 [--model veo-3.0-generate-preview] \
35 [--negative "things to avoid"] \
36 [--input-image "first-frame.png"]
37```
38
39### Models
40- `veo-3.0-generate-001` (default) — stable, video only
41- `veo-3.0-fast-generate-001` — faster, lower cost
42- `veo-3.1-generate-preview` — supports video extend, audio sync
43- `veo-3.1-fast-generate-preview` — fast with extend support
44
45### Prompting Tips
46- Specify camera movements: `"slow zoom in", "pan left", "close-up"`
47- Add `"no talking, no dialogue"` if character shouldn't speak
48- Describe atmosphere: `"rain outside", "purple mystical energy"`
49
50**Note:** Veo requires paid tier. ~$0.40/sec standard, ~$0.15/sec fast.
51
52## Music Video from Image + Audio
53
54### Overview
551. Start with character image + audio track (e.g., from Suno)
562. Transcribe audio to get timestamps
573. Generate clip 1 from image (veo-3.1)
584. Extend each subsequent clip from previous (maintains continuity)
595. Stitch clips + overlay audio with ffmpeg
60
61### Step 1: Transcribe audio for timing
62```bash
63whisper-ctranslate2 "song.mp3" --model large-v3 --output_dir /tmp --output_format srt
64```
65
66### Step 2: Generate first clip from image
67```python
68# Use veo-3.1 (required for extend feature)
69operation = client.models.generate_videos(
70 model="veo-3.1-generate-preview",
71 image=types.Image(image_bytes=img_data, mime_type="image/jpeg"),
72 prompt="character description, scene action, no talking",
73)
74video1 = operation.result.generated_videos[0]
75```
76
77### Step 3: Extend from previous clip
78```python
79operation = client.models.generate_videos(
80 model="veo-3.1-generate-preview",
81 video=previous_video.video, # Pass previous video object
82 prompt="next scene description, continuous action, no talking",
83)
84```
85
86### Step 4: Stitch clips + add audio
87```bash
88# Create concat list
89printf "file 'clip_01.mp4'\nfile 'clip_02.mp4'\n..." > concat.txt
90
91# Stitch video clips
92ffmpeg -f concat -safe 0 -i concat.txt -c copy combined.mp4
93
94# Add audio track
95ffmpeg -i combined.mp4 -i song.mp3 -c:v copy -c:a aac -map 0:v -map 1:a final.mp4
96```
97
98### Cost estimate
99- ~8 sec per clip × $0.40/sec = $3.20/clip
100- 4-min song ≈ 30 clips ≈ $96
101
102## Audio Generation
103
104- **Music:** Use Suno (external service)
105- **Speech:** Gemini 2.5 TTS (Flash or Pro) - TBD script
106
107## API Key
108
109Uses `GEMINI_API_KEY` env var, or pass `--api-key KEY`.