# Microdrama Pipeline Findings

## Veo3 via LaoZhang API

### Duration
- **Duration parameter does NOT work** - always generates 8 seconds
- If shorter clips needed, must trim with FFmpeg post-generation
- For transitions/cuts, split 8s clip into segments

### Prominent People Filter
- Veo3 has aggressive `PUBLIC_ERROR_PROMINENT_PEOPLE_FILTER_FAILED` filter
- Triggers on:
  - Real historical figure names in prompts (Gorchakov, Alexander II, etc.)
  - Images that resemble prominent people (even from reference sheets based on them)
  - Text captions with real names visible in frames
- **Workaround**: Generate fictional characters from description only (no reference image of real person)
  - "Fictional elderly Russian diplomat, bald, white beard, military uniform"
  - "Fictional military general, dark beard, uniform with epaulettes"

### Sound/Audio
- Can request diegetic sounds: gasps, rustling, impacts
- NO speech/dialogue capability (only exclamations)
- NO background music (request "no music" explicitly)
- Sound hints by scene type work well

### Frame Interpolation
- First/last frame guidance works well
- Use first frame as reference when generating last frame (continuity)
- Keep frame descriptions dramatically different for visible motion

## NanoBanana (Gemini 3 Pro)

### Character Sheets
- 16:9 aspect ratio for turnaround sheets
- 7-panel layout: 4 full-body + 3 portrait close-ups
- Sepia option for historical characters
- Reference-based generation copies too closely for prominent people

### Object Sheets
- Multi-view product photography style
- Main view + top + side + detail
- Good for props consistency (documents, folders)

### Frame Generation
- Use character/object sheets as reference
- Captions can be embedded in prompts
- Sepia style context for historical scenes

## Script Format (v4)

```json
{
  "characters": {
    "id": {"sheet": "filename.jpg", "description": "..."}
  },
  "objects": {
    "id": {"sheet": "filename.jpg", "description": "..."}
  },
  "scenes": [{
    "scene_id": 1,
    "type": "hook|setup|reaction|reveal|flashback|twist|punchline",
    "duration_sec": 4,  // Target, but Veo3 always outputs 8s
    "caption": "TEXT",
    "caption_position": "top|center|bottom",
    "color_grade": "sepia",  // Optional
    "characters": ["id"],
    "objects": ["id"],
    "frames": {
      "first": "Description of starting state",
      "last": "Description of ending state"
    }
  }]
}
```

## Assembly

### FFmpeg Transitions
- `fade` mode: Each clip fades to/from black (0.3s works well)
- `crossfade` mode: Direct crossfade between clips
- `concat` mode: Hard cuts, no transitions

### Audio
- Veo3 clips include audio (sound effects, reactions)
- Assembly script includes audio with video/audio fades
- concat filter expects interleaved pairs: `[v0][a0][v1][a1]` not grouped

## Lessons Learned

1. **Always use generic descriptions for historical figures** in Veo3 prompts
2. **Frame descriptions must be dramatically different** for visible motion
3. **Captions with real names** can trigger filters (even in image text)
4. **Duration is fixed at 8s** - plan accordingly or trim
5. **Character consistency** requires reference sheets
6. **Sound effects** add production value without music
