ভিডিও বোঝা সম্পর্কে জানতে, ভিডিও বোঝার নির্দেশিকাটি দেখুন।
Veo 3.1 হলো গুগলের একটি সর্বাধুনিক মডেল, যা অত্যাশ্চর্য বাস্তবতা এবং নিজস্বভাবে তৈরি অডিও সহ উচ্চ-মানের ৮-সেকেন্ডের 720p, 1080p বা 4k ভিডিও তৈরি করে। আপনি Gemini API ব্যবহার করে প্রোগ্রাম্যাটিকভাবে এই মডেলটি অ্যাক্সেস করতে পারেন। উপলব্ধ Veo মডেলের বিভিন্ন সংস্করণ সম্পর্কে আরও জানতে, 'মডেল সংস্করণ' (Model Versions) বিভাগটি দেখুন।
Veo 3.1 বিভিন্ন ধরনের ভিজ্যুয়াল ও সিনেম্যাটিক স্টাইলে পারদর্শী এবং এতে বেশ কিছু নতুন সক্ষমতা যুক্ত করা হয়েছে:
- পোর্ট্রেট ভিডিও : ল্যান্ডস্কেপ (
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
রেজোলিউশন নিয়ন্ত্রণ করুন
Veo 3.1 সরাসরি 720p, 1080p বা 4k ভিডিও তৈরি করতে পারে।
মনে রাখবেন যে, রেজোলিউশন যত বেশি হবে, ল্যাটেন্সিও তত বেশি হবে। ৪কে ভিডিওর দামও বেশি ( মূল্য তালিকা দেখুন)।
ভিডিও এক্সটেনশনটিও শুধুমাত্র ৭২০পি ভিডিওর মধ্যে সীমাবদ্ধ।
পাইথন
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 ওরফে 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 এখন আপনার তৈরি করা ভিডিওর বিষয়বস্তুকে নির্দেশনা দেওয়ার জন্য সর্বোচ্চ ৩টি রেফারেন্স ইমেজ গ্রহণ করে। আউটপুট ভিডিওতে বিষয়বস্তুর চেহারা অক্ষুণ্ণ রাখতে কোনো ব্যক্তি, চরিত্র বা পণ্যের ছবি দিন।
উদাহরণস্বরূপ, ন্যানো ব্যানানা দিয়ে তৈরি করা এই তিনটি ছবিকে রেফারেন্স হিসেবে এবং একটি ভালোভাবে লেখা প্রম্পট ব্যবহার করে নিম্নলিখিত ভিডিওটি তৈরি করা যায়:
`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.",
"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"'"}},
"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 ভিডিও সম্প্রসারণ
Veo 3.1 ব্যবহার করে আপনার পূর্বে Veo দিয়ে তৈরি করা ভিডিওগুলিকে ৭ সেকেন্ড থেকে ২০ গুণ পর্যন্ত দীর্ঘ করুন।
ইনপুট ভিডিওর সীমাবদ্ধতা:
- Veo-তে তৈরি ভিডিওগুলোর দৈর্ঘ্য সর্বোচ্চ ১৪১ সেকেন্ড।
- জেমিনি এপিআই শুধুমাত্র ভিও-তে তৈরি ভিডিওর জন্য ভিডিও এক্সটেনশন সমর্থন করে।
- ভিডিওটি পূর্ববর্তী প্রজন্মের হওয়া উচিত, যেমন
operation.response.generated_videos[0].video - ভিডিওগুলো ২ দিনের জন্য সংরক্ষিত থাকে, কিন্তু কোনো ভিডিওর মেয়াদ বাড়ানোর জন্য সেটিকে উল্লেখ করা হলে, তার ২-দিনের সংরক্ষণের সময়সীমা পুনরায় শুরু হয়ে যায়। আপনি শুধুমাত্র গত দুই দিনের মধ্যে তৈরি বা উল্লেখিত ভিডিওগুলোর মেয়াদই বাড়াতে পারবেন।
- ইনপুট ভিডিওগুলোর একটি নির্দিষ্ট দৈর্ঘ্য, অ্যাসপেক্ট রেশিও এবং ডাইমেনশন থাকা আবশ্যক।
- আস্পেক্ট রেশিও: ৯:১৬ অথবা ১৬:৯
- রেজোলিউশন: ৭২০পি
- ভিডিওর দৈর্ঘ্য: ১৪১ সেকেন্ড বা তার কম
এই এক্সটেনশনের আউটপুট হলো একটি একক ভিডিও, যা ব্যবহারকারীর ইনপুট ভিডিও এবং তৈরি হওয়া বর্ধিত ভিডিওকে একত্রিত করে সর্বোচ্চ ১৪৮ সেকেন্ড পর্যন্ত দীর্ঘ হতে পারে।
এই উদাহরণটি Veo দ্বারা তৈরি একটি ভিডিও নেয় (যা এখানে তার মূল প্রম্পট সহ দেখানো হয়েছে) এবং 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 স্ট্যাটাস 'ট্রু' (true) হওয়ার মাধ্যমে বোঝা যায়।
এই প্রক্রিয়ার মূল অংশ হলো একটি পোলিং লুপ, যা পর্যায়ক্রমে জবটির অবস্থা পরীক্ষা করে।
পাইথন
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 প্যারামিটার এবং স্পেসিফিকেশন
ভিডিও তৈরির প্রক্রিয়া নিয়ন্ত্রণ করতে আপনি আপনার এপিআই অনুরোধে এই প্যারামিটারগুলো সেট করতে পারেন।
| প্যারামিটার | বর্ণনা | Veo 3.1 এবং Veo 3.1 ফাস্ট | Veo 3 এবং Veo 3 ফাস্ট | Veo 2 |
|---|---|---|---|---|
| উদাহরণ | ||||
prompt | ভিডিওটির লিখিত বিবরণ। অডিও সংকেত সমর্থন করে। | string | string | string |
image | অ্যানিমেট করার জন্য একটি প্রাথমিক চিত্র। | Image বস্তু | Image বস্তু | Image বস্তু |
lastFrame | ট্রানজিশনের জন্য ইন্টারপোলেশন ভিডিওর চূড়ান্ত চিত্র। এটি অবশ্যই image প্যারামিটারের সাথে একত্রে ব্যবহার করতে হবে। | Image বস্তু | Image বস্তু | Image বস্তু |
referenceImages | শৈলী ও বিষয়বস্তু নির্দেশক হিসেবে সর্বোচ্চ তিনটি ছবি ব্যবহার করা যাবে। | VideoGenerationReferenceImage অবজেক্ট (শুধুমাত্র Veo 3.1-এর জন্য) | প্রযোজ্য নয় | প্রযোজ্য নয় |
video | ভিডিও এক্সটেনশনের জন্য ব্যবহার করা হবে। | পূর্ববর্তী প্রজন্মের Video বস্তু | প্রযোজ্য নয় | প্রযোজ্য নয় |
| প্যারামিটার | ||||
aspectRatio | ভিডিওটির অ্যাসপেক্ট রেশিও। | "16:9" (ডিফল্ট),"9:16" | "16:9" (ডিফল্ট),"9:16" | "16:9" (ডিফল্ট),"9:16" |
durationSeconds | তৈরি হওয়া ভিডিওটির দৈর্ঘ্য। | "4" , "6" , "8" .এক্সটেনশন, রেফারেন্স ইমেজ অথবা 1080p এবং 4k রেজোলিউশন ব্যবহার করার সময় অবশ্যই "8" হতে হবে। | "4" , "6" , "8" .এক্সটেনশন, রেফারেন্স ইমেজ অথবা 1080p এবং 4k রেজোলিউশন ব্যবহার করার সময় অবশ্যই "8" হতে হবে। | "5" , "6" , "8" |
personGeneration | মানুষের প্রজন্মকে নিয়ন্ত্রণ করে। (অঞ্চলগত সীমাবদ্ধতার জন্য সীমাবদ্ধতাসমূহ দেখুন) | টেক্সট-টু-ভিডিও এবং এক্সটেনশন:"allow_all" শুধুমাত্রইমেজ-টু-ভিডিও, ইন্টারপোলেশন, এবং রেফারেন্স ইমেজ: শুধুমাত্র "allow_adult" | টেক্সট-টু-ভিডিও:"allow_all" শুধুমাত্রছবি থেকে ভিডিও: শুধুমাত্র "allow_adult" | টেক্সট-টু-ভিডিও:"allow_all" , "allow_adult" , "dont_allow"ছবি থেকে ভিডিও: "allow_adult" এবং "dont_allow" |
resolution | ভিডিওটির রেজোলিউশন। | "720p" (ডিফল্ট),"1080p" (শুধুমাত্র ৮ সেকেন্ডের সময়কাল সমর্থন করে),"4k" (শুধুমাত্র ৮ সেকেন্ড সময়কাল সমর্থন করে)এক্সটেনশনের জন্য শুধুমাত্র "720p" | "720p" (ডিফল্ট),"1080p" (শুধুমাত্র ৮ সেকেন্ডের সময়কাল সমর্থন করে),"4k" (শুধুমাত্র ৮ সেকেন্ড সময়কাল সমর্থন করে)এক্সটেনশনের জন্য শুধুমাত্র "720p" | অসমর্থিত |
উল্লেখ্য যে, seed প্যারামিটারটি Veo 3 মডেলের জন্যও উপলব্ধ। এটি ডিটারমিনিজমের নিশ্চয়তা দেয় না, তবে এটিকে সামান্য উন্নত করে।
Veo প্রম্পট গাইড
এই বিভাগে Veo ব্যবহার করে তৈরি করা যায় এমন ভিডিওর উদাহরণ রয়েছে, এবং স্বতন্ত্র ফলাফল পাওয়ার জন্য কীভাবে প্রম্পট পরিবর্তন করতে হয় তা দেখানো হয়েছে।
নিরাপত্তা ফিল্টার
তৈরি করা ভিডিও এবং আপলোড করা ছবিতে যেন কোনো আপত্তিকর বিষয়বস্তু না থাকে, তা নিশ্চিত করতে Veo জেমিনি জুড়ে সুরক্ষা ফিল্টার প্রয়োগ করে। যেসব প্রম্পট আমাদের শর্তাবলী ও নির্দেশিকা লঙ্ঘন করে, সেগুলো ব্লক করা হয়।
প্রম্পট লেখার মৌলিক বিষয়
ভালো প্রম্পটগুলো বর্ণনামূলক এবং স্পষ্ট হয়। Veo থেকে সেরা ফল পেতে, প্রথমে আপনার মূল ধারণাটি চিহ্নিত করুন, কীওয়ার্ড ও মডিফায়ার যোগ করে ধারণাটিকে আরও পরিমার্জিত করুন এবং আপনার প্রম্পটগুলোতে ভিডিও-নির্দিষ্ট পরিভাষা অন্তর্ভুক্ত করুন।
আপনার নির্দেশনায় নিম্নলিখিত উপাদানগুলো অন্তর্ভুক্ত থাকা উচিত:
- বিষয় : যে বস্তু, ব্যক্তি, প্রাণী বা দৃশ্য আপনি আপনার ভিডিওতে চান, যেমন শহরের দৃশ্য , প্রকৃতি , যানবাহন বা কুকুরছানা ।
- ক্রিয়া : বস্তুটি যা করছে (যেমন, হাঁটা , দৌড়ানো বা মাথা ঘোরানো )।
- শৈলী : নির্দিষ্ট চলচ্চিত্র শৈলীর কীওয়ার্ড ব্যবহার করে সৃজনশীল দিকনির্দেশনা নির্দিষ্ট করুন, যেমন— সাই-ফাই , হরর ফিল্ম , ফিল্ম নোয়ার , অথবা কার্টুনের মতো অ্যানিমেটেড শৈলী।
- ক্যামেরার অবস্থান ও গতিবিধি : [ঐচ্ছিক] এরিয়াল ভিউ , আই-লেভেল , টপ-ডাউন শট , ডলি শট , বা ওয়ার্মস আই-এর মতো পরিভাষা ব্যবহার করে ক্যামেরার অবস্থান ও গতিবিধি নিয়ন্ত্রণ করুন।
- কম্পোজিশন : [ঐচ্ছিক] শটটি কীভাবে ফ্রেম করা হবে, যেমন ওয়াইড শট , ক্লোজ-আপ , সিঙ্গেল-শট বা টু-শট ।
- ফোকাস এবং লেন্স এফেক্ট : [ঐচ্ছিক] নির্দিষ্ট ভিজ্যুয়াল এফেক্ট অর্জনের জন্য শ্যালো ফোকাস , ডিপ ফোকাস , সফট ফোকাস , ম্যাক্রো লেন্স , এবং ওয়াইড-অ্যাঙ্গেল লেন্স- এর মতো পরিভাষা ব্যবহার করুন।
- পরিবেশ : [ঐচ্ছিক] দৃশ্যে রঙ এবং আলোর ভূমিকা, যেমন নীল আভা , রাত বা উষ্ণ আভা ।
লেখার বিষয়বস্তু নিয়ে আরও কিছু পরামর্শ
- বর্ণনামূলক ভাষা ব্যবহার করুন : Veo-এর একটি স্পষ্ট চিত্র তুলে ধরতে বিশেষণ ও ক্রিয়াবিশেষণ ব্যবহার করুন।
- মুখের বিবরণ আরও স্পষ্ট করুন : ছবির মূল কেন্দ্রবিন্দু হিসেবে মুখের বিবরণ নির্দিষ্ট করুন, যেমন নির্দেশনায় ‘পোর্ট্রেট’ শব্দটি ব্যবহার করে।
প্রম্পটিং কৌশল সম্পর্কে আরও বিস্তারিত জানতে, “Introduction to prompt design” দেখুন।
অডিওর জন্য অনুরোধ করা হচ্ছে
Veo 3-এর সাহায্যে আপনি সাউন্ড ইফেক্ট, পারিপার্শ্বিক কোলাহল এবং সংলাপের জন্য সংকেত দিতে পারেন। মডেলটি এই সংকেতগুলোর সূক্ষ্মতা ধারণ করে একটি সিঙ্ক্রোনাইজড সাউন্ডট্র্যাক তৈরি করে।
- সংলাপ: নির্দিষ্ট বক্তব্যের ক্ষেত্রে উদ্ধৃতি চিহ্ন ব্যবহার করুন। (উদাহরণ: "এটাই নিশ্চয়ই চাবি," সে বিড়বিড় করে বলল।)
- সাউন্ড এফেক্টস (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' অপশনটি আপনার ভিডিওর শেষ এক সেকেন্ড বা ২৪ ফ্রেমকে চূড়ান্ত করে এবং অ্যাকশনটি চালিয়ে যায়।
মনে রাখবেন, ভিডিওর শেষ ১ সেকেন্ডে কণ্ঠস্বর উপস্থিত না থাকলে তা কার্যকরভাবে দীর্ঘায়িত করা সম্ভব নয়।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| ইনপুট ভিডিও (Veo 3.1 দ্বারা তৈরি) প্যারাগ্লাইডারটি পাহাড়ের চূড়া থেকে উড্ডয়ন করে নিচের ফুলে ঢাকা উপত্যকাগুলোর দিকে তাকিয়ে পাহাড়ের ঢাল বেয়ে নেমে আসতে শুরু করে। | ![]() |
| আউটপুট ভিডিও (Veo 3.1 দ্বারা তৈরি) প্যারাগ্লাইডারটির ধীরে ধীরে নিচে নামার দৃশ্যটি দিয়ে এই ভিডিওটি আরও দীর্ঘ করুন। | ![]() |
উদাহরণ প্রম্পট এবং আউটপুট
এই বিভাগে কয়েকটি নির্দেশিকা উপস্থাপন করা হয়েছে, যা তুলে ধরে যে কীভাবে বর্ণনামূলক বিবরণ প্রতিটি ভিডিওর ফলাফলকে উন্নত করতে পারে।
বরফখণ্ড
এই ভিডিওতে দেখানো হয়েছে, কীভাবে আপনি আপনার প্রম্পটে প্রম্পট লেখার প্রাথমিক বিষয়গুলোর উপাদান ব্যবহার করতে পারেন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| হিমায়িত পাথরের দেয়ালে (প্রসঙ্গ) গলে যাওয়া বরফখণ্ডের (বিষয়বস্তু) একটি ক্লোজ-আপ শট (বিন্যাস), যার চারপাশে শীতল নীল আভা (পরিবেশ) রয়েছে এবং শটটি জুম করা হয়েছে (ক্যামেরার গতি), যেখানে জলের ফোঁটার (ক্রিয়া) ক্লোজ-আপ বিবরণ বজায় রাখা হয়েছে। | ![]() |
ফোনে থাকা লোকটি
এই ভিডিওগুলোতে দেখানো হয়েছে, কীভাবে আপনি আপনার প্রম্পটকে ক্রমশ সুনির্দিষ্ট বিবরণ দিয়ে সংশোধন করতে পারেন, যাতে Veo আপনার পছন্দ অনুযায়ী আউটপুটকে পরিমার্জন করে দেয়।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| কম বিস্তারিত ক্যামেরাটি সরে গিয়ে সবুজ ট্রেঞ্চ কোট পরা এক হতাশ লোকের ক্লোজ-আপ দেখায়। সে সবুজ নিয়ন আলোযুক্ত একটি রোটারি-স্টাইলের দেয়াল ফোনে কথা বলছে। দৃশ্যটি সিনেমার মতো লাগছে। | ![]() |
| আরও বিস্তারিত একটি ক্লোজ-আপ সিনেম্যাটিক শটে দেখা যায়, একটি জীর্ণ সবুজ ট্রেঞ্চ কোট পরা এক হতাশ লোক একটি খসখসে ইটের দেয়ালে লাগানো রোটারি ফোনে ডায়াল করছে, যা একটি সবুজ নিয়ন সাইনের ভুতুড়ে আলোয় উদ্ভাসিত। ক্যামেরাটি ডলি করে কাছে আসে, ফোনটি করার জন্য তার আপ্রাণ চেষ্টার সময় তার চোয়ালের টানটান ভাব এবং মুখে ফুটে ওঠা হতাশা প্রকাশ করে। শ্যালো ডেপথ অফ ফিল্ড তার কুঁচকানো ভ্রু এবং কালো রোটারি ফোনটির উপর ফোকাস করে, পটভূমিকে নিয়ন রঙের সমুদ্র এবং অস্পষ্ট ছায়ায় ঝাপসা করে দেয়, যা এক ধরনের তাগিদ এবং বিচ্ছিন্নতার অনুভূতি তৈরি করে। | ![]() |
তুষার চিতা
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| সহজ নির্দেশ: তুষার চিতার মতো লোমযুক্ত একটি সুন্দর প্রাণী শীতের বনে হেঁটে বেড়াচ্ছে, এটি একটি 3D কার্টুন শৈলীর রেন্ডার। | ![]() |
| বিস্তারিত নির্দেশ: আনন্দময় কার্টুন শৈলীতে একটি ছোট থ্রিডি অ্যানিমেটেড দৃশ্য তৈরি করুন। তুষার চিতার মতো লোম, বড় অভিব্যক্তিপূর্ণ চোখ এবং বন্ধুত্বপূর্ণ, গোলাকার আকৃতির একটি সুন্দর প্রাণী এক অদ্ভুত শীতের জঙ্গলের মধ্যে দিয়ে আনন্দের সাথে নেচে বেড়াচ্ছে। দৃশ্যটিতে গোলাকার, তুষারাবৃত গাছ, আলতোভাবে ঝরে পড়া তুষারকণা এবং ডালপালার ফাঁক দিয়ে আসা উষ্ণ সূর্যালোক থাকবে। প্রাণীটির উচ্ছল নড়াচড়া এবং প্রশস্ত হাসি নির্মল আনন্দ প্রকাশ করবে। উজ্জ্বল, প্রাণবন্ত রঙ এবং খেলাচ্ছল অ্যানিমেশনের মাধ্যমে একটি উৎফুল্ল ও হৃদয়গ্রাহী আবহ ফুটিয়ে তোলার চেষ্টা করুন। | ![]() |
উপাদান লেখার উদাহরণ
এই উদাহরণগুলো আপনাকে দেখাবে কীভাবে প্রতিটি মৌলিক উপাদানের মাধ্যমে আপনার প্রম্পটগুলোকে পরিমার্জন করতে হয়।
বিষয় এবং প্রেক্ষাপট
মূল বিষয়বস্তু এবং প্রেক্ষাপট বা পরিবেশ নির্দিষ্ট করুন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| প্রবাহিত জৈব আকৃতিবিশিষ্ট একটি সাদা কংক্রিটের অ্যাপার্টমেন্ট ভবনের স্থাপত্য নকশা, যা সবুজ প্রকৃতি ও ভবিষ্যৎমুখী উপাদানের সাথে অনবদ্যভাবে মিশে গেছে। | ![]() |
| মহাকাশে ভাসমান একটি উপগ্রহ, যার পটভূমিতে চাঁদ ও কিছু তারা রয়েছে। | ![]() |
পদক্ষেপ
বিষয়বস্তুটি কী করছে তা নির্দিষ্ট করুন (যেমন, হাঁটছে, দৌড়াচ্ছে, বা মাথা ঘোরাচ্ছে)।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| সূর্যাস্তের সময় সৈকত ধরে দিগন্তের দিকে তাকিয়ে সন্তুষ্ট ও নিশ্চিন্ত মুখে হেঁটে যাওয়া এক নারীর ওয়াইড শট। | ![]() |
শৈলী
প্রজন্মকে একটি নির্দিষ্ট নান্দনিকতার দিকে পরিচালিত করতে কীওয়ার্ড যোগ করুন (যেমন, পরাবাস্তব, ভিন্টেজ, ভবিষ্যৎধর্মী, ফিল্ম নোয়ার)।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| ফিল্ম নোয়ার শৈলী, রাস্তায় হেঁটে যাচ্ছে এক পুরুষ ও নারী, রহস্য, সিনেমাটিক, সাদাকালো। | ![]() |
ক্যামেরার গতি এবং কম্পোজিশন
ক্যামেরাটি কীভাবে নড়াচড়া করবে (পিওভি শট, এরিয়াল ভিউ, ট্র্যাকিং ড্রোন ভিউ) এবং শটটি কীভাবে ফ্রেম করা হবে (ওয়াইড শট, ক্লোজ-আপ, লো অ্যাঙ্গেল) তা নির্দিষ্ট করুন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| রাতের কানাডা, বৃষ্টিতে ভেজা একটি পুরনো মডেলের গাড়ি থেকে নেওয়া দৃশ্য, সিনেমাটিক। | ![]() |
| একটি চোখের অতি কাছ থেকে তোলা ছবি, যাতে শহরের প্রতিবিম্ব দেখা যাচ্ছে। | ![]() |
পরিবেশ
রঙের বিন্যাস এবং আলো মেজাজকে প্রভাবিত করে। ‘মৃদু কমলা উষ্ণ আভা,’ ‘প্রাকৃতিক আলো,’ ‘সূর্যোদয়,’ বা ‘শীতল নীল আভা’-র মতো শব্দ ব্যবহার করে দেখতে পারেন।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| পার্কে সূর্যের আলোয় একটি মেয়েকে একটি আদুরে গোল্ডেন রিট্রিভার কুকুরছানা ধরে থাকতে দেখা যাচ্ছে। | ![]() |
| বৃষ্টিতে বাসে চড়ে থাকা এক বিষণ্ণ মহিলার সিনেম্যাটিক ক্লোজ-আপ শট, স্নিগ্ধ নীল আভা, বিষাদময় আবহ। | ![]() |
নেতিবাচক প্রম্পট
নেতিবাচক প্রম্পটগুলো ভিডিওতে আপনি যে উপাদানগুলো চান না, তা নির্দিষ্ট করে দেয়।
- ❌ ‘না’ বা ‘করো না’- এর মতো নির্দেশমূলক ভাষা ব্যবহার করবেন না। (যেমন, “কোনো দেয়াল নয়”)।
- ✅ আপনি যা দেখতে চান না, তা বর্ণনা করুন। (যেমন, "দেয়াল, ফ্রেম")।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| নেতিবাচক ইঙ্গিত ছাড়া: একটি বিশাল, একাকী ওক গাছের একটি সংক্ষিপ্ত, শৈল্পিক অ্যানিমেশন তৈরি করুন, যার পাতাগুলো প্রবল বাতাসে সজোরে উড়ছে... [অসম্পূর্ণ] | ![]() |
| নেতিবাচক প্রম্পট সহ: [একই প্রম্পট] নেতিবাচক ইঙ্গিত: শহুরে পটভূমি, মানবসৃষ্ট স্থাপনা, অন্ধকার, ঝড়ো বা ভীতিপ্রদ পরিবেশ। | ![]() |
আকৃতির অনুপাত
Veo আপনাকে আপনার ভিডিওর জন্য অ্যাস্পেক্ট রেশিও নির্দিষ্ট করার সুযোগ দেয়।
| প্রম্পট | উৎপন্ন আউটপুট |
|---|---|
| ওয়াইডস্ক্রিন (১৬:৯) ১৯৭০-এর দশকে পাম স্প্রিংসে উষ্ণ সূর্যালোক ও দীর্ঘ ছায়ার মধ্যে একজন ব্যক্তিকে একটি লাল কনভার্টিবল গাড়ি চালাতে দেখানোর জন্য একটি ট্র্যাকিং ড্রোন ভিউ সহ ভিডিও তৈরি করুন। | ![]() |
| প্রতিকৃতি (৯:১৬) ঘন সবুজ অরণ্যের মধ্যে অবস্থিত এক মহিমান্বিত হাওয়াইয়ান জলপ্রপাতের সাবলীল গতিকে তুলে ধরে একটি ভিডিও তৈরি করুন। প্রশান্তি ফুটিয়ে তুলতে বাস্তবসম্মত জলপ্রবাহ, বিশদ পত্রপল্লব এবং প্রাকৃতিক আলোর উপর মনোযোগ দিন। খরস্রোতা জল, কুয়াশাচ্ছন্ন পরিবেশ এবং ঘন পাতার ফাঁক দিয়ে আসা ছায়া-আলোর খেলা ক্যামেরাবন্দী করুন। জলপ্রপাত এবং তার চারপাশ তুলে ধরতে সাবলীল ও সিনেম্যাটিক ক্যামেরা মুভমেন্ট ব্যবহার করুন। একটি শান্তিপূর্ণ ও বাস্তবসম্মত আবহ তৈরির লক্ষ্য রাখুন, যা দর্শককে হাওয়াইয়ান অরণ্যের নির্মল সৌন্দর্যে নিয়ে যাবে। | ![]() |
সীমাবদ্ধতা
- অনুরোধের বিলম্ব: সর্বনিম্ন: ১১ সেকেন্ড; সর্বোচ্চ: ৬ মিনিট (ব্যস্ততম সময়ে)।
- আঞ্চলিক সীমাবদ্ধতা: EU, UK, CH, MENA অঞ্চলগুলিতে
personGenerationএর জন্য নিম্নলিখিত মানগুলি অনুমোদিত:- Veo 3:
allow_adultonly. - Veo 2:
dont_allowএবংallow_adult। ডিফল্ট হলোdont_allow।
- Veo 3:
- ভিডিও সংরক্ষণ: তৈরি করা ভিডিওগুলো সার্ভারে ২ দিনের জন্য সংরক্ষিত থাকে, এরপর সেগুলো মুছে ফেলা হয়। স্থানীয়ভাবে একটি কপি সংরক্ষণ করতে হলে, ভিডিওটি তৈরি করার ২ দিনের মধ্যে আপনাকে অবশ্যই ডাউনলোড করতে হবে। বর্ধিত ভিডিওগুলোকে নতুন তৈরি করা ভিডিও হিসেবে গণ্য করা হয়।
- ওয়াটারমার্কিং: Veo দ্বারা নির্মিত ভিডিওগুলিতে SynthID ব্যবহার করে ওয়াটারমার্ক দেওয়া হয়, যা এআই-নির্মিত কন্টেন্ট ওয়াটারমার্কিং ও শনাক্ত করার জন্য আমাদের একটি টুল। SynthID ভেরিফিকেশন প্ল্যাটফর্ম ব্যবহার করে ভিডিওগুলি যাচাই করা যায়।
- নিরাপত্তা: তৈরি করা ভিডিওগুলো নিরাপত্তা ফিল্টার এবং নির্ভুলতা যাচাই প্রক্রিয়ার মধ্য দিয়ে যায়, যা গোপনীয়তা, কপিরাইট এবং পক্ষপাতের ঝুঁকি কমাতে সাহায্য করে।
- অডিও ত্রুটি: সুরক্ষা ফিল্টার বা অডিও সংক্রান্ত অন্যান্য প্রক্রিয়াকরণ সমস্যার কারণে Veo 3.1 মাঝে মাঝে ভিডিও তৈরি হতে বাধা দেয়। আপনার ভিডিও তৈরি হতে বাধা পেলে আপনাকে কোনো চার্জ করা হবে না।
মডেলের বৈশিষ্ট্য
| বৈশিষ্ট্য | বর্ণনা | Veo 3.1 এবং Veo 3.1 ফাস্ট | Veo 3 এবং Veo 3 ফাস্ট | Veo 2 |
|---|---|---|---|---|
| অডিও | ভিডিওর সাথে স্বয়ংক্রিয়ভাবে অডিও তৈরি করে। | ভিডিওর সাথে স্বয়ংক্রিয়ভাবে অডিও তৈরি করে। | ✔️ সর্বদা চালু | ❌ শুধুমাত্র নীরব |
| ইনপুট পদ্ধতি | উৎপাদনের জন্য ব্যবহৃত ইনপুটের ধরণ। | টেক্সট-টু-ভিডিও, ইমেজ-টু-ভিডিও, ভিডিও-টু-ভিডিও | টেক্সট-টু-ভিডিও, ইমেজ-টু-ভিডিও | টেক্সট-টু-ভিডিও, ইমেজ-টু-ভিডিও |
| সমাধান | ভিডিওটির আউটপুট রেজোলিউশন। | ৭২০পি, ১০৮০পি (শুধুমাত্র ৮ সেকেন্ড দৈর্ঘ্যের), ৪কে (শুধুমাত্র ৮ সেকেন্ড দৈর্ঘ্যের) ভিডিও এক্সটেনশন ব্যবহার করলেই কেবল ৭২০পি পাওয়া যাবে। | ৭২০পি এবং ১০৮০পি (শুধুমাত্র ১৬:৯ অনুপাতে) | ৭২০পি |
| ফ্রেম রেট | ভিডিওটির আউটপুট ফ্রেম রেট। | ২৪ এফপিএস | ২৪ এফপিএস | ২৪ এফপিএস |
| ভিডিওর সময়কাল | তৈরি হওয়া ভিডিওটির দৈর্ঘ্য। | ৮ সেকেন্ড, ৬ সেকেন্ড, ৪ সেকেন্ড শুধুমাত্র 1080p বা 4k হলে অথবা রেফারেন্স ইমেজ ব্যবহার করলে ৮ সেকেন্ড। | ৮ সেকেন্ড | ৫-৮ সেকেন্ড |
| অনুরোধ অনুযায়ী ভিডিও | প্রতি অনুরোধে তৈরি হওয়া ভিডিওর সংখ্যা। | ১ | ১ | ১ অথবা ২ |
| অবস্থা ও বিবরণ | মডেলের প্রাপ্যতা এবং আরও বিস্তারিত তথ্য। | প্রিভিউ | স্থিতিশীল | স্থিতিশীল |
মডেল সংস্করণ
Veo মডেল-ভিত্তিক ব্যবহারের আরও বিস্তারিত তথ্যের জন্য মূল্য নির্ধারণ এবং রেট সীমা পৃষ্ঠাগুলি দেখুন।
Veo Fast ভার্সনগুলো ডেভেলপারদের উচ্চ গুণমান বজায় রেখে এবং গতি ও ব্যবসায়িক ব্যবহারের জন্য অপ্টিমাইজ করে শব্দসহ ভিডিও তৈরি করার সুযোগ দেয়। এগুলো এমন ব্যাকএন্ড পরিষেবাগুলোর জন্য আদর্শ যা প্রোগ্রাম্যাটিকভাবে বিজ্ঞাপন তৈরি করে, সৃজনশীল ধারণার দ্রুত A/B পরীক্ষার জন্য ব্যবহৃত টুল, অথবা এমন অ্যাপের জন্য যা দ্রুত সোশ্যাল মিডিয়া কন্টেন্ট তৈরি করতে চায়।
Veo 3.1 প্রিভিউ
| সম্পত্তি | বর্ণনা |
|---|---|
| মডেল কোড | জেমিনি এপিআই |
| সমর্থিত ডেটা প্রকারগুলি | ইনপুট লেখা, ছবি আউটপুট অডিও সহ ভিডিও |
| সীমা | টেক্সট ইনপুট ১,০২৪টি টোকেন আউটপুট ভিডিও ১ |
| সর্বশেষ আপডেট | জানুয়ারি ২০২৬ |
Veo 3.1 ফাস্ট প্রিভিউ
| সম্পত্তি | বর্ণনা |
|---|---|
| মডেল কোড | জেমিনি এপিআই |
| সমর্থিত ডেটা প্রকারগুলি | ইনপুট লেখা, ছবি আউটপুট অডিও সহ ভিডিও |
| সীমা | টেক্সট ইনপুট ১,০২৪টি টোকেন আউটপুট ভিডিও ১ |
| সর্বশেষ আপডেট | জানুয়ারি ২০২৬ |
Veo 2
| সম্পত্তি | বর্ণনা |
|---|---|
| মডেল কোড | জেমিনি এপিআই |
| সমর্থিত ডেটা প্রকারগুলি | ইনপুট লেখা, ছবি আউটপুট ভিডিও |
| সীমা | টেক্সট ইনপুট প্রযোজ্য নয় ইমেজ ইনপুট ২০ মেগাবাইট ফাইল সাইজ পর্যন্ত যেকোনো ইমেজ রেজোলিউশন এবং অ্যাসপেক্ট রেশিও। আউটপুট ভিডিও ২ পর্যন্ত |
| সর্বশেষ আপডেট | এপ্রিল ২০২৫ |
এরপর কী?
- Veo কুইকস্টার্ট কোলাব এবং Veo 3.1 অ্যাপলেট ব্যবহার করে পরীক্ষা-নিরীক্ষার মাধ্যমে Veo 3.1 API দিয়ে কাজ শুরু করুন।
- আমাদের 'প্রম্পট ডিজাইন পরিচিতি' থেকে শিখুন কীভাবে আরও ভালো প্রম্পট লিখতে হয়।



































