Veo 3.1 হল Google-এর অত্যাধুনিক মডেল যা উচ্চ-বিশ্বস্ততা, 8-সেকেন্ডের 720p, 1080p অথবা 4k ভিডিও তৈরি করে যাতে অত্যাশ্চর্য বাস্তবতা এবং স্থানীয়ভাবে তৈরি অডিও থাকে। আপনি Gemini API ব্যবহার করে প্রোগ্রাম্যাটিকভাবে এই মডেলটি অ্যাক্সেস করতে পারেন। উপলব্ধ Veo মডেল ভেরিয়েন্ট সম্পর্কে আরও জানতে, মডেল সংস্করণ বিভাগটি দেখুন।
ভিও ৩.১ ভিজ্যুয়াল এবং সিনেমাটিক শৈলীর বিস্তৃত পরিসরে উৎকৃষ্ট এবং বেশ কিছু নতুন ক্ষমতা প্রবর্তন করে:
- পোর্ট্রেট ভিডিও : ল্যান্ডস্কেপ (
16:9) এবং পোর্ট্রেট (9:16) ভিডিওর মধ্যে বেছে নিন। - ভিডিও এক্সটেনশন : পূর্বে Veo ব্যবহার করে তৈরি করা ভিডিওগুলি প্রসারিত করুন।
- ফ্রেম-নির্দিষ্ট জেনারেশন : প্রথম এবং/অথবা শেষ ফ্রেম নির্দিষ্ট করে একটি ভিডিও তৈরি করুন।
- ছবি-ভিত্তিক দিকনির্দেশনা : আপনার তৈরি করা ভিডিওর বিষয়বস্তু নির্দেশ করার জন্য সর্বাধিক তিনটি রেফারেন্স ছবি ব্যবহার করুন।
ভিডিও তৈরির জন্য কার্যকর টেক্সট প্রম্পট লেখার বিষয়ে আরও তথ্যের জন্য, Veo প্রম্পট গাইড দেখুন।
ভিডিও তৈরিতে টেক্সট
সংলাপ, সিনেমাটিক বাস্তবতা, অথবা সৃজনশীল অ্যানিমেশন সহ একটি ভিডিও কীভাবে তৈরি করবেন তা দেখতে একটি উদাহরণ বেছে নিন:
পাইথন
import time
from google import genai
from google.genai import types
client = genai.Client()
prompt = """A close up of two people staring at a cryptic drawing on a wall, torchlight flickering.
A man murmurs, 'This must be it. That's the secret code.' The woman looks at him and whispering excitedly, 'What did you find?'"""
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt=prompt,
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the generated video.
generated_video = operation.response.generated_videos[0]
client.files.download(file=generated_video.video)
generated_video.video.save("dialogue_example.mp4")
print("Generated video saved to dialogue_example.mp4")
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const prompt = `A close up of two people staring at a cryptic drawing on a wall, torchlight flickering.
A man murmurs, 'This must be it. That's the secret code.' The woman looks at him and whispering excitedly, 'What did you find?'`;
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
prompt: prompt,
});
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...")
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
// Download the generated video.
ai.files.download({
file: operation.response.generatedVideos[0].video,
downloadPath: "dialogue_example.mp4",
});
console.log(`Generated video saved to dialogue_example.mp4`);
যাও
package main
import (
"context"
"log"
"os"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
prompt := `A close up of two people staring at a cryptic drawing on a wall, torchlight flickering.
A man murmurs, 'This must be it. That's the secret code.' The woman looks at him and whispering excitedly, 'What did you find?'`
operation, _ := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
prompt,
nil,
nil,
)
// Poll the operation status until the video is ready.
for !operation.Done {
log.Println("Waiting for video generation to complete...")
time.Sleep(10 * time.Second)
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Download the generated video.
video := operation.Response.GeneratedVideos[0]
client.Files.Download(ctx, video.Video, nil)
fname := "dialogue_example.mp4"
_ = os.WriteFile(fname, video.Video.VideoBytes, 0644)
log.Printf("Generated video saved to %s\n", fname)
}
জাভা
import com.google.genai.Client;
import com.google.genai.types.GenerateVideosOperation;
import com.google.genai.types.Video;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
class GenerateVideoFromText {
public static void main(String[] args) throws Exception {
Client client = new Client();
String prompt = "A close up of two people staring at a cryptic drawing on a wall, torchlight flickering.\n" +
"A man murmurs, 'This must be it. That's the secret code.' The woman looks at him and whispering excitedly, 'What did you find?'";
GenerateVideosOperation operation =
client.models.generateVideos("veo-3.1-generate-preview", prompt, null, null);
// Poll the operation status until the video is ready.
while (!operation.done().isPresent() || !operation.done().get()) {
System.out.println("Waiting for video generation to complete...");
Thread.sleep(10000);
operation = client.operations.getVideosOperation(operation, null);
}
// Download the generated video.
Video video = operation.response().get().generatedVideos().get().get(0).video().get();
Path path = Paths.get("dialogue_example.mp4");
client.files.download(video, path.toString(), null);
if (video.videoBytes().isPresent()) {
Files.write(path, video.videoBytes().get());
System.out.println("Generated video saved to dialogue_example.mp4");
}
}
}
বিশ্রাম
# Note: This script uses jq to parse the JSON response.
# GEMINI API Base URL
BASE_URL="https://generativelanguage.googleapis.com/v1beta"
# Send request to generate video and capture the operation name into a variable.
operation_name=$(curl -s "${BASE_URL}/models/veo-3.1-generate-preview:predictLongRunning" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"instances": [{
"prompt": "A close up of two people staring at a cryptic drawing on a wall, torchlight flickering. A man murmurs, \"This must be it. That'\''s the secret code.\" The woman looks at him and whispering excitedly, \"What did you find?\""
}
]
}' | jq -r .name)
# Poll the operation status until the video is ready
while true; do
# Get the full JSON status and store it in a variable.
status_response=$(curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "${BASE_URL}/${operation_name}")
# Check the "done" field from the JSON stored in the variable.
is_done=$(echo "${status_response}" | jq .done)
if [ "${is_done}" = "true" ]; then
# Extract the download URI from the final response.
video_uri=$(echo "${status_response}" | jq -r '.response.generateVideoResponse.generatedSamples[0].video.uri')
echo "Downloading video from: ${video_uri}"
# Download the video using the URI and API key and follow redirects.
curl -L -o dialogue_example.mp4 -H "x-goog-api-key: $GEMINI_API_KEY" "${video_uri}"
break
fi
# Wait for 5 seconds before checking again.
sleep 10
done
আকৃতির অনুপাত নিয়ন্ত্রণ করুন
Veo 3.1 আপনাকে ল্যান্ডস্কেপ ( 16:9 , ডিফল্ট সেটিং) অথবা পোর্ট্রেট ( 9:16 ) ভিডিও তৈরি করতে দেয়। আপনি aspect_ratio প্যারামিটার ব্যবহার করে কোন মডেলটি চান তা বলতে পারেন:
পাইথন
import time
from google import genai
from google.genai import types
client = genai.Client()
prompt = """A montage of pizza making: a chef tossing and flattening the floury dough, ladling rich red tomato sauce in a spiral, sprinkling mozzarella cheese and pepperoni, and a final shot of the bubbling golden-brown pizza, upbeat electronic music with a rhythmical beat is playing, high energy professional video."""
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt=prompt,
config=types.GenerateVideosConfig(
aspect_ratio="9:16",
),
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the generated video.
generated_video = operation.response.generated_videos[0]
client.files.download(file=generated_video.video)
generated_video.video.save("pizza_making.mp4")
print("Generated video saved to pizza_making.mp4")
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const prompt = `A montage of pizza making: a chef tossing and flattening the floury dough, ladling rich red tomato sauce in a spiral, sprinkling mozzarella cheese and pepperoni, and a final shot of the bubbling golden-brown pizza, upbeat electronic music with a rhythmical beat is playing, high energy professional video.`;
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
prompt: prompt,
config: {
aspectRatio: "9:16",
},
});
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...")
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
// Download the generated video.
ai.files.download({
file: operation.response.generatedVideos[0].video,
downloadPath: "pizza_making.mp4",
});
console.log(`Generated video saved to pizza_making.mp4`);
যাও
package main
import (
"context"
"log"
"os"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
prompt := `A montage of pizza making: a chef tossing and flattening the floury dough, ladling rich red tomato sauce in a spiral, sprinkling mozzarella cheese and pepperoni, and a final shot of the bubbling golden-brown pizza, upbeat electronic music with a rhythmical beat is playing, high energy professional video.`
videoConfig := &genai.GenerateVideosConfig{
AspectRatio: "9:16",
}
operation, _ := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
prompt,
nil,
videoConfig,
)
// Poll the operation status until the video is ready.
for !operation.Done {
log.Println("Waiting for video generation to complete...")
time.Sleep(10 * time.Second)
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Download the generated video.
video := operation.Response.GeneratedVideos[0]
client.Files.Download(ctx, video.Video, nil)
fname := "pizza_making.mp4"
_ = os.WriteFile(fname, video.Video.VideoBytes, 0644)
log.Printf("Generated video saved to %s\n", fname)
}
বিশ্রাম
# Note: This script uses jq to parse the JSON response.
# GEMINI API Base URL
BASE_URL="https://generativelanguage.googleapis.com/v1beta"
# Send request to generate video and capture the operation name into a variable.
operation_name=$(curl -s "${BASE_URL}/models/veo-3.1-generate-preview:predictLongRunning" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"instances": [{
"prompt": "A montage of pizza making: a chef tossing and flattening the floury dough, ladling rich red tomato sauce in a spiral, sprinkling mozzarella cheese and pepperoni, and a final shot of the bubbling golden-brown pizza, upbeat electronic music with a rhythmical beat is playing, high energy professional video."
}
],
"parameters": {
"aspectRatio": "9:16"
}
}' | jq -r .name)
# Poll the operation status until the video is ready
while true; do
# Get the full JSON status and store it in a variable.
status_response=$(curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "${BASE_URL}/${operation_name}")
# Check the "done" field from the JSON stored in the variable.
is_done=$(echo "${status_response}" | jq .done)
if [ "${is_done}" = "true" ]; then
# Extract the download URI from the final response.
video_uri=$(echo "${status_response}" | jq -r '.response.generateVideoResponse.generatedSamples[0].video.uri')
echo "Downloading video from: ${video_uri}"
# Download the video using the URI and API key and follow redirects.
curl -L -o pizza_making.mp4 -H "x-goog-api-key: $GEMINI_API_KEY" "${video_uri}"
break
fi
# Wait for 5 seconds before checking again.
sleep 10
done
রেজোলিউশন নিয়ন্ত্রণ করুন
ভিও ৩.১ সরাসরি ৭২০পি, ১০৮০পি অথবা ৪কে ভিডিও তৈরি করতে পারে।
মনে রাখবেন যে রেজোলিউশন যত বেশি হবে, ল্যাটেন্সি তত বেশি হবে। 4k ভিডিওর দামও বেশি (cf. pricing )।
ভিডিও এক্সটেনশনটি 720p ভিডিওতেও সীমাবদ্ধ।
পাইথন
import time
from google import genai
from google.genai import types
client = genai.Client()
prompt = """A stunning drone view of the Grand Canyon during a flamboyant sunset that highlights the canyon's colors. The drone slowly flies towards the sun then accelerates, dives and flies inside the canyon."""
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt=prompt,
config=types.GenerateVideosConfig(
resolution="4k",
),
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the generated video.
generated_video = operation.response.generated_videos[0]
client.files.download(file=generated_video.video)
generated_video.video.save("4k_grand_canyon.mp4")
print("Generated video saved to 4k_grand_canyon.mp4")
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const prompt = `A stunning drone view of the Grand Canyon during a flamboyant sunset that highlights the canyon's colors. The drone slowly flies towards the sun then accelerates, dives and flies inside the canyon.`;
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
prompt: prompt,
config: {
resolution: "4k",
},
});
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...")
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
// Download the generated video.
ai.files.download({
file: operation.response.generatedVideos[0].video,
downloadPath: "4k_grand_canyon.mp4",
});
console.log(`Generated video saved to 4k_grand_canyon.mp4`);
যাও
package main
import (
"context"
"log"
"os"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
prompt := `A stunning drone view of the Grand Canyon during a flamboyant sunset that highlights the canyon's colors. The drone slowly flies towards the sun then accelerates, dives and flies inside the canyon.`
videoConfig := &genai.GenerateVideosConfig{
Resolution: "4k",
}
operation, _ := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
prompt,
nil,
videoConfig,
)
// Poll the operation status until the video is ready.
for !operation.Done {
log.Println("Waiting for video generation to complete...")
time.Sleep(10 * time.Second)
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Download the generated video.
video := operation.Response.GeneratedVideos[0]
client.Files.Download(ctx, video.Video, nil)
fname := "4k_grand_canyon.mp4"
_ = os.WriteFile(fname, video.Video.VideoBytes, 0644)
log.Printf("Generated video saved to %s\n", fname)
}
বিশ্রাম
# Note: This script uses jq to parse the JSON response.
# GEMINI API Base URL
BASE_URL="https://generativelanguage.googleapis.com/v1beta"
# Send request to generate video and capture the operation name into a variable.
operation_name=$(curl -s "${BASE_URL}/models/veo-3.1-generate-preview:predictLongRunning" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"instances": [{
"prompt": "A stunning drone view of the Grand Canyon during a flamboyant sunset that highlights the canyon'\''s colors. The drone slowly flies towards the sun then accelerates, dives and flies inside the canyon."
}
],
"parameters": {
"resolution": "4k"
}
}' | jq -r .name)
# Poll the operation status until the video is ready
while true; do
# Get the full JSON status and store it in a variable.
status_response=$(curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "${BASE_URL}/${operation_name}")
# Check the "done" field from the JSON stored in the variable.
is_done=$(echo "${status_response}" | jq .done)
if [ "${is_done}" = "true" ]; then
# Extract the download URI from the final response.
video_uri=$(echo "${status_response}" | jq -r '.response.generateVideoResponse.generatedSamples[0].video.uri')
echo "Downloading video from: ${video_uri}"
# Download the video using the URI and API key and follow redirects.
curl -L -o 4k_grand_canyon.mp4 -H "x-goog-api-key: $GEMINI_API_KEY" "${video_uri}"
break
fi
# Wait for 5 seconds before checking again.
sleep 10
done
ছবি থেকে ভিডিও তৈরি
নিচের কোডটি দেখায় যে কিভাবে Gemini 2.5 Flash Image aka Nano Banana ব্যবহার করে একটি ছবি তৈরি করা হয়, এবং তারপর সেই ছবিটিকে Veo 3.1 দিয়ে একটি ভিডিও তৈরির জন্য স্টার্টিং ফ্রেম হিসেবে ব্যবহার করা হয়।
পাইথন
import time
from google import genai
client = genai.Client()
prompt = "Panning wide shot of a calico kitten sleeping in the sunshine"
# Step 1: Generate an image with Nano Banana.
image = client.models.generate_content(
model="gemini-2.5-flash-image",
contents=prompt,
config={"response_modalities":['IMAGE']}
)
# Step 2: Generate video with Veo 3.1 using the image.
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt=prompt,
image=image.parts[0].as_image(),
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the video.
video = operation.response.generated_videos[0]
client.files.download(file=video.video)
video.video.save("veo3_with_image_input.mp4")
print("Generated video saved to veo3_with_image_input.mp4")
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const prompt = "Panning wide shot of a calico kitten sleeping in the sunshine";
// Step 1: Generate an image with Nano Banana.
const imageResponse = await ai.models.generateContent({
model: "gemini-2.5-flash-image",
prompt: prompt,
});
// Step 2: Generate video with Veo 3.1 using the image.
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
prompt: prompt,
image: {
imageBytes: imageResponse.generatedImages[0].image.imageBytes,
mimeType: "image/png",
},
});
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...")
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
// Download the video.
ai.files.download({
file: operation.response.generatedVideos[0].video,
downloadPath: "veo3_with_image_input.mp4",
});
console.log(`Generated video saved to veo3_with_image_input.mp4`);
যাও
package main
import (
"context"
"log"
"os"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
prompt := "Panning wide shot of a calico kitten sleeping in the sunshine"
// Step 1: Generate an image with Nano Banana.
imageResponse, err := client.Models.GenerateContent(
ctx,
"gemini-2.5-flash-image",
prompt,
nil, // GenerateImagesConfig
)
if err != nil {
log.Fatal(err)
}
// Step 2: Generate video with Veo 3.1 using the image.
operation, err := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
prompt,
imageResponse.GeneratedImages[0].Image,
nil, // GenerateVideosConfig
)
if err != nil {
log.Fatal(err)
}
// Poll the operation status until the video is ready.
for !operation.Done {
log.Println("Waiting for video generation to complete...")
time.Sleep(10 * time.Second)
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Download the video.
video := operation.Response.GeneratedVideos[0]
client.Files.Download(ctx, video.Video, nil)
fname := "veo3_with_image_input.mp4"
_ = os.WriteFile(fname, video.Video.VideoBytes, 0644)
log.Printf("Generated video saved to %s\n", fname)
}
জাভা
import com.google.genai.Client;
import com.google.genai.types.GenerateVideosOperation;
import com.google.genai.types.Image;
import com.google.genai.types.Video;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
class GenerateVideoFromImage {
public static void main(String[] args) throws Exception {
Client client = new Client();
String prompt = "Panning wide shot of a calico kitten sleeping in the sunshine";
// Step 1: Generate an image with Nano Banana:
// ...
// We assume 'image' contains the generated image from step 1,
// or is loaded from a file:
Image image = Image.fromFile("path/to/your/image.png");
// Step 2: Generate video with Veo 3.1 using the image.
GenerateVideosOperation operation =
client.models.generateVideos("veo-3.1-generate-preview", prompt, image, null);
// Poll the operation status until the video is ready.
while (!operation.done().isPresent() || !operation.done().get()) {
System.out.println("Waiting for video generation to complete...");
Thread.sleep(10000);
operation = client.operations.getVideosOperation(operation, null);
}
// Download the video.
Video video = operation.response().get().generatedVideos().get().get(0).video().get();
Path path = Paths.get("veo3_with_image_input.mp4");
client.files.download(video, path.toString(), null);
if (video.videoBytes().isPresent()) {
Files.write(path, video.videoBytes().get());
System.out.println("Generated video saved to veo3_with_image_input.mp4");
}
}
}
রেফারেন্স ছবি ব্যবহার করা
আপনার তৈরি করা ভিডিওর কন্টেন্ট পরিচালনার জন্য Veo 3.1 এখন সর্বাধিক 3টি রেফারেন্স ছবি গ্রহণ করে। আউটপুট ভিডিওতে বিষয়ের উপস্থিতি সংরক্ষণের জন্য কোনও ব্যক্তি, চরিত্র বা পণ্যের ছবি সরবরাহ করুন।
উদাহরণস্বরূপ, ন্যানো ব্যানানা দিয়ে তৈরি এই তিনটি ছবিকে একটি সুলিখিত প্রম্পটের সাহায্যে রেফারেন্স হিসেবে ব্যবহার করলে নিম্নলিখিত ভিডিওটি তৈরি হয়:
`dress_image` | `woman_image` | `glasses_image` |
|---|---|---|
পাইথন
import time
from google import genai
client = genai.Client()
prompt = "The video opens with a medium, eye-level shot of a beautiful woman with dark hair and warm brown eyes. She wears a magnificent, high-fashion flamingo dress with layers of pink and fuchsia feathers, complemented by whimsical pink, heart-shaped sunglasses. She walks with serene confidence through the crystal-clear, shallow turquoise water of a sun-drenched lagoon. The camera slowly pulls back to a medium-wide shot, revealing the breathtaking scene as the dress's long train glides and floats gracefully on the water's surface behind her. The cinematic, dreamlike atmosphere is enhanced by the vibrant colors of the dress against the serene, minimalist landscape, capturing a moment of pure elegance and high-fashion fantasy."
dress_reference = types.VideoGenerationReferenceImage(
image=dress_image, # Generated separately with Nano Banana
reference_type="asset"
)
sunglasses_reference = types.VideoGenerationReferenceImage(
image=glasses_image, # Generated separately with Nano Banana
reference_type="asset"
)
woman_reference = types.VideoGenerationReferenceImage(
image=woman_image, # Generated separately with Nano Banana
reference_type="asset"
)
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt=prompt,
config=types.GenerateVideosConfig(
reference_images=[dress_reference, glasses_reference, woman_reference],
),
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the video.
video = operation.response.generated_videos[0]
client.files.download(file=video.video)
video.video.save("veo3.1_with_reference_images.mp4")
print("Generated video saved to veo3.1_with_reference_images.mp4")
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const prompt = "The video opens with a medium, eye-level shot of a beautiful woman with dark hair and warm brown eyes. She wears a magnificent, high-fashion flamingo dress with layers of pink and fuchsia feathers, complemented by whimsical pink, heart-shaped sunglasses. She walks with serene confidence through the crystal-clear, shallow turquoise water of a sun-drenched lagoon. The camera slowly pulls back to a medium-wide shot, revealing the breathtaking scene as the dress's long train glides and floats gracefully on the water's surface behind her. The cinematic, dreamlike atmosphere is enhanced by the vibrant colors of the dress against the serene, minimalist landscape, capturing a moment of pure elegance and high-fashion fantasy.";
// dressImage, glassesImage, womanImage generated separately with Nano Banana
// and available as objects like { imageBytes: "...", mimeType: "image/png" }
const dressReference = {
image: dressImage,
referenceType: "asset",
};
const sunglassesReference = {
image: glassesImage,
referenceType: "asset",
};
const womanReference = {
image: womanImage,
referenceType: "asset",
};
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
prompt: prompt,
config: {
referenceImages: [
dressReference,
sunglassesReference,
womanReference,
],
},
});
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...");
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
// Download the video.
ai.files.download({
file: operation.response.generatedVideos[0].video,
downloadPath: "veo3.1_with_reference_images.mp4",
});
console.log(`Generated video saved to veo3.1_with_reference_images.mp4`);
যাও
package main
import (
"context"
"log"
"os"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
prompt := `The video opens with a medium, eye-level shot of a beautiful woman with dark hair and warm brown eyes. She wears a magnificent, high-fashion flamingo dress with layers of pink and fuchsia feathers, complemented by whimsical pink, heart-shaped sunglasses. She walks with serene confidence through the crystal-clear, shallow turquoise water of a sun-drenched lagoon. The camera slowly pulls back to a medium-wide shot, revealing the breathtaking scene as the dress's long train glides and floats gracefully on the water's surface behind her. The cinematic, dreamlike atmosphere is enhanced by the vibrant colors of the dress against the serene, minimalist landscape, capturing a moment of pure elegance and high-fashion fantasy.`
// dressImage, glassesImage, womanImage generated separately with Nano Banana
// and available as *genai.Image objects.
var dressImage, glassesImage, womanImage *genai.Image
dressReference := &genai.VideoGenerationReferenceImage{
Image: dressImage,
ReferenceType: "asset",
}
sunglassesReference := &genai.VideoGenerationReferenceImage{
Image: glassesImage,
ReferenceType: "asset",
}
womanReference := &genai.VideoGenerationReferenceImage{
Image: womanImage,
ReferenceType: "asset",
}
operation, _ := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
prompt,
nil, // image
&genai.GenerateVideosConfig{
ReferenceImages: []*genai.VideoGenerationReferenceImage{
dressReference,
sunglassesReference,
womanReference,
},
},
)
// Poll the operation status until the video is ready.
for !operation.Done {
log.Println("Waiting for video generation to complete...")
time.Sleep(10 * time.Second)
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Download the video.
video := operation.Response.GeneratedVideos[0]
client.Files.Download(ctx, video.Video, nil)
fname := "veo3.1_with_reference_images.mp4"
_ = os.WriteFile(fname, video.Video.VideoBytes, 0644)
log.Printf("Generated video saved to %s\n", fname)
}
বিশ্রাম
# Note: This script uses jq to parse the JSON response.
# It assumes dress_image_base64, glasses_image_base64, and woman_image_base64
# contain base64-encoded image data.
# GEMINI API Base URL
BASE_URL="https://generativelanguage.googleapis.com/v1beta"
# Send request to generate video and capture the operation name into a variable.
operation_name=$(curl -s "${BASE_URL}/models/veo-3.1-generate-preview:predictLongRunning" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"instances": [{
"prompt": "The video opens with a medium, eye-level shot of a beautiful woman with dark hair and warm brown eyes. She wears a magnificent, high-fashion flamingo dress with layers of pink and fuchsia feathers, complemented by whimsical pink, heart-shaped sunglasses. She walks with serene confidence through the crystal-clear, shallow turquoise water of a sun-drenched lagoon. The camera slowly pulls back to a medium-wide shot, revealing the breathtaking scene as the dress'\''s long train glides and floats gracefully on the water'\''s surface behind her. The cinematic, dreamlike atmosphere is enhanced by the vibrant colors of the dress against the serene, minimalist landscape, capturing a moment of pure elegance and high-fashion fantasy."
}],
"parameters": {
"referenceImages": [
{
"image": {"inlineData": {"mimeType": "image/png", "data": "'"$dress_image_base64"'"}},
"referenceType": "asset"
},
{
"image": {"inlineData": {"mimeType": "image/png", "data": "'"$glasses_image_base64"'"}},
"referenceType": "asset"
},
{
"image": {"inlineData": {"mimeType": "image/png", "data": "'"$woman_image_base64"'"}},
"referenceType": "asset"
}
]
}
}' | jq -r .name)
# Poll the operation status until the video is ready
while true; do
# Get the full JSON status and store it in a variable.
status_response=$(curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "${BASE_URL}/${operation_name}")
# Check the "done" field from the JSON stored in the variable.
is_done=$(echo "${status_response}" | jq .done)
if [ "${is_done}" = "true" ]; then
# Extract the download URI from the final response.
video_uri=$(echo "${status_response}" | jq -r '.response.generateVideoResponse.generatedSamples[0].video.uri')
echo "Downloading video from: ${video_uri}"
# Download the video using the URI and API key and follow redirects.
curl -L -o veo3.1_with_reference_images.mp4 -H "x-goog-api-key: $GEMINI_API_KEY" "${video_uri}"
break
fi
# Wait for 10 seconds before checking again.
sleep 10
done
প্রথম এবং শেষ ফ্রেম ব্যবহার করা
Veo 3.1 আপনাকে ইন্টারপোলেশন ব্যবহার করে ভিডিও তৈরি করতে দেয়, অথবা ভিডিওর প্রথম এবং শেষ ফ্রেম নির্দিষ্ট করে। ভিডিও তৈরির জন্য কার্যকর টেক্সট প্রম্পট লেখার বিষয়ে তথ্যের জন্য, Veo প্রম্পট গাইডটি দেখুন।
পাইথন
import time
from google import genai
client = genai.Client()
prompt = "A cinematic, haunting video. A ghostly woman with long white hair and a flowing dress swings gently on a rope swing beneath a massive, gnarled tree in a foggy, moonlit clearing. The fog thickens and swirls around her, and she slowly fades away, vanishing completely. The empty swing is left swaying rhythmically on its own in the eerie silence."
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt=prompt,
image=first_image, # The starting frame is passed as a primary input
config=types.GenerateVideosConfig(
last_frame=last_image # The ending frame is passed as a generation constraint in the config
),
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the video.
video = operation.response.generated_videos[0]
client.files.download(file=video.video)
video.video.save("veo3.1_with_interpolation.mp4")
print("Generated video saved to veo3.1_with_interpolation.mp4")
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const prompt = "A cinematic, haunting video. A ghostly woman with long white hair and a flowing dress swings gently on a rope swing beneath a massive, gnarled tree in a foggy, moonlit clearing. The fog thickens and swirls around her, and she slowly fades away, vanishing completely. The empty swing is left swaying rhythmically on its own in the eerie silence.";
// firstImage and lastImage generated separately with Nano Banana
// and available as objects like { imageBytes: "...", mimeType: "image/png" }
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
prompt: prompt,
image: firstImage, // The starting frame is passed as a primary input
config: {
lastFrame: lastImage, // The ending frame is passed as a generation constraint in the config
},
});
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...")
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
// Download the video.
ai.files.download({
file: operation.response.generatedVideos[0].video,
downloadPath: "veo3.1_with_interpolation.mp4",
});
console.log(`Generated video saved to veo3.1_with_interpolation.mp4`);
যাও
package main
import (
"context"
"log"
"os"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
prompt := `A cinematic, haunting video. A ghostly woman with long white hair and a flowing dress swings gently on a rope swing beneath a massive, gnarled tree in a foggy, moonlit clearing. The fog thickens and swirls around her, and she slowly fades away, vanishing completely. The empty swing is left swaying rhythmically on its own in the eerie silence.`
// firstImage and lastImage generated separately with Nano Banana
// and available as *genai.Image objects.
var firstImage, lastImage *genai.Image
operation, _ := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
prompt,
firstImage, // The starting frame is passed as a primary input
&genai.GenerateVideosConfig{
LastFrame: lastImage, // The ending frame is passed as a generation constraint in the config
},
)
// Poll the operation status until the video is ready.
for !operation.Done {
log.Println("Waiting for video generation to complete...")
time.Sleep(10 * time.Second)
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Download the video.
video := operation.Response.GeneratedVideos[0]
client.Files.Download(ctx, video.Video, nil)
fname := "veo3.1_with_interpolation.mp4"
_ = os.WriteFile(fname, video.Video.VideoBytes, 0644)
log.Printf("Generated video saved to %s\n", fname)
}
বিশ্রাম
# Note: This script uses jq to parse the JSON response.
# It assumes first_image_base64 and last_image_base64
# contain base64-encoded image data.
# GEMINI API Base URL
BASE_URL="https://generativelanguage.googleapis.com/v1beta"
# Send request to generate video and capture the operation name into a variable.
# The starting frame is passed as a primary input
# The ending frame is passed as a generation constraint in the config
operation_name=$(curl -s "${BASE_URL}/models/veo-3.1-generate-preview:predictLongRunning" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"instances": [{
"prompt": "A cinematic, haunting video. A ghostly woman with long white hair and a flowing dress swings gently on a rope swing beneath a massive, gnarled tree in a foggy, moonlit clearing. The fog thickens and swirls around her, and she slowly fades away, vanishing completely. The empty swing is left swaying rhythmically on its own in the eerie silence.",
"image": {"inlineData": {"mimeType": "image/png", "data": "'"$first_image_base64"'"}}
}],
"parameters": {
"lastFrame": {"inlineData": {"mimeType": "image/png", "data": "'"$last_image_base64"'"}}
}
}' | jq -r .name)
# Poll the operation status until the video is ready
while true; do
# Get the full JSON status and store it in a variable.
status_response=$(curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "${BASE_URL}/${operation_name}")
# Check the "done" field from the JSON stored in the variable.
is_done=$(echo "${status_response}" | jq .done)
if [ "${is_done}" = "true" ]; then
# Extract the download URI from the final response.
video_uri=$(echo "${status_response}" | jq -r '.response.generateVideoResponse.generatedSamples[0].video.uri')
echo "Downloading video from: ${video_uri}"
# Download the video using the URI and API key and follow redirects.
curl -L -o veo3.1_with_interpolation.mp4 -H "x-goog-api-key: $GEMINI_API_KEY" "${video_uri}"
break
fi
# Wait for 10 seconds before checking again.
sleep 10
done
`first_image` | `last_image` | veo3.1_with_interpolation.mp4 সম্পর্কে |
|---|---|---|
ভিও ভিডিও সম্প্রসারণ করা হচ্ছে
Veo 3.1 ব্যবহার করে আপনি পূর্বে Veo দিয়ে তৈরি করা ভিডিওগুলি 7 সেকেন্ড এবং সর্বোচ্চ 20 গুণ পর্যন্ত বাড়িয়ে দিতে পারবেন।
ইনপুট ভিডিও সীমাবদ্ধতা:
- ভিও-জেনারেটেড ভিডিও মাত্র ১৪১ সেকেন্ড পর্যন্ত দীর্ঘ।
- জেমিনি এপিআই শুধুমাত্র ভিও-জেনারেটেড ভিডিওর জন্য ভিডিও এক্সটেনশন সমর্থন করে।
- ভিডিওটি পূর্ববর্তী প্রজন্মের হতে হবে, যেমন
operation.response.generated_videos[0].video - ভিডিওগুলি ২ দিনের জন্য সংরক্ষণ করা হয়, কিন্তু যদি কোনও ভিডিও এক্সটেনশনের জন্য রেফারেন্স করা হয়, তাহলে এর ২ দিনের স্টোরেজ টাইমার রিসেট হয়। আপনি শুধুমাত্র গত দুই দিনে তৈরি বা রেফারেন্স করা ভিডিওগুলি এক্সটেনশন করতে পারবেন।
- ইনপুট ভিডিওগুলির একটি নির্দিষ্ট দৈর্ঘ্য, আকৃতির অনুপাত এবং মাত্রা থাকবে বলে আশা করা হচ্ছে:
- আকৃতির অনুপাত: ৯:১৬ অথবা ১৬:৯
- রেজোলিউশন: ৭২০পি
- ভিডিওর দৈর্ঘ্য: ১৪১ সেকেন্ড বা তার কম
এক্সটেনশনটির আউটপুট হল একটি একক ভিডিও যা ব্যবহারকারীর ইনপুট ভিডিও এবং তৈরি করা বর্ধিত ভিডিওকে ১৪৮ সেকেন্ড পর্যন্ত ভিডিওর জন্য একত্রিত করে।
এই উদাহরণে একটি ভিও-জেনারেটেড ভিডিও নেওয়া হয়েছে, যা এখানে দেখানো হয়েছে তার আসল প্রম্পট সহ, এবং video প্যারামিটার এবং একটি নতুন প্রম্পট ব্যবহার করে এটিকে প্রসারিত করা হয়েছে:
| প্রম্পট | আউটপুট: butterfly_video |
|---|---|
| একটি অরিগামি প্রজাপতি তার ডানা ঝাপটায় এবং ফরাসি দরজা দিয়ে বাগানে উড়ে যায়। |
পাইথন
import time
from google import genai
client = genai.Client()
prompt = "Track the butterfly into the garden as it lands on an orange origami flower. A fluffy white puppy runs up and gently pats the flower."
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
video=operation.response.generated_videos[0].video, # This must be a video from a previous generation
prompt=prompt,
config=types.GenerateVideosConfig(
number_of_videos=1,
resolution="720p"
),
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the video.
video = operation.response.generated_videos[0]
client.files.download(file=video.video)
video.video.save("veo3.1_extension.mp4")
print("Generated video saved to veo3.1_extension.mp4")
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const prompt = "Track the butterfly into the garden as it lands on an orange origami flower. A fluffy white puppy runs up and gently pats the flower.";
// butterflyVideo must be a video from a previous generation
// available as an object like { videoBytes: "...", mimeType: "video/mp4" }
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
video: butterflyVideo,
prompt: prompt,
config: {
numberOfVideos: 1,
resolution: "720p",
},
});
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...")
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
// Download the video.
ai.files.download({
file: operation.response.generatedVideos[0].video,
downloadPath: "veo3.1_extension.mp4",
});
console.log(`Generated video saved to veo3.1_extension.mp4`);
যাও
package main
import (
"context"
"log"
"os"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
prompt := `Track the butterfly into the garden as it lands on an orange origami flower. A fluffy white puppy runs up and gently pats the flower.`
// butterflyVideo must be a video from a previous generation
// available as a *genai.Video object.
var butterflyVideo *genai.Video
operation, _ := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
prompt,
nil, // image
butterflyVideo,
&genai.GenerateVideosConfig{
NumberOfVideos: 1,
Resolution: "720p",
},
)
// Poll the operation status until the video is ready.
for !operation.Done {
log.Println("Waiting for video generation to complete...")
time.Sleep(10 * time.Second)
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Download the video.
video := operation.Response.GeneratedVideos[0]
client.Files.Download(ctx, video.Video, nil)
fname := "veo3.1_extension.mp4"
_ = os.WriteFile(fname, video.Video.VideoBytes, 0644)
log.Printf("Generated video saved to %s\n", fname)
}
বিশ্রাম
# Note: This script uses jq to parse the JSON response.
# It assumes butterfly_video_base64 contains base64-encoded
# video data from a previous generation.
# GEMINI API Base URL
BASE_URL="https://generativelanguage.googleapis.com/v1beta"
# Send request to generate video and capture the operation name into a variable.
operation_name=$(curl -s "${BASE_URL}/models/veo-3.1-generate-preview:predictLongRunning" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"instances": [{
"prompt": "Track the butterfly into the garden as it lands on an orange origami flower. A fluffy white puppy runs up and gently pats the flower.",
"video": {"inlineData": {"mimeType": "video/mp4", "data": "'"$butterfly_video_base64"'"}}
}],
"parameters": {
"numberOfVideos": 1,
"resolution": "720p"
}
}' | jq -r .name)
# Poll the operation status until the video is ready
while true; do
# Get the full JSON status and store it in a variable.
status_response=$(curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "${BASE_URL}/${operation_name}")
# Check the "done" field from the JSON stored in the variable.
is_done=$(echo "${status_response}" | jq .done)
if [ "${is_done}" = "true" ]; then
# Extract the download URI from the final response.
video_uri=$(echo "${status_response}" | jq -r '.response.generateVideoResponse.generatedSamples[0].video.uri')
echo "Downloading video from: ${video_uri}"
# Download the video using the URI and API key and follow redirects.
curl -L -o veo3.1_extension.mp4 -H "x-goog-api-key: $GEMINI_API_KEY" "${video_uri}"
break
fi
# Wait for 10 seconds before checking again.
sleep 10
done
ভিডিও তৈরির জন্য কার্যকর টেক্সট প্রম্পট লেখার বিষয়ে তথ্যের জন্য, Veo প্রম্পট গাইড দেখুন।
অ্যাসিঙ্ক্রোনাস অপারেশন পরিচালনা করা
ভিডিও তৈরি করা একটি গণনামূলকভাবে নিবিড় কাজ। যখন আপনি API-তে একটি অনুরোধ পাঠান, তখন এটি একটি দীর্ঘস্থায়ী কাজ শুরু করে এবং অবিলম্বে একটি operation অবজেক্ট ফেরত দেয়। এরপর আপনাকে ভিডিওটি প্রস্তুত না হওয়া পর্যন্ত পোল করতে হবে, যা done অবস্থা সত্য বলে নির্দেশিত হয়।
এই প্রক্রিয়ার মূল বিষয় হল একটি পোলিং লুপ, যা পর্যায়ক্রমে কাজের অবস্থা পরীক্ষা করে।
পাইথন
import time
from google import genai
from google.genai import types
client = genai.Client()
# After starting the job, you get an operation object.
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt="A cinematic shot of a majestic lion in the savannah.",
)
# Alternatively, you can use operation.name to get the operation.
operation = types.GenerateVideosOperation(name=operation.name)
# This loop checks the job status every 10 seconds.
while not operation.done:
time.sleep(10)
# Refresh the operation object to get the latest status.
operation = client.operations.get(operation)
# Once done, the result is in operation.response.
# ... process and download your video ...
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
// After starting the job, you get an operation object.
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
prompt: "A cinematic shot of a majestic lion in the savannah.",
});
// Alternatively, you can use operation.name to get the operation.
// operation = types.GenerateVideosOperation(name=operation.name)
// This loop checks the job status every 10 seconds.
while (!operation.done) {
await new Promise((resolve) => setTimeout(resolve, 1000));
// Refresh the operation object to get the latest status.
operation = await ai.operations.getVideosOperation({ operation });
}
// Once done, the result is in operation.response.
// ... process and download your video ...
যাও
package main
import (
"context"
"log"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
// After starting the job, you get an operation object.
operation, _ := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
"A cinematic shot of a majestic lion in the savannah.",
nil,
nil,
)
// This loop checks the job status every 10 seconds.
for !operation.Done {
time.Sleep(10 * time.Second)
// Refresh the operation object to get the latest status.
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Once done, the result is in operation.Response.
// ... process and download your video ...
}
জাভা
import com.google.genai.Client;
import com.google.genai.types.GenerateVideosOperation;
import com.google.genai.types.Video;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
class HandleAsync {
public static void main(String[] args) throws Exception {
Client client = new Client();
// After starting the job, you get an operation object.
GenerateVideosOperation operation =
client.models.generateVideos(
"veo-3.1-generate-preview",
"A cinematic shot of a majestic lion in the savannah.",
null,
null);
// This loop checks the job status every 10 seconds.
while (!operation.done().isPresent() || !operation.done().get()) {
Thread.sleep(10000);
// Refresh the operation object to get the latest status.
operation = client.operations.getVideosOperation(operation, null);
}
// Once done, the result is in operation.response.
// Download the generated video.
Video video = operation.response().get().generatedVideos().get().get(0).video().get();
Path path = Paths.get("async_example.mp4");
client.files.download(video, path.toString(), null);
if (video.videoBytes().isPresent()) {
Files.write(path, video.videoBytes().get());
System.out.println("Generated video saved to async_example.mp4");
}
}
}
বিশ্রাম
# Note: This script uses jq to parse the JSON response.
# GEMINI API Base URL
BASE_URL="https://generativelanguage.googleapis.com/v1beta"
# Send request to generate video and capture the operation name into a variable.
operation_name=$(curl -s "${BASE_URL}/models/veo-3.1-generate-preview:predictLongRunning" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"instances": [{
"prompt": "A cinematic shot of a majestic lion in the savannah."
}
]
}' | jq -r .name)
# This loop checks the job status every 10 seconds.
while true; do
# Get the full JSON status and store it in a variable.
status_response=$(curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "${BASE_URL}/${operation_name}")
# Check the "done" field from the JSON stored in the variable.
is_done=$(echo "${status_response}" | jq .done)
if [ "${is_done}" = "true" ]; then
# Once done, the result is in status_response.
# ... process and download your video ...
echo "Video generation complete."
break
fi
# Wait for 10 seconds before checking again.
echo "Waiting for video generation to complete..."
sleep 10
done
Veo API প্যারামিটার এবং স্পেসিফিকেশন
ভিডিও জেনারেশন প্রক্রিয়া নিয়ন্ত্রণ করার জন্য আপনার API অনুরোধে এই প্যারামিটারগুলি সেট করতে পারেন।
| প্যারামিটার | বিবরণ | ভিও ৩.১ এবং ভিও ৩.১ দ্রুত | ভিও ৩ এবং ভিও ৩ ফাস্ট | ভিও ২ |
|---|---|---|---|---|
prompt | ভিডিওটির টেক্সট বর্ণনা। অডিও সংকেত সমর্থন করে। | string | string | string |
negativePrompt | ভিডিওতে কী অন্তর্ভুক্ত করা উচিত নয় তা বর্ণনা করে লেখা টেক্সট। | string | string | string |
image | অ্যানিমেট করার জন্য একটি প্রাথমিক ছবি। | Image বস্তু | Image বস্তু | Image বস্তু |
lastFrame | একটি ইন্টারপোলেশন ভিডিওর ট্রানজিশনের জন্য চূড়ান্ত চিত্র। image প্যারামিটারের সাথে একত্রে ব্যবহার করা আবশ্যক। | Image বস্তু | Image বস্তু | Image বস্তু |
referenceImages | স্টাইল এবং কন্টেন্ট রেফারেন্স হিসেবে সর্বোচ্চ তিনটি ছবি ব্যবহার করা যাবে। | VideoGenerationReferenceImage অবজেক্ট (শুধুমাত্র ভিও ৩.১) | প্রযোজ্য নয় | প্রযোজ্য নয় |
video | ভিডিও এক্সটেনশনের জন্য ব্যবহার করা ভিডিও। | পূর্ববর্তী প্রজন্মের Video অবজেক্ট | প্রযোজ্য নয় | প্রযোজ্য নয় |
aspectRatio | ভিডিওটির আকৃতির অনুপাত। | "16:9" (ডিফল্ট),"9:16" | "16:9" (ডিফল্ট),"9:16" | "16:9" (ডিফল্ট),"9:16" |
resolution | ভিডিওটির আকৃতির অনুপাত। | "720p" (ডিফল্ট),"1080p" (শুধুমাত্র ৮ সেকেন্ড সময়কাল সমর্থন করে),"4k" (শুধুমাত্র 8s সময়কাল সমর্থন করে)"720p" শুধুমাত্র এক্সটেনশনের জন্য | "720p" (ডিফল্ট),"1080p" (শুধুমাত্র ৮ সেকেন্ড সময়কাল সমর্থন করে),"4k" (শুধুমাত্র 8s সময়কাল সমর্থন করে)"720p" শুধুমাত্র এক্সটেনশনের জন্য | অসমর্থিত |
durationSeconds | তৈরি করা ভিডিওর দৈর্ঘ্য। | "4" , "6" , "8" ।এক্সটেনশন, রেফারেন্স ছবি অথবা ১০৮০পি এবং ৪কে রেজোলিউশন ব্যবহার করার সময় "৮" হতে হবে | "4" , "6" , "8" ।এক্সটেনশন, রেফারেন্স ছবি অথবা ১০৮০পি এবং ৪কে রেজোলিউশন ব্যবহার করার সময় "৮" হতে হবে | "5" , "6" , "8" |
personGeneration | মানুষের প্রজন্ম নিয়ন্ত্রণ করে। (অঞ্চল বিধিনিষেধের জন্য সীমাবদ্ধতা দেখুন) | টেক্সট-টু-ভিডিও এবং এক্সটেনশন: শুধুমাত্র "allow_all"ছবি থেকে ভিডিও, ইন্টারপোলেশন এবং রেফারেন্স ছবি: শুধুমাত্র "allow_adult" | টেক্সট-টু-ভিডিও: শুধুমাত্র "allow_all"ছবি থেকে ভিডিও: শুধুমাত্র "allow_adult" | টেক্সট-টু-ভিডিও:"allow_all" , "allow_adult" , "dont_allow"ছবি থেকে ভিডিও: "allow_adult" , এবং "dont_allow" |
মনে রাখবেন যে seed প্যারামিটারটি Veo 3 মডেলের জন্যও উপলব্ধ। এটি নির্ধারণবাদের গ্যারান্টি দেয় না, তবে এটিকে কিছুটা উন্নত করে।
আপনার অনুরোধে প্যারামিটার সেট করে আপনি আপনার ভিডিও জেনারেশন কাস্টমাইজ করতে পারেন। উদাহরণস্বরূপ, মডেলটি পরিচালনা করার জন্য আপনি negativePrompt নির্দিষ্ট করতে পারেন।
পাইথন
import time
from google import genai
from google.genai import types
client = genai.Client()
operation = client.models.generate_videos(
model="veo-3.1-generate-preview",
prompt="A cinematic shot of a majestic lion in the savannah.",
config=types.GenerateVideosConfig(negative_prompt="cartoon, drawing, low quality"),
)
# Poll the operation status until the video is ready.
while not operation.done:
print("Waiting for video generation to complete...")
time.sleep(10)
operation = client.operations.get(operation)
# Download the generated video.
generated_video = operation.response.generated_videos[0]
client.files.download(file=generated_video.video)
generated_video.video.save("parameters_example.mp4")
print("Generated video saved to parameters_example.mp4")
জাভাস্ক্রিপ্ট
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
let operation = await ai.models.generateVideos({
model: "veo-3.1-generate-preview",
prompt: "A cinematic shot of a majestic lion in the savannah.",
config: {
aspectRatio: "16:9",
negativePrompt: "cartoon, drawing, low quality"
},
});
// Poll the operation status until the video is ready.
while (!operation.done) {
console.log("Waiting for video generation to complete...")
await new Promise((resolve) => setTimeout(resolve, 10000));
operation = await ai.operations.getVideosOperation({
operation: operation,
});
}
// Download the generated video.
ai.files.download({
file: operation.response.generatedVideos[0].video,
downloadPath: "parameters_example.mp4",
});
console.log(`Generated video saved to parameters_example.mp4`);
যাও
package main
import (
"context"
"log"
"os"
"time"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
videoConfig := &genai.GenerateVideosConfig{
AspectRatio: "16:9",
NegativePrompt: "cartoon, drawing, low quality",
}
operation, _ := client.Models.GenerateVideos(
ctx,
"veo-3.1-generate-preview",
"A cinematic shot of a majestic lion in the savannah.",
nil,
videoConfig,
)
// Poll the operation status until the video is ready.
for !operation.Done {
log.Println("Waiting for video generation to complete...")
time.Sleep(10 * time.Second)
operation, _ = client.Operations.GetVideosOperation(ctx, operation, nil)
}
// Download the generated video.
video := operation.Response.GeneratedVideos[0]
client.Files.Download(ctx, video.Video, nil)
fname := "parameters_example.mp4"
_ = os.WriteFile(fname, video.Video.VideoBytes, 0644)
log.Printf("Generated video saved to %s\n", fname)
}
বিশ্রাম
# Note: This script uses jq to parse the JSON response.
# GEMINI API Base URL
BASE_URL="https://generativelanguage.googleapis.com/v1beta"
# Send request to generate video and capture the operation name into a variable.
operation_name=$(curl -s "${BASE_URL}/models/veo-3.1-generate-preview:predictLongRunning" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"instances": [{
"prompt": "A cinematic shot of a majestic lion in the savannah."
}
],
"parameters": {
"aspectRatio": "16:9",
"negativePrompt": "cartoon, drawing, low quality"
}
}' | jq -r .name)
# Poll the operation status until the video is ready
while true; do
# Get the full JSON status and store it in a variable.
status_response=$(curl -s -H "x-goog-api-key: $GEMINI_API_KEY" "${BASE_URL}/${operation_name}")
# Check the "done" field from the JSON stored in the variable.
is_done=$(echo "${status_response}" | jq .done)
if [ "${is_done}" = "true" ]; then
# Extract the download URI from the final response.
video_uri=$(echo "${status_response}" | jq -r '.response.generateVideoResponse.generatedSamples[0].video.uri')
echo "Downloading video from: ${video_uri}"
# Download the video using the URI and API key and follow redirects.
curl -L -o parameters_example.mp4 -H "x-goog-api-key: $GEMINI_API_KEY" "${video_uri}"
break
fi
# Wait for 5 seconds before checking again.
sleep 10
done
ভিও প্রম্পট গাইড
এই বিভাগে Veo ব্যবহার করে তৈরি করা ভিডিওগুলির উদাহরণ রয়েছে এবং আপনাকে দেখায় কিভাবে স্বতন্ত্র ফলাফল তৈরি করার জন্য প্রম্পটগুলি পরিবর্তন করতে হয়।
নিরাপত্তা ফিল্টার
জেনারেট করা ভিডিও এবং আপলোড করা ফটোতে আপত্তিকর কন্টেন্ট না থাকা নিশ্চিত করতে Veo জেমিনি জুড়ে সুরক্ষা ফিল্টার প্রয়োগ করে। আমাদের শর্তাবলী এবং নির্দেশিকা লঙ্ঘনকারী প্রম্পটগুলি ব্লক করা হয়।
দ্রুত লেখার মূল বিষয়গুলি
ভালো প্রম্পটগুলি বর্ণনামূলক এবং স্পষ্ট। Veo থেকে সর্বাধিক সুবিধা পেতে, আপনার মূল ধারণাটি চিহ্নিত করে শুরু করুন, কীওয়ার্ড এবং সংশোধক যোগ করে আপনার ধারণাটি পরিমার্জন করুন এবং আপনার প্রম্পটে ভিডিও-নির্দিষ্ট পরিভাষা অন্তর্ভুক্ত করুন।
আপনার প্রম্পটে নিম্নলিখিত উপাদানগুলি অন্তর্ভুক্ত করা উচিত:
- বিষয় : আপনার ভিডিওতে আপনি যে বস্তু, ব্যক্তি, প্রাণী বা দৃশ্য দেখতে চান, যেমন শহরের দৃশ্য , প্রকৃতি , যানবাহন , অথবা কুকুরছানা ।
- ক্রিয়া : বিষয় কী করছে (উদাহরণস্বরূপ, হাঁটা , দৌড়ানো , অথবা মাথা ঘোরানো )।
- স্টাইল : নির্দিষ্ট ফিল্ম স্টাইল কীওয়ার্ড ব্যবহার করে সৃজনশীল দিকনির্দেশনা নির্দিষ্ট করুন, যেমন সাই-ফাই , হরর ফিল্ম , ফিল্ম নোয়ার , অথবা কার্টুনের মতো অ্যানিমেটেড স্টাইল।
- ক্যামেরার অবস্থান এবং গতি : [ঐচ্ছিক] এরিয়াল ভিউ , আই-লেভেল , টপ-ডাউন শট , ডলি শট , অথবা ওয়ার্মস আই এর মতো শব্দ ব্যবহার করে ক্যামেরার অবস্থান এবং গতিবিধি নিয়ন্ত্রণ করুন।
- রচনা : [ঐচ্ছিক] শটটি কীভাবে ফ্রেম করা হয়, যেমন ওয়াইড শট , ক্লোজ-আপ , সিঙ্গেল-শট বা টু-শট ।
- ফোকাস এবং লেন্সের প্রভাব : [ঐচ্ছিক] নির্দিষ্ট ভিজ্যুয়াল এফেক্ট অর্জনের জন্য শ্যালো ফোকাস , ডিপ ফোকাস , সফট ফোকাস , ম্যাক্রো লেন্স এবং ওয়াইড-এঙ্গেল লেন্সের মতো শব্দ ব্যবহার করুন।
- পরিবেশ : [ঐচ্ছিক] রঙ এবং আলো কীভাবে দৃশ্যে অবদান রাখে, যেমন নীল টোন , রাত , অথবা উষ্ণ টোন ।
প্রম্পট লেখার জন্য আরও টিপস
- বর্ণনামূলক ভাষা ব্যবহার করুন : Veo-এর একটি স্পষ্ট চিত্র আঁকতে বিশেষণ এবং ক্রিয়াবিশেষণ ব্যবহার করুন।
- মুখের বিবরণ উন্নত করুন : ছবির কেন্দ্রবিন্দু হিসেবে মুখের বিবরণ নির্দিষ্ট করুন, যেমন প্রম্পটে "পোর্ট্রেট" শব্দটি ব্যবহার করা।
আরও বিস্তারিত প্রম্পটিং কৌশলের জন্য, প্রম্পট ডিজাইনের ভূমিকা দেখুন।
অডিওর জন্য অনুরোধ করা হচ্ছে
ভিও ৩ এর সাহায্যে আপনি শব্দ প্রভাব, পরিবেষ্টিত শব্দ এবং সংলাপের জন্য সংকেত প্রদান করতে পারেন। মডেলটি একটি সিঙ্ক্রোনাইজড সাউন্ডট্র্যাক তৈরি করতে এই সংকেতগুলির সূক্ষ্মতা ধারণ করে।
- সংলাপ: নির্দিষ্ট বক্তৃতার জন্য উদ্ধৃতি ব্যবহার করুন। (উদাহরণ: "এটি অবশ্যই মূল চাবিকাঠি," তিনি বিড়বিড় করে বললেন।)
- শব্দের প্রভাব (SFX): স্পষ্টভাবে শব্দ বর্ণনা করুন। (উদাহরণ: টায়ার জোরে চিৎকার করছে, ইঞ্জিন গর্জন করছে।)
- পরিবেশের শব্দ: পরিবেশের শব্দচিত্র বর্ণনা করুন। (উদাহরণ: পটভূমিতে একটি মৃদু, ভৌতিক গুঞ্জন প্রতিধ্বনিত হচ্ছে।)
এই ভিডিওগুলি ক্রমবর্ধমান মাত্রার বিশদ সহ Veo 3 এর অডিও প্রজন্মকে উৎসাহিত করে তা প্রদর্শন করে।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| আরও বিস্তারিত (সংলাপ এবং পরিবেশ) কুয়াশাচ্ছন্ন প্রশান্ত মহাসাগরীয় উত্তর-পশ্চিম বনের একটি বিস্তৃত ছবি। দুই ক্লান্ত পর্বতারোহী, একজন পুরুষ এবং একজন মহিলা, ফার্ন গাছের মধ্য দিয়ে ঠেলে দিচ্ছেন, ঠিক তখনই লোকটি হঠাৎ থেমে গেল, একটি গাছের দিকে তাকিয়ে। ক্লোজ-আপ: গাছের বাকলে তাজা, গভীর নখের দাগ। লোকটি: (তার শিকারের ছুরি ধরে) "এটা কোন সাধারণ ভালুক নয়।" মহিলা: (ভয়ে ভীত হয়ে, বনের দিকে তাকিয়ে) "তাহলে এটা কী?" একটি রুক্ষ বাকল, ছিঁড়ে যাওয়া ডালপালা, স্যাঁতসেঁতে মাটিতে পায়ের শব্দ। একটি একাকী পাখি কিচিরমিচির করছে। | |
| কম বিস্তারিত (সংলাপ) কাগজের কাট-আউট অ্যানিমেশন। নতুন গ্রন্থাগারিক: "আপনি নিষিদ্ধ বইগুলো কোথায় রাখেন?" বৃদ্ধ কিউরেটর: "আমরা রাখি না। তারা আমাদের রাখে।" |
অডিওটি শোনার জন্য এই প্রম্পটগুলি নিজে চেষ্টা করে দেখুন! Veo 3 ব্যবহার করে দেখুন
রেফারেন্স ছবি সহ প্রম্পট করা
Veo-এর ইমেজ-টু-ভিডিও ক্ষমতা ব্যবহার করে আপনি আপনার জেনারেট করা ভিডিওগুলিকে গাইড করার জন্য ইনপুট হিসেবে এক বা একাধিক ছবি ব্যবহার করতে পারেন। Veo ইনপুট ইমেজটিকে প্রাথমিক ফ্রেম হিসেবে ব্যবহার করে। আপনার ভিডিওর প্রথম দৃশ্য হিসেবে আপনি যা কল্পনা করেন তার কাছাকাছি একটি ছবি নির্বাচন করুন যাতে দৈনন্দিন জিনিসগুলিকে অ্যানিমেট করা যায়, অঙ্কন এবং চিত্রগুলিকে জীবন্ত করা যায় এবং প্রকৃতির দৃশ্যে গতিশীলতা এবং শব্দ যোগ করা যায়।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| ইনপুট ছবি (ন্যানো বানানা দ্বারা তৈরি) একটি অতিবাস্তববাদী ম্যাক্রো ছবি যেখানে দেখা যাচ্ছে ক্ষুদ্র, ক্ষুদ্র সার্ফাররা একটি গ্রাম্য পাথরের বাথরুমের সিঙ্কের ভেতরে সমুদ্রের ঢেউয়ে চড়ে বেড়াচ্ছেন। একটি ভিনটেজ পিতলের কল চলমান, যা চিরস্থায়ী ঢেউয়ের সৃষ্টি করছে। অবাস্তব, অদ্ভুত, উজ্জ্বল প্রাকৃতিক আলো। | |
| আউটপুট ভিডিও (Veo 3.1 দ্বারা তৈরি) একটি অবাস্তব, সিনেমাটিক ম্যাক্রো ভিডিও। ক্ষুদ্র সার্ফাররা পাথরের বাথরুমের সিঙ্কের ভেতরে অনন্ত, ঘূর্ণায়মান ঢেউয়ের উপর চড়ে বেড়ায়। একটি চলমান ভিনটেজ পিতলের কল অবিরাম ঢেউয়ের সৃষ্টি করে। ক্যামেরা ধীরে ধীরে অদ্ভুত, সূর্যালোকিত দৃশ্যের উপর দিয়ে ঘুরে বেড়ায় যখন ক্ষুদ্রাকৃতির মূর্তিগুলি দক্ষতার সাথে ফিরোজা জল খোদাই করে। |
Veo 3.1 আপনাকে আপনার তৈরি করা ভিডিওর কন্টেন্ট পরিচালনা করার জন্য ছবি বা উপাদানের রেফারেন্স দিতে দেয়। একজন ব্যক্তি, চরিত্র বা পণ্যের সর্বাধিক তিনটি সম্পদ চিত্র প্রদান করে। Veo আউটপুট ভিডিওতে বিষয়ের উপস্থিতি সংরক্ষণ করে।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| রেফারেন্স ছবি (ন্যানো বানানা দ্বারা তৈরি) গভীর অন্ধকার জলে একটি গভীর সমুদ্রের মাছ ধরার মাছ লুকিয়ে আছে, দাঁত খোলা এবং টোপ জ্বলছে। | |
| রেফারেন্স ছবি (ন্যানো বানানা দ্বারা তৈরি) একটি গোলাপী শিশুর রাজকন্যার পোশাক, যার উপর একটি জাদুদণ্ড এবং টিয়ারা রয়েছে, একটি সাধারণ পণ্যের পটভূমিতে। | |
| আউটপুট ভিডিও (Veo 3.1 দ্বারা তৈরি) পোশাকটি পরে, সাঁতার কাটতে এবং জাদুদণ্ডটি নাড়াতে মাছের একটি বোকা কার্টুন সংস্করণ তৈরি করুন। |
Veo 3.1 ব্যবহার করে, আপনি ভিডিওর প্রথম এবং শেষ ফ্রেম নির্দিষ্ট করে ভিডিও তৈরি করতে পারেন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| প্রথম ছবি (ন্যানো কলা দ্বারা তৈরি) ফরাসি রিভিয়েরা উপকূলে লাল কনভার্টেবল রেসিং কার চালাচ্ছে একটি আদা বিড়ালের একটি উচ্চমানের ফটোরিয়ালিস্টিক সামনের ছবি। | |
| শেষ ছবি (ন্যানো কলা দ্বারা তৈরি) গাড়িটি যখন পাহাড় থেকে নামবে তখন কী হবে তা দেখাও। | |
| আউটপুট ভিডিও (Veo 3.1 দ্বারা তৈরি) ঐচ্ছিক |
এই বৈশিষ্ট্যটি আপনাকে আপনার শটের কম্পোজিশনের উপর সুনির্দিষ্ট নিয়ন্ত্রণ দেয়, যার মাধ্যমে আপনি শুরু এবং শেষের ফ্রেমটি সংজ্ঞায়িত করতে পারবেন। একটি ছবি আপলোড করুন অথবা পূর্ববর্তী ভিডিও প্রজন্মের একটি ফ্রেম ব্যবহার করুন যাতে নিশ্চিত করা যায় যে আপনার দৃশ্যটি ঠিক আপনার কল্পনা অনুসারে শুরু এবং শেষ হচ্ছে।
এক্সটেনশনের জন্য অনুরোধ করা হচ্ছে
Veo 3.1 ব্যবহার করে আপনার Veo-জেনারেটেড ভিডিওটি প্রসারিত করতে, একটি ঐচ্ছিক টেক্সট প্রম্পটের সাথে ভিডিওটিকে ইনপুট হিসেবে ব্যবহার করুন। Extend আপনার ভিডিওর শেষ সেকেন্ড বা 24 ফ্রেম চূড়ান্ত করে এবং ক্রিয়া চালিয়ে যায়।
মনে রাখবেন যে ভিডিওর শেষ ১ সেকেন্ডে যদি ভয়েস উপস্থিত না থাকে তবে তা কার্যকরভাবে প্রসারিত করা যাবে না।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| ইনপুট ভিডিও (Veo 3.1 দ্বারা তৈরি) প্যারাগ্লাইডারটি পাহাড়ের চূড়া থেকে উড়ে যায় এবং নীচের ফুলে ঢাকা উপত্যকাগুলিকে উপেক্ষা করে পাহাড় বেয়ে নেমে যেতে শুরু করে। | |
| আউটপুট ভিডিও (Veo 3.1 দ্বারা তৈরি) প্যারাগ্লাইডারটি ধীরে ধীরে নামার সময় এই ভিডিওটি প্রসারিত করুন। |
উদাহরণ প্রম্পট এবং আউটপুট
এই বিভাগে বেশ কয়েকটি প্রম্পট উপস্থাপন করা হয়েছে, যা তুলে ধরে যে কীভাবে বর্ণনামূলক বিবরণ প্রতিটি ভিডিওর ফলাফলকে উন্নত করতে পারে।
বরফখণ্ড
এই ভিডিওটি দেখায় কিভাবে আপনি আপনার প্রম্পটে প্রম্পট লেখার মৌলিক উপাদানগুলি ব্যবহার করতে পারেন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| ঠান্ডা নীল টোন (পরিবেশ) সহ একটি হিমায়িত পাথরের দেয়ালে (প্রসঙ্গ) গলে যাওয়া বরফের (বিষয়) ক্লোজ-আপ শট (রচনা), জুম ইন (ক্যামেরা মোশন) জলের ফোঁটার (ক্রিয়া) ক্লোজ-আপ বিশদ বজায় রেখে। |
ফোনে লোকটি
এই ভিডিওগুলি দেখায় যে কীভাবে আপনি আপনার প্রম্পটটি ক্রমবর্ধমান সুনির্দিষ্ট বিবরণ সহ সংশোধন করতে পারেন যাতে Veo আপনার পছন্দ অনুসারে আউটপুটটি পরিমার্জন করতে পারে।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| কম বিস্তারিত ক্যামেরাটি সবুজ ট্রেঞ্চ কোট পরা একজন হতাশ ব্যক্তির ঘনিষ্ঠ ছবি দেখানোর জন্য ঝাঁপিয়ে পড়েছে। সে সবুজ নিয়ন আলো সহ একটি ঘূর্ণায়মান স্টাইলের ওয়াল ফোনে কল করছে। এটি দেখতে কোনও সিনেমার দৃশ্যের মতো। | |
| আরও বিস্তারিত একটি ক্লোজ-আপ সিনেমাটিক শট দেখায় যে একজন মরিয়া মানুষ, যিনি একটি ময়লা সবুজ ট্রেঞ্চ কোট পরা, একটি ঘূর্ণায়মান ফোনে ডায়াল করছেন, একটি সবুজ নিয়ন সাইনের ভয়ঙ্কর আভায় স্নাত। ক্যামেরাটি দ্রুত এগিয়ে আসে, তার চোয়ালের উত্তেজনা এবং কল করার জন্য লড়াই করার সময় তার মুখে যে হতাশা ফুটে উঠেছে তা প্রকাশ করে। অগভীর গভীরতা তার লোমযুক্ত ভ্রু এবং কালো ঘূর্ণায়মান ফোনের উপর দৃষ্টি নিবদ্ধ করে, পটভূমিকে নিয়ন রঙের সমুদ্র এবং অস্পষ্ট ছায়ায় ঝাপসা করে দেয়, তাৎক্ষণিকতা এবং বিচ্ছিন্নতার অনুভূতি তৈরি করে। |
তুষার চিতা
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| সহজ প্রম্পট: তুষার চিতাবাঘের মতো পশমওয়ালা একটি সুন্দর প্রাণী শীতকালীন বনে হেঁটে বেড়াচ্ছে, 3D কার্টুন স্টাইলে রেন্ডার। | |
| বিস্তারিত প্রম্পট: আনন্দময় কার্টুন স্টাইলে একটি ছোট 3D অ্যানিমেটেড দৃশ্য তৈরি করুন। তুষার চিতাবাঘের মতো পশম, বড় অভিব্যক্তিপূর্ণ চোখ এবং বন্ধুত্বপূর্ণ, গোলাকার আকৃতির একটি সুন্দর প্রাণী আনন্দের সাথে একটি অদ্ভুত শীতকালীন বনের মধ্য দিয়ে দৌড়াচ্ছে। দৃশ্যটিতে গোলাকার, তুষারাবৃত গাছ, মৃদু তুষারপাত এবং ডালপালা দিয়ে উষ্ণ সূর্যালোক ছড়িয়ে থাকা থাকা উচিত। প্রাণীটির উচ্ছ্বসিত নড়াচড়া এবং প্রশস্ত হাসি বিশুদ্ধ আনন্দ প্রকাশ করা উচিত। উজ্জ্বল, প্রফুল্ল রঙ এবং কৌতুকপূর্ণ অ্যানিমেশন সহ একটি উচ্ছ্বসিত, হৃদয়গ্রাহী সুরের জন্য লক্ষ্য রাখুন। |
লেখার উপাদানগুলির উদাহরণ
এই উদাহরণগুলি আপনাকে দেখায় যে কীভাবে প্রতিটি মৌলিক উপাদান দ্বারা আপনার প্রম্পটগুলিকে পরিমার্জন করতে হয়।
বিষয় এবং প্রেক্ষাপট
মূল ফোকাস (বিষয়) এবং পটভূমি বা পরিবেশ (প্রসঙ্গ) নির্দিষ্ট করুন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| সাদা কংক্রিটের অ্যাপার্টমেন্ট ভবনের স্থাপত্যিক প্রতিকৃতি, যেখানে প্রবাহমান জৈব আকৃতি রয়েছে, সবুজ সবুজ এবং ভবিষ্যত উপাদানের সাথে নির্বিঘ্নে মিশে গেছে। | |
| মহাকাশে ভাসমান একটি উপগ্রহ, পটভূমিতে চাঁদ এবং কিছু তারা। |
অ্যাকশন
ব্যক্তি কী করছে (যেমন, হাঁটা, দৌড়ানো, অথবা মাথা ঘোরানো) তা নির্দিষ্ট করুন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| সূর্যাস্তের সময় দিগন্তের দিকে তৃপ্ত এবং আরামে সমুদ্র সৈকত ধরে হেঁটে যাওয়া একজন মহিলার একটি বিশাল ছবি। |
স্টাইল
প্রজন্মকে একটি নির্দিষ্ট নান্দনিকতার দিকে পরিচালিত করার জন্য কীওয়ার্ড যোগ করুন (যেমন, পরাবাস্তব, ভিনটেজ, ভবিষ্যতবাদী, ফিল্ম নোয়ার)।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| ফিল্ম নোয়ার স্টাইল, পুরুষ এবং মহিলা রাস্তায় হাঁটছেন, রহস্য, সিনেমাটিক, সাদা-কালো। |
ক্যামেরার গতি এবং গঠন
ক্যামেরা কীভাবে নড়াচড়া করে (পিওভি শট, এরিয়াল ভিউ, ট্র্যাকিং ড্রোন ভিউ) এবং কীভাবে শটটি ফ্রেম করা হয় (ওয়াইড শট, ক্লোজ-আপ, লো অ্যাঙ্গেল) তা নির্দিষ্ট করুন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| কানাডার রাতে বৃষ্টির মধ্যে গাড়ি চালিয়ে একটি ভিনটেজ গাড়ির দৃশ্য, সিনেমাটিক। | |
| শহরের প্রতিফলন সহ একটি চোখের চরম ঘনিষ্ঠ দৃশ্য। |
পরিবেশ
রঙের প্যালেট এবং আলো মেজাজকে প্রভাবিত করে। "নীরব কমলা উষ্ণ টোন," "প্রাকৃতিক আলো," "সূর্যোদয়," অথবা "শীতল নীল টোন" এর মতো শব্দগুলি ব্যবহার করে দেখুন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| পার্কে একটি মেয়ের আরাধ্য গোল্ডেন রিট্রিভার কুকুরছানা ধরে থাকার ক্লোজআপ, সূর্যের আলো। | |
| বৃষ্টির মধ্যে বাসে চড়ে এক বিষণ্ণ মহিলার সিনেমাটিক ক্লোজ-আপ শট, শীতল নীল সুর, বিষণ্ণ মেজাজ। |
নেতিবাচক প্রম্পট
নেতিবাচক প্রম্পটগুলি এমন উপাদানগুলিকে নির্দিষ্ট করে যা আপনি ভিডিওতে চান না ।
- ❌ " না" বা "না " এর মতো শিক্ষণীয় ভাষা ব্যবহার করবেন না (যেমন, "দেয়াল নেই")।
- ✅ আপনি যা দেখতে চান না তা বর্ণনা করুন। (যেমন, "দেয়াল, ফ্রেম")।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| নেতিবাচক প্রম্পট ছাড়া: একটি বৃহৎ, একাকী ওক গাছের একটি সংক্ষিপ্ত, স্টাইলাইজড অ্যানিমেশন তৈরি করুন যার পাতাগুলি প্রবল বাতাসে জোরে জোরে উড়ছে... [ছাঁটা] | |
| নেতিবাচক প্রম্পট সহ: [একই প্রম্পট] নেতিবাচক ইঙ্গিত: শহুরে পটভূমি, মনুষ্যসৃষ্ট কাঠামো, অন্ধকার, ঝড়ো, অথবা হুমকিস্বরূপ পরিবেশ। |
আকৃতির অনুপাত
ভিও আপনাকে আপনার ভিডিওর জন্য আকৃতির অনুপাত নির্দিষ্ট করতে দেয়।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| ওয়াইডস্ক্রিন (১৬:৯) ১৯৭০-এর দশকের পাম স্প্রিংসে, উষ্ণ সূর্যালোক, দীর্ঘ ছায়া, লাল কনভার্টেবল গাড়ি চালাচ্ছেন এমন একজন ব্যক্তির ট্র্যাকিং ড্রোন ভিউ সহ একটি ভিডিও তৈরি করুন। | |
| প্রতিকৃতি (৯:১৬) একটি সবুজ রেইনফরেস্টের মধ্যে একটি রাজকীয় হাওয়াইয়ান জলপ্রপাতের মসৃণ গতি তুলে ধরে একটি ভিডিও তৈরি করুন। বাস্তবসম্মত জলপ্রবাহ, বিস্তারিত পাতা এবং প্রাকৃতিক আলোর উপর মনোনিবেশ করুন যাতে প্রশান্তি প্রকাশ পায়। ঘন ছাউনির মধ্য দিয়ে প্রবাহিত জল, কুয়াশাচ্ছন্ন পরিবেশ এবং সূর্যের আলোর ঝাপটা ক্যাপচার করুন। জলপ্রপাত এবং এর আশেপাশের পরিবেশ প্রদর্শনের জন্য মসৃণ, সিনেমাটিক ক্যামেরা মুভমেন্ট ব্যবহার করুন। একটি শান্তিপূর্ণ, বাস্তবসম্মত সুরের লক্ষ্য রাখুন, যা দর্শককে হাওয়াইয়ান রেইনফরেস্টের নির্মল সৌন্দর্যে নিয়ে যাবে। |
সীমাবদ্ধতা
- অনুরোধের বিলম্ব: সর্বনিম্ন: ১১ সেকেন্ড; সর্বোচ্চ: ৬ মিনিট (পিক আওয়ারে)।
- আঞ্চলিক সীমাবদ্ধতা: EU, UK, CH, MENA অবস্থানগুলিতে,
personGenerationএর জন্য অনুমোদিত মানগুলি নিম্নরূপ:- ভার্সন ৩: শুধুমাত্র
allow_adult। - ভিও ২:
dont_allowএবংallow_adult। ডিফল্ট হলোdont_allow।
- ভার্সন ৩: শুধুমাত্র
- ভিডিও ধারণ: জেনারেট করা ভিডিওগুলি সার্ভারে 2 দিনের জন্য সংরক্ষণ করা হয়, তারপরে সেগুলি সরিয়ে ফেলা হয়। স্থানীয় কপি সংরক্ষণ করতে, আপনাকে জেনারেট করার 2 দিনের মধ্যে আপনার ভিডিওটি ডাউনলোড করতে হবে। বর্ধিত ভিডিওগুলিকে নতুন জেনারেট করা ভিডিও হিসাবে বিবেচনা করা হয়।
- ওয়াটারমার্কিং: Veo দ্বারা তৈরি ভিডিওগুলি SynthID ব্যবহার করে ওয়াটারমার্ক করা হয়, যা আমাদের ওয়াটারমার্কিং এবং AI-উত্পাদিত সামগ্রী সনাক্তকরণের সরঞ্জাম। SynthID যাচাইকরণ প্ল্যাটফর্ম ব্যবহার করে ভিডিওগুলি যাচাই করা যেতে পারে।
- নিরাপত্তা: তৈরি করা ভিডিওগুলি নিরাপত্তা ফিল্টার এবং মুখস্থকরণ পরীক্ষা প্রক্রিয়ার মধ্য দিয়ে পাস করা হয় যা গোপনীয়তা, কপিরাইট এবং পক্ষপাতের ঝুঁকি হ্রাস করতে সহায়তা করে।
- অডিও ত্রুটি: নিরাপত্তা ফিল্টার বা অডিওতে অন্যান্য প্রক্রিয়াকরণ সমস্যার কারণে Veo 3.1 কখনও কখনও ভিডিও তৈরি হতে বাধা দেয়। যদি আপনার ভিডিও তৈরি হতে বাধা দেওয়া হয় তবে আপনাকে কোনও চার্জ করা হবে না।
মডেল বৈশিষ্ট্য
| বৈশিষ্ট্য | বিবরণ | ভিও ৩.১ এবং ভিও ৩.১ দ্রুত | ভিও ৩ এবং ভিও ৩ ফাস্ট | ভিও ২ |
|---|---|---|---|---|
| অডিও | নেটিভভাবে ভিডিও সহ অডিও তৈরি করে। | নেটিভভাবে ভিডিও সহ অডিও তৈরি করে। | ✔️ সর্বদা চালু | ❌ শুধুমাত্র নীরব |
| ইনপুট পদ্ধতি | জেনারেশনের জন্য ব্যবহৃত ইনপুটের ধরণ। | টেক্সট-টু-ভিডিও, ইমেজ-টু-ভিডিও, ভিডিও-টু-ভিডিও | টেক্সট-টু-ভিডিও, ইমেজ-টু-ভিডিও | টেক্সট-টু-ভিডিও, ইমেজ-টু-ভিডিও |
| রেজোলিউশন | ভিডিওর আউটপুট রেজোলিউশন। | ৭২০পি, ১০৮০পি (শুধুমাত্র ৮সেকেন্ড দৈর্ঘ্য), ৪কে (শুধুমাত্র ৮সেকেন্ড দৈর্ঘ্য) শুধুমাত্র ভিডিও এক্সটেনশন ব্যবহার করার সময় 720p। | ৭২০পি এবং ১০৮০পি (শুধুমাত্র ১৬:৯) | ৭২০পি |
| ফ্রেম রেট | ভিডিওর আউটপুট ফ্রেম রেট। | ২৪fps | ২৪fps | ২৪fps |
| ভিডিওর সময়কাল | তৈরি করা ভিডিওর দৈর্ঘ্য। | ৮ সেকেন্ড, ৬ সেকেন্ড, ৪ সেকেন্ড ১০৮০পি বা ৪কে হলে অথবা রেফারেন্স ছবি ব্যবহার করলে মাত্র ৮ সেকেন্ড | ৮ সেকেন্ড | ৫-৮ সেকেন্ড |
| অনুরোধ প্রতি ভিডিও | প্রতি অনুরোধে তৈরি ভিডিওর সংখ্যা। | ১ | ১ | ১ অথবা ২ |
| অবস্থা এবং বিবরণ | মডেলের প্রাপ্যতা এবং আরও বিশদ বিবরণ। | প্রিভিউ | স্থিতিশীল | স্থিতিশীল |
মডেল সংস্করণ
Veo মডেল-নির্দিষ্ট ব্যবহারের আরও বিশদ বিবরণের জন্য মূল্য নির্ধারণ এবং হার সীমা পৃষ্ঠাগুলি দেখুন।
ভিও ফাস্ট ভার্সনগুলি ডেভেলপারদের উচ্চ মানের বজায় রেখে এবং গতি এবং ব্যবসায়িক ব্যবহারের ক্ষেত্রে অপ্টিমাইজ করার সময় শব্দ সহ ভিডিও তৈরি করতে দেয়। এগুলি ব্যাকএন্ড পরিষেবাগুলির জন্য আদর্শ যা প্রোগ্রাম্যাটিকভাবে বিজ্ঞাপন তৈরি করে, সৃজনশীল ধারণাগুলির দ্রুত A/B পরীক্ষার জন্য সরঞ্জাম, অথবা এমন অ্যাপগুলির জন্য যা দ্রুত সোশ্যাল মিডিয়া সামগ্রী তৈরি করতে প্রয়োজন।
ভিও ৩.১ প্রিভিউ
| সম্পত্তি | বিবরণ |
|---|---|
| মডেল কোড | জেমিনি এপিআই |
| সমর্থিত ডেটা প্রকারগুলি | ইনপুট টেক্সট, ছবি আউটপুট অডিও সহ ভিডিও |
| সীমা | টেক্সট ইনপুট ১,০২৪টি টোকেন আউটপুট ভিডিও ১ |
| সর্বশেষ আপডেট | জানুয়ারী ২০২৬ |
ভিও ৩.১ ফাস্ট প্রিভিউ
| সম্পত্তি | বিবরণ |
|---|---|
| মডেল কোড | জেমিনি এপিআই |
| সমর্থিত ডেটা প্রকারগুলি | ইনপুট টেক্সট, ছবি আউটপুট অডিও সহ ভিডিও |
| সীমা | টেক্সট ইনপুট ১,০২৪টি টোকেন আউটপুট ভিডিও ১ |
| সর্বশেষ আপডেট | সেপ্টেম্বর ২০২৫ |
ভিও ২
| সম্পত্তি | বিবরণ |
|---|---|
| মডেল কোড | জেমিনি এপিআই |
| সমর্থিত ডেটা প্রকারগুলি | ইনপুট টেক্সট, ছবি আউটপুট ভিডিও |
| সীমা | টেক্সট ইনপুট নিষিদ্ধ ছবি ইনপুট ২০ মেগাবাইট পর্যন্ত যেকোনো ছবির রেজোলিউশন এবং আকৃতির অনুপাত আউটপুট ভিডিও ২ পর্যন্ত |
| সর্বশেষ আপডেট | এপ্রিল ২০২৫ |
এরপর কি?
- Veo Quickstart Colab এবং Veo 3.1 অ্যাপলেটে পরীক্ষা-নিরীক্ষা করে Veo 3.1 API দিয়ে শুরু করুন।
- আমাদের প্রম্পট ডিজাইনের ভূমিকার মাধ্যমে আরও ভালো প্রম্পট কীভাবে লিখতে হয় তা শিখুন।