All skills
cnemri avatar

/veo-build

@ce49e83

Create and edit videos using Google's Veo 2 and Veo 3 models. Supports Text-to-Video, Image-to-Video, Inpainting, and Advanced Controls.

Use this Skill: https://skilld.dev/gh/cnemri/google-genai-skills/veo-build

This session only. Nothing lands on disk.

referencesediting.md

≈636 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Veo 2 Video Editing

This guide covers video editing tasks (inpainting) using the Veo 2 model. These operations require a source video and a mask image.

Model

  • veo-2.0-generate-preview

Concepts

  • Inpainting: Modifying a specific region of a video defined by a mask.
  • Mask: An image where white pixels (255) represent the area to edit, and black pixels (0) represent the area to keep.
  • Modes:
    • REMOVE: Dynamic inpainting. Removes an object selected in the first frame mask throughout the video.
    • REMOVE_STATIC: Static inpainting. Applies the mask to every frame (good for watermarks or fixed camera obstructions).
    • INSERT: Adds new content into the masked area based on a prompt.

Remove Object (Dynamic)

Removes an object identified by the mask in the first frame.

from google import genai
from google.genai import types

client = genai.Client(vertexai=True, project="YOUR_PROJECT", location="us-central1")

operation = client.models.generate_videos(
    model="veo-2.0-generate-preview",
    source=types.GenerateVideosSource(
        video=types.Video(uri="gs://bucket/source_video.mp4", mime_type="video/mp4")
    ),
    config=types.GenerateVideosConfig(
        mask=types.VideoGenerationMask(
            image=types.Image.from_file(location="mask.png"),
            mask_mode=types.VideoGenerationMaskMode.REMOVE,
        ),
        enhance_prompt=True, # Recommended
    ),
)

Remove Static Object

Removes a static element (like a logo) that is in the same place in every frame.

config=types.GenerateVideosConfig(
    mask=types.VideoGenerationMask(
        image=types.Image.from_file(location="static_mask.png"),
        mask_mode=types.VideoGenerationMaskMode.REMOVE_STATIC,
    ),
    # Optional prompt to guide what replaces the background
    # prompt="a mountain landscape", 
)

Insert Object

Inserts a new object into the masked area defined by the prompt.

operation = client.models.generate_videos(
    model="veo-2.0-generate-preview",
    source=types.GenerateVideosSource(
        prompt="a sheep", # The object to insert
        video=types.Video(uri="gs://bucket/truck.mp4", mime_type="video/mp4")
    ),
    config=types.GenerateVideosConfig(
        mask=types.VideoGenerationMask(
            image=types.Image.from_file(location="mask.png"),
            mask_mode=types.VideoGenerationMaskMode.INSERT,
        ),
        output_gcs_uri="gs://bucket/output_with_sheep.mp4",
        enhance_prompt=True,
    ),
)

Source: SKILL.md on GitHub

2 warnings11d4 checks · Risk SAFE
  • Gen Agent Trust Hub11d

    The skill provides documentation and code samples for using Google's Veo video generation models with the official google-genai Python SDK. No security vulnerabilities or malicious behaviors were identified.

  • Socket11d

    No alerts

  • Snyk11d

    Risk: MEDIUM · 1 issue

  • Runlayer7mo

    6/6 files flagged

Signed by skilld at ce49e83. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 8 months ago

README badge

README badge for cnemri/google-genai-skills/veo-build