Gemini Omni Flash で動画を生成、編集する

Gemini Omni Flash(gemini-omni-flash-preview)は、高速な動画生成、編集、映画のようなコントロールを実現するために設計された高性能のマルチモーダル モデルです。Gemini Omni は、以前の動画モデルとは異なる次のコア機能を基盤として構築されています。

  • ネイティブ マルチモーダル: テキスト、画像、音声、動画を同時に処理し、より一貫性があり、制御可能な出力を得ることができます。
  • 会話型編集: Interactions API によって有効になり、自然言語の会話を通じて動画を繰り返し調整、編集できます。変更したい内容を説明すると、モデルが編集を適用し、残したい動画の部分はそのまま残ります。
  • 世界に関する知識: Gemini Omni は、物理学の理解と Gemini の歴史、科学、文化的背景に関する知識を組み合わせ、フォトリアリズムから意味のあるストーリーテリングへのギャップを埋めます。

テキストから動画を生成する

テキスト プロンプトから動画を生成します。モデルは、テキストの説明に基づいて音声付きの動画を生成します。最適な結果を得るには、シーンの説明、カメラの動き、照明、ムードなどの詳細を含むプロンプトを作成します。

Python

import base64
from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input="A marble rolling fast on a chain reaction style track, continuous smooth shot."
)
with open("marble.mp4", "wb") as f:
    f.write(base64.b64decode(interaction.output_video.data))

JavaScript

import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});

const interaction = await ai.interactions.create({  
  model: 'gemini-omni-flash-preview',  
  input: 'A marble rolling fast on a chain reaction style track, continuous smooth shot.',
});

if (interaction.output_video?.data) {
  fs.writeFileSync('marble.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
 "model": "gemini-omni-flash-preview",
 "input": "A marble rolling fast on a chain reaction style track, continuous smooth shot."
}'

REST レスポンス スキーマ

便宜上のフィールド interaction.output_videoSDK 専用です。REST API を直接使用する場合は、steps 配列から動画出力を取得します。

未加工の REST JSON 構造:

{
  "steps": [
    { "type": "user_input", "content": [{"type": "text", "text": "..."}] },
    { "type": "thought", "content": [{"text": "...", "type": "thought"}] },
    {
      "type": "model_output",
      "content": [
        {
          "type": "video",
          "mime_type": "video/mp4",
          "data": "AAAAIGZ0eXBpc29t..." // Base64 encoded video data
        }
      ]
    }
  ],
  "id": "v1_...",
  "status": "completed",
  "model": "gemini-omni-flash-preview",
  "object": "interaction"
}

アスペクト比を制御する

aspect_ratio"9:16" に設定して、縦向きの動画を作成します。デフォルトは横向き(16:9)です。

Python

import base64
from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input="A futuristic city with neon lights and flying cars, cyberpunk style",
    response_format={
        "type": "video",  # optional
        "aspect_ratio": "9:16"  # Supported values: "9:16", "16:9"
    }
)
with open("example.mp4", "wb") as f:
    f.write(base64.b64decode(interaction.output_video.data))

JavaScript

import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});

const interaction = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  input: 'A futuristic city with neon lights and flying cars, cyberpunk style',
  response_format: {
    type: 'video', // optional
    aspect_ratio: '9:16' // Supported values: '9:16', '16:9'
  },
});

if (interaction.output_video?.data) {
  fs.writeFileSync('example.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
 "model": "gemini-omni-flash-preview",
 "input": "A futuristic city with neon lights and flying cars, cyberpunk style",
 "response_format": {
   "type": "video",
   "aspect_ratio": "9:16"
 }
}'

画像から動画を生成する

テキスト プロンプトとともに参照画像を指定できます。モデルは、プロンプトに応じて画像の使用方法を決定します。これは、商品写真、イラスト、写真を生き生きと表現するのに便利です。

次の例は、水から飛び出す魚の絵の参照画像を使用する方法を示しています。

水面から飛び上がる魚の絵

次のプロンプトを使用します。

turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video

描画のリアルな動画を生成する。

Python

import base64
from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input=[
        {"type": "image", "data": base64_image, "mime_type": "image/jpeg"},
        {"type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"}
    ],
)
with open("clownfish.mp4", "wb") as f:
    f.write(base64.b64decode(interaction.output_video.data))

JavaScript

import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});

const interaction = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  input: [
    { type: 'image', data: base64Image, mime_type: 'image/jpeg' },
    { type: 'text', text: 'turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video' }
  ]
});

if (interaction.output_video?.data) {
  fs.writeFileSync('clownfish.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
 "model": "gemini-omni-flash-preview",
 "input": [
   {"type": "image", "data": "'"$BASE64_IMAGE"'", "mime_type": "image/jpeg"},
   {"type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"}
 ]
}'

被写体参照

参照画像として指定された特定の被写体を取り込んだ動画を生成できます。たとえば、次のコードは、猫と毛糸の 2 枚の画像を提供して、猫が毛糸で遊んでいる動画を生成する方法を示しています。

Python

import base64
from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input=[
        {"type": "image", "data": cat_b64, "mime_type": "image/png"},
        {"type": "image", "data": yarn_b64, "mime_type": "image/png"},
        {"type": "text", "text": "A cat playfully batting at a ball of yarn."}
    ],
)
with open("cat.mp4", "wb") as f:
    f.write(base64.b64decode(interaction.output_video.data))

JavaScript

import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});

const interaction = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  input: [
    { type: 'image', data: catData, mime_type: 'image/png' },
    { type: 'image', data: yarnData, mime_type: 'image/png' },
    { type: 'text', text: 'A cat playfully batting at a ball of yarn.' }
  ]
});

if (interaction.output_video?.data) {
  fs.writeFileSync('cat.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
 "model": "gemini-omni-flash-preview",
 "input": [
   {"type": "image", "data": "'"$CAT_B64"'", "mime_type": "image/png"},
   {"type": "image", "data": "'"$YARN_B64"'", "mime_type": "image/png"},
   {"type": "text", "text": "A cat playfully batting at a ball of yarn."}
 ]
}'

Tasks パラメータ

video-configtask パラメータを使用して、目的の動作を明確に示します。たとえば、モデルに画像から動画を生成させたい場合は、パラメータを image_to_video に設定します。設定されていない場合、モデルはプロンプトから必要なものを推測します。

使用できる値は次のとおりです。

  • text_to_video
  • image_to_video
  • reference_to_video
  • edit

次の例は、前述の画像から動画への例でこれを設定する方法を示しています。

Python

import base64
from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input=[
        {"type": "image", "data": base64_image, "mime_type": "image/jpeg"},
        {"type": "text", "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"}
    ],
    generation_config={
      "video_config": {
        "task": "image_to_video",
      }
    },
)
with open("example.mp4", "wb") as f:
    f.write(base64.b64decode(interaction.output_video.data))

JavaScript

import { GoogleGenAI } from "@google/genai";
import * as fs from 'fs';
const ai = new GoogleGenAI({});

const interaction = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  input: [
    { type: 'image', data: base64Image, mime_type: 'image/jpeg' },
    { type: 'text', text: 'turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video' }
  ],
  generationConfig: {
    videoConfig: {
      task: 'image_to_video',
    }
  }
});

if (interaction.output_video?.data) {
  fs.writeFileSync('example.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": [
      {
        "type": "image",
        "data": "'"$BASE64_IMAGE"'",
        "mime_type": "image/jpeg"
      },
      {
        "type": "text",
        "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"
      }
    ],
    "generation_config": {
      "video_config": {
        "task": "image_to_video"
      }
    }
  }'

ステートフル動画編集

フォローアップ プロンプトを使用して、動画を生成し、繰り返し編集します。各ターンは前の結果に基づいて構築されます。モデルは動画のコンテキストを記憶し、変更を適用しながら、言及しなかった要素を保持します。previous_interaction_id を使用して、以前の動画を再アップロードすることなく、会話履歴と生成された動画の状態を追跡します。

次の例は、最初の動画を生成してから編集する方法を示しています。

Python

import base64
from google import genai

client = genai.Client()

# Turn 1: Generate initial video
res1 = client.interactions.create(model="gemini-omni-flash-preview", input="A woman playing violin outdoors.")

# Turn 2: Edit the previous video
res2 = client.interactions.create(
    model="gemini-omni-flash-preview",
    previous_interaction_id=res1.id,
    input="Make the violin invisible."
)
with open("example.mp4", "wb") as f:
    f.write(base64.b64decode(res2.output_video.data))

JavaScript

import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});

// Turn 1: Generate initial video
const res1 = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  input: 'A woman playing violin outdoors.',
});

// Turn 2: Edit the previous video
const res2 = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  previous_interaction_id: res1.id,
  input: 'Make the violin invisible.',
});

if (res2.output_video?.data) {
  fs.writeFileSync('example.mp4', Buffer.from(res2.output_video.data, 'base64'));
}

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
 "model": "gemini-omni-flash-preview",
 "previous_interaction_id": "'"$PREVIOUS_ID"'",
 "input": "Make the violin invisible."
}'

最初の動画の例:

編集された動画の例:

会話のターンごとに新しい動画が生成されます。モデルは前のターンのコンテキストを理解しているため、シーン全体を再記述しなくても、照明の調整や背景の入れ替えなどの増分変更を行うことができます。

自分の動画を編集する

Files API を使用して動画をアップロードし、Gemini Omni Flash で編集します。

次の例は、元の動画を編集する方法を示しています。

Python

import time
import base64
from google import genai

client = genai.Client()

# Upload video using the file API
video_file = client.files.upload(file="Video.mp4")

while video_file.state == "PROCESSING":
    print('Waiting for video to be processed.')
    time.sleep(10)
    video_file = client.files.get(name=video_file.name)

if video_file.state == "FAILED":
  raise ValueError(video_file.state)
print(f'Video processing complete: ' + video_file.uri)

# Edit your video
interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input=[
        {"type": "document", "uri": video_file.uri},
        {"type": "text", "text": "When the person touches the mirror, make the mirror ripple beautifully like liquid, and the person's arm turns into reflective mirror material"}
    ],
)
with open("example.mp4", "wb") as f:
    f.write(base64.b64decode(interaction.output_video.data))

JavaScript

import { GoogleGenAI } from '@google/genai';
import * as fs from 'fs';
const ai = new GoogleGenAI({});

// Upload video using the file API
let videoFile = await ai.files.upload({
  file: 'Video.mp4',
});

while (videoFile.state === 'PROCESSING') {
  console.log('Waiting for video to be processed.');
  await new Promise(r => setTimeout(r, 10000));
  videoFile = await ai.files.get({ name: videoFile.name });
}

if (videoFile.state === 'FAILED') {
  throw new Error(videoFile.state);
}
console.log('Video processing complete: ' + videoFile.uri);

// Edit your video
const interaction = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  input: [
    { type: 'document', uri: videoFile.uri },
    { type: 'text', text: "When the person touches the mirror, make the mirror ripple beautifully like liquid, and the person's arm turns into reflective mirror material" }
  ],
});

if (interaction.output_video?.data) {
  fs.writeFileSync('example.mp4', Buffer.from(interaction.output_video.data, 'base64'));
}

REST

#!/bin/bash
VIDEO_B64=$(encode_file "$VIDEO_FILE")

curl -sS -w "\n[HTTP %{http_code}]\n" "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d @- <<EOF > video_editing_response.json
{
  "model": "gemini-omni-flash-preview",
  "input": [
    {
      "type": "user_input",
      "content": [
        {
          "type": "video",
          "mime_type": "video/mp4",
          "data": "$VIDEO_B64"
        },
        {
          "type": "text",
          "text": "When the person touches the mirror, make the mirror ripple beautifully like liquid, and the person's arm turns into reflective mirror material"
        }
      ]
    }
  ],
  "response_format": { "type": "video" }
}
EOF

編集された動画の例:

URI を使用して動画を取得する

response_formatdelivery="uri" パラメータを使用して、4 MB を超える生成された動画を取得します。これにより、動画が ACTIVE になるまでポーリングできる Google ホストの URI が返されます。

Python

import time
from google import genai

client = genai.Client()

# 1. Request video via URI delivery
interaction = client.interactions.create(
    model="gemini-omni-flash-preview",
    input="A beautiful sunset.",
    response_format={"type": "video", "delivery": "uri"}
)

# 2. Extract file name and poll for ACTIVE state
video_output = interaction.output_video
file_name = video_output.uri.split("/")[-1] # Extract ID

print("Waiting for video processing...")
while True:
    f_info = client.files.get(name=f"files/{file_name}")
    if f_info.state.name == "ACTIVE":
        break
    elif f_info.state.name == "FAILED":
        raise RuntimeError("Generation failed.")
    time.sleep(5)

# 3. Download the final video
video_bytes = client.files.download(file=video_output.uri)
with open("output.mp4", "wb") as f:
    f.write(video_bytes)

JavaScript

import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({});

// 1. Request video via URI delivery
const interaction = await ai.interactions.create({
  model: 'gemini-omni-flash-preview',
  input: 'A beautiful sunset.',
  response_format: { type: 'video', delivery: 'uri' },
});

// 2. Extract file name and poll for ACTIVE state
const videoOutput = interaction.output_video;
const fileId = videoOutput.uri.match(/files\/([a-zA-Z0-9]+)/)[1];
const name = `files/${fileId}`;

console.log("Waiting for video processing...");
while (true) {
  const fInfo = await ai.files.get({ name });
  if (fInfo.state.name === 'ACTIVE') break;
  if (fInfo.state.name === 'FAILED') throw new Error("Generation failed.");
  await new Promise(r => setTimeout(r, 5000));
}

// 3. Download the final video
await ai.files.download({
  file: videoOutput,
  downloadPath: 'output.mp4',
});
console.log("💾 Saved video to output.mp4");

REST

#!/bin/bash

# 1. Initial request to generate the video
RESPONSE=$(curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$API_KEY" \
-H "Content-Type: application/json" \
-d '{
 "model": "gemini-omni-flash-preview",
 "input": "A beautiful sunset over a calm ocean.",
 "response_format": {"type": "video", "delivery": "uri"}
}')

# Extract FILE_ID from the URI (e.g., "files/abc-123" -> "abc-123")
FILE_URI=$(echo $RESPONSE | jq -r '.output_video.uri')
FILE_ID=$(echo $FILE_URI | cut -d'/' -f2)

echo "Video requested (ID: $FILE_ID). Waiting for processing..."

# 2. Polling loop
while true; do
 # Get current file status
 STATUS_JSON=$(curl -s -X GET "https://generativelanguage.googleapis.com/v1beta/files/$FILE_ID?key=$API_KEY")
 STATE=$(echo $STATUS_JSON | jq -r '.state')

 if [ "$STATE" == "ACTIVE" ]; then
   echo "Processing complete! Downloading..."
   break
 elif [ "$STATE" == "FAILED" ]; then
   echo "Error: Generation failed."
   exit 1
 else
   echo "Current state: $STATE... (waiting 5s)"
   sleep 5
 fi
done

# 3. Final download
curl -L -X GET "https://generativelanguage.googleapis.com/v1beta/files/$FILE_ID:download?alt=media&key=$API_KEY" \
--output "output.mp4"

echo "Done! Video saved to output.mp4"

未加工の REST JSON 構造(URI):

{
  "steps": [
    { "type": "user_input", "content": [{"type": "text", "text": "..."}] },
    { "type": "thought", "content": [{"text": "...", "type": "thought"}] },
    {
      "type": "model_output",
      "content": [
        {
          "type": "video",
          "mime_type": "video/mp4",
          "uri": "https://generativelanguage.googleapis.com/v1beta/files/...:download?alt=media"
        }
      ]
    }
  ],
  "id": "v1_...",
  "status": "completed",
  "model": "gemini-omni-flash-preview",
  "object": "interaction"
}


ベスト プラクティス

  • 大きな動画には URI 配信を使用する: 4 MB を超える動画(720p 超の動画が利用可能な場合)では、response_formatdelivery="uri" を使用して、ペイロード サイズの上限を超えないようにします。
  • パフォーマンスの最適化: background=falsestore=falsestream=false を設定して、高速な同期単項生成を実現します。store=false を設定すると、生成された動画は previous_interaction_id を使用して後続のターンで編集できなくなります。
  • プロンプトの精度: 詳しくは、プロンプトのガイダンスをご覧ください。

制限事項

  • 欧州経済領域、スイス、英国では、未成年者が写っている画像のアップロードと編集はサポートされていません。
  • 特定の人物が写っている画像をアップロードしたり編集したりすることはできません。
  • 現在、欧州経済領域(EEA)、スイス、英国にお住まいのユーザーは、アップロードした動画の編集をご利用いただけません(モデルによって生成された動画の編集はサポートされています)。
  • 現在のバージョンの API では、音声リファレンスのアップロードはサポートされていません。
  • API スキーマでは最大 3 秒の動画参照が受け入れられますが、現時点ではモデルで正しく処理されません。
  • 複数の動画を参照したり、複数の動画にわたって推論したりすることはできません。マルチ動画プロンプトを試すと、モデルのパフォーマンスが低下したり、予期しない出力が生成されたりする可能性があります。
  • 動画拡張機能と動画補間(最初のフレームと最後のフレームの間の動画を生成する)はサポートされていません。
  • 音声編集はサポートされていません。
  • プロビジョンド スループットはサポートされていません。
  • システム指示、温度、top_p、停止シーケンス、否定的なプロンプトはサポートされていません(否定的なプロンプトは通常のプロンプトに入れることができます。例: 「X をしないでください」)。
  • YouTube 動画をメディアソースとして使用することはサポートされていません。

詳細な技術情報

  • 生成されたすべての動画には SynthID の透かしが埋め込まれています。この透かしは視聴者には見えませんが、プログラムで検出して出所を確認できます。
  • 動画の生成時間は、長さ、解像度、現在の API の負荷によって異なります。動画の長さが長く、解像度が高いほど、生成に時間がかかります。
  • コンテンツ安全フィルタは、入力プロンプトと生成された動画の両方に適用されます(地域によって異なります)。使用ポリシーに違反するプロンプトはブロックされます。
  • 英語(EN)は完全にサポートされていますが、他の言語は評価されていないため、機能する可能性はありますが、結果は異なる場合があります。

Gemini Omni Flash プロンプト ガイド

このセクションでは、Gemini Omni Flash を効果的にプロンプトする方法に関するヒントと例を紹介します。

単一シーン

デフォルトでは、Omni Flash はいくつかの異なるショットを含む動画を作成しようとします。プロンプトに基づいて興味深い物語を作成しようとします。

出力動画に 1 つのシーンを含める必要がある場合は、そのようにプロンプトを指定する必要があります。

  • 1 つの途切れないシーンで
  • 連続した 1 回の撮影で
  • シーンのカットなし

次に例を示します。

Continuous, unbroken handheld shot of a fluffy tabby cat sitting on a sunny windowsill, looking out into a leafy garden. The cat's tail twitches slowly, and its ears rotate slightly toward ambient noises. Sunbeams illuminate dust motes in the air. Sound design: Gentle breeze, distant bird chirps. No dialogue.

不要な要素を削除する

生成された動画に不要なものが含まれている場合は、簡単な否定プロンプトを追加して、それらを回避します。

  • 会話なし
  • 装飾なし
  • 追加の効果音なし

編集のプロンプト

動画編集にはシンプルなプロンプトが最適です。プロンプトが詳細すぎると、意図しない変更につながる可能性があります。

以下に、簡単な編集プロンプトの例をいくつか示します。

  • この動画をアニメ風にする
  • この人物にファッショナブルな帽子をかぶせて
  • 照明をドラマチックに変更して
  • 看板のテキストを「Omni Flash」に変更して

動画の特定のアスペクトを編集する場合は、"Keep everything else the same" を含めて視覚的な一貫性を維持します。

この手法の適用方法を示す例を次に示します。

  • 避けるべきこと: In the video of the man sitting on the sofa, please add a small black cat that runs from the right side of the screen, jumps onto his lap, and then he starts to stroke its head while looking down.
    • 簡略化: Add a cat that jumps onto his lap, he begins to pet it. Keep everything else the same.
  • 避けるべきこと: Please remove the cell phone that the person is holding in their hand and fill in the background so it looks like they are just holding their hand empty.
    • 簡略化: Make the phone invisible. Keep everything else the same.

音声のプロンプト

デフォルトでは、モデルは動画に適した音声トラックを生成しようとします。この動作が常に望ましいとは限りません。プロンプトを使用して、必要な音声の種類を記述できます。これは、動画に音楽を使用する場合に特に重要です。

  • 穏やかなバックグラウンド ミュージックを含める
  • 動画にはエネルギッシュなテクノビートが使われています
  • バックグラウンドでラジオ放送が流れており、曲が再生されている

タイミング イベント

動画内の特定のタイミングで発生する事象をプロンプトで指定できます。正確な構文は必要なく、自然言語を使用できます。これは、独自のシーン カット、リズム、連射シーケンスを作成する場合に特に便利です。例については、以下をご覧ください。

  • 3 秒後、女性がシーンに入ります。
  • 5 秒で、バックグラウンド オーディオでサビが始まります。
  • 2 秒ごとに新しいフレームにカットします。
  • ラピッド ファイア シーケンスでは、0.5 秒ごと(24 fps で 12 フレーム)にシーンを新しい場所に切り替えます。

タイムコード構文を使用することもできます。

[0-3s] A person is walking
[3-6s] They stop and turn around
[6-10s] They start running

メタプロンプト

Gemini Omni Flash に、動画生成の一般的な品質や原則に注意するよう指示できます。

  • 微細なディテール、表情、タイミングを考慮して、非常に豊かで詳細でありながら、完全に自然なシーンを作成します。
  • キャラクターと環境の説明は、非常に詳細に記述します。キャラクターに衣装デザインの原則を適用します。シーン内の人物、アイテム、オブジェクトを具体的に指定します。
  • 背景要素に適切な詳細をたくさん含めて、シーンをリアルで自然なものにします。
  • 1 秒ごとに異なるレアな [thing] を表示する、アップビートな音楽を流す、対象物をラベル付けするテキストを含める、という内容の早送り動画を作成して。

動画内のテキスト

動画にテキストを含めるようプロンプトを入力すると、Gemini Omni が正しく読みやすいようにレンダリングします。動画内にテキストが自然に表示される場合(背景要素など)、そのテキストの内容を定義しておくとよいでしょう。

  • 画面に一度に 1 単語ずつ表示される: 「did, you, know, that, Omni, can, do, awesome, text?」各単語は 1 秒間表示され、アニメーション スタイルはそれぞれ異なります。会話なし。
  • 「This is an AI generation by Omni(これは Omni による AI 生成です)」と書かれた道路標識、「All you need AI(必要なのは AI だけ)」と書かれた店舗、「OMN111」というナンバープレートの車があります。

プロンプトでタグを使用して画像ロールを設定する

タグを使用すると、アップロードしたメディアを特定の生成ロールにバインドできます。これにより、各画像が初期フレームか参照かを指定できます。

1. シンプルなタグ(推奨)

プロンプトからイメージロールが明確にわかる単純なケースでは、イメージをロールに直接バインドできます。

  • <FIRST_FRAME>: 画像を動画の開始フレームとして使用します。例: <FIRST_FRAME> a woman is walking
  • <IMAGE_REF_N>: 画像を参照として使用します。例: in the style of <IMAGE_REF_0> a woman <IMAGE_REF_1> is walking(最初の画像のスタイル参照と 2 番目の画像の被写体参照を組み合わせます)。画像参照は 0 から始まります。

6 つの参照画像を含む例を次に示します。

[0-3s] A studio fashion sequence. Starting with woman <IMAGE_REF_0>, she is holding <IMAGE_REF_1>
[3-6s] Then we see the man <IMAGE_REF_2> holding <IMAGE_REF_3>
[6-10s] And finally another woman <IMAGE_REF_4> who is holding <IMAGE_REF_5> while walking.

2. 明示的な宣言

複数の画像と複数のロールを含むより複雑なケースでは、明示的な接頭辞タグと自然言語の指示接尾辞を組み合わせて使用できます。

  • ソースと参照画像の宣言:
    • [# Sources <FIRST_FRAME>@Image1] は最初の画像を開始フレームとして使用します。
    • [# References <IMAGE_REF_0>@Image1] は最初の画像をリファレンスとして使用します。
    • [# References <IMAGE_REF_1>@Image2] は 2 つ目の画像を参照として使用します。
    • [# References <IMAGE_REF_0>@Image1 <IMAGE_REF_1>@Image2] は両方の画像をリファレンスとして使用します。
    • [# Sources <FIRST_FRAME>@Image1] [# References <IMAGE_REF_0>@Image2] は、最初の画像を開始フレームとして、2 番目の画像を参照として使用します。
  • ガイド指示: プロンプトの最後にガイド指示を追加します。
    • 開始フレームの場合: "Use this image as the starting frame."
    • 参照画像の場合: "Use the given image(s) as references for video generation. The images should not be used as literal initial frames."

拡張されたプロンプトの例:

[# Sources <FIRST_FRAME>@Image1] [# References <IMAGE_REF_0>@Image2] a woman <IMAGE_REF_0> is walking. Use Image1 as the starting frame. Use Image2 as a reference for the video generation.

次のステップ