veo-use

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Veo Use

Veo 使用指南

Use this skill to generate and edit videos using Google's Veo models (
veo-3.1
and
veo-2.0
).
This skill uses portable Python scripts managed by
uv
.
使用此Skill通过Google的Veo模型(
veo-3.1
veo-2.0
)生成和编辑视频。
本Skill使用由
uv
管理的可移植Python脚本。

Prerequisites

前提条件

Ensure you have one of the following authentication methods configured in your environment:
  1. API Key:
    • GOOGLE_API_KEY
      or
      GEMINI_API_KEY
  2. Vertex AI:
    • GOOGLE_CLOUD_PROJECT
    • GOOGLE_CLOUD_LOCATION
    • GOOGLE_GENAI_USE_VERTEXAI=1
请确保您的环境中已配置以下身份验证方式之一:
  1. API密钥:
    • GOOGLE_API_KEY
      GEMINI_API_KEY
  2. Vertex AI:
    • GOOGLE_CLOUD_PROJECT
    • GOOGLE_CLOUD_LOCATION
    • GOOGLE_GENAI_USE_VERTEXAI=1

Usage

使用方法

1. Text to Video

1. 文本转视频

Generate a video purely from a text description.
bash
uv run skills/veo-use/scripts/text_to_video.py "A cinematic drone shot of a futuristic city" --output city.mp4
仅通过文本描述生成视频。
bash
uv run skills/veo-use/scripts/text_to_video.py "A cinematic drone shot of a futuristic city" --output city.mp4

2. Image to Video

2. 图像转视频

Generate a video starting from a static image context.
bash
uv run skills/veo-use/scripts/image_to_video.py "Zoom out from the flower" --image start.png --output flower.mp4
从静态图像上下文生成视频。
bash
uv run skills/veo-use/scripts/image_to_video.py "Zoom out from the flower" --image start.png --output flower.mp4

3. Reference to Video

3. 参考图转视频

Use specific asset images (subjects, products) to guide generation.
bash
uv run skills/veo-use/scripts/reference_to_video.py "A man walking on the moon" --reference-image man.png --output moon_walk.mp4
使用特定资产图像(主体、产品)引导视频生成。
bash
uv run skills/veo-use/scripts/reference_to_video.py "A man walking on the moon" --reference-image man.png --output moon_walk.mp4

4. Edit Video (Inpainting)

4. 编辑视频(Inpainting)

Modify existing videos using masks.
Modes:
  • REMOVE
    : Remove dynamic object.
  • REMOVE_STATIC
    : Remove static object (watermark).
  • INSERT
    : Insert new object (requires
    --prompt
    ).
bash
uv run skills/veo-use/scripts/edit_video.py --video input.mp4 --mask mask.png --mode INSERT --prompt "A flying car" --output edited.mp4
使用蒙版修改现有视频。
模式:
  • REMOVE
    : 移除动态对象。
  • REMOVE_STATIC
    : 移除静态对象(如水印)。
  • INSERT
    : 插入新对象(需要
    --prompt
    参数)。
bash
uv run skills/veo-use/scripts/edit_video.py --video input.mp4 --mask mask.png --mode INSERT --prompt "A flying car" --output edited.mp4

5. Extend Video

5. 延长视频

Extend the duration of an existing video clip.
bash
uv run skills/veo-use/scripts/extend_video.py --video clip.mp4 --prompt "The car flies away into the sunset" --duration 6 --output extended.mp4
延长现有视频片段的时长。
bash
uv run skills/veo-use/scripts/extend_video.py --video clip.mp4 --prompt "The car flies away into the sunset" --duration 6 --output extended.mp4

Common Options

通用选项

  • --model
    : Default
    veo-3.1-generate-001
    .
  • --resolution
    :
    1080p
    (default),
    720p
    ,
    4k
    .
  • --aspect-ratio
    :
    16:9
    (default),
    9:16
    .
  • --duration
    :
    6
    (default),
    4
    ,
    8
    .
  • --model
    : 默认值为
    veo-3.1-generate-001
  • --resolution
    :
    1080p
    (默认)、
    720p
    4k
  • --aspect-ratio
    :
    16:9
    (默认)、
    9:16
  • --duration
    :
    6
    (默认)、
    4
    8

References

参考资料

Before running scripts, review the reference guides for prompting tips and best practices.
  • Prompting Guide - Camera angles, movements, lens effects, and visual styles
运行脚本前,请查看参考指南获取提示技巧和最佳实践。
  • 提示指南 - 包含相机角度、运动、镜头效果和视觉风格相关内容