> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/workflow-builder/nodes/built-in-tools/video-generation.md).

# Video Generation

## Video Generation

### What does it do?

The **Video Generation** node turns a written idea, or a starting image, into a generated video. Think of it like a video production assistant that takes your brief and returns a ready-to-use clip for campaigns, demos, or social content.

It works for both text-to-video and image-to-video workflows.

#### Smart features

* **One node for two creation styles**: start from a prompt alone, or use one or two images to guide the result.
* **Automatic image role handling**: if you add two images, Diaflow treats them as the start frame and end frame for a smoother transition.
* **Built-in video finishing options**: you can turn on **Enhancement** and **Compression** to improve quality and reduce file size.
* **Optional last-frame output**: you can return the final frame as an image and use it to continue the next video segment.
* **Flexible input mapping**: pull prompts and images from earlier nodes without manual re-uploading.
* **Automatic cleanup of unsupported values**: if frame rate or duration settings are outside the supported range, Diaflow adjusts them to a valid value.

<figure><img src="/files/klH9GYKcdDPOQ23E93FR" alt=""><figcaption></figcaption></figure>

### Real-World Business Value

* Turn a campaign brief into a short promo video for ads, landing pages, or social posts.
* Animate a product image into a motion teaser without sending work out to a video team.
* Create connected video scenes by using the last frame from one clip as the starting point for the next clip.

### Step-by-Step Setup

* In **Model**, choose the video model you want to use.
* In **Prompt**, describe the scene, motion, style, lighting, and camera feel you want.
* In **Image source**, add one image if you want the video to begin from a specific visual, or add two images if you want Diaflow to guide both the first and last frame.
* In **Resolution**, select the output quality that matches your chosen model.
* In **Aspect ratio**, choose the shape that fits your channel, such as **16:9** for landscape or **9:16** for vertical.
* In **Duration**, enter the clip length in seconds.
* In **FPS**, choose **24**, **30**, or **60** depending on how smooth you want the motion to feel.
* Turn on **Camera Fixed** if you want the camera position to stay locked.
* If your selected model supports it, turn on **Audio** to generate sound with the video.
* Turn **Enhancement** on if you want Diaflow to improve video quality after generation.
* Turn **Compression** on if you want a smaller final file size.
* Turn on **Return Last Frame** if you want to reuse the ending image in a later video step.
* Run the workflow and review the result in the **Output** tab.

### The Transformation: Before & After

**Before basic campaign request**

<figure><img src="/files/Ir2sjjXJYebNxX0JW4Id" alt=""><figcaption></figcaption></figure>

**After generated video result**

<figure><img src="/files/RmWLPtAOgOFECLZPEim1" alt=""><figcaption></figcaption></figure>

If **Return Last Frame** is on, the result can include both the video and the final frame image.

### Tips & Warnings for First-Timers

#### Best practices

* Write prompts that describe both the scene and the motion.
* Match **Aspect ratio** to the final channel before you generate.
* Use one image for a guided starting frame.
* Use two images only when you want Diaflow to connect a beginning and an ending scene.
* Turn on **Return Last Frame** when building multi-part video sequences.

#### Warnings

* Do not add more than two images in **Image source**. Extra images are ignored.
* Do not choose **1080p** with models that only support lower resolutions.
* Do not expect very short durations to stay unchanged on every model. Some models raise short values to their minimum supported length.
* Do not assume video generation is fast. Longer clips, finishing options, and uploads can take several minutes.
* Do not assume **Enhancement** and **Compression** always run. If that finishing service is unavailable, Diaflow may return the original video instead.
* Do not assume every public workflow output stays available forever. Some public video links may expire.
* Do not hide image links inside the **Prompt** unless you want them treated as image input.
* Do not use unsupported image files as video input. Convert files like PDFs into images first.
* Do not expect the output to be a permanent public video link. The result is typically a stored workflow file reference.

### Need help?

* Learn the basics in [How a node works](/getting-started/lets-start-with-the-basics/how-a-node-works.md)
* Build the full flow in [Create a workflow](/workflow-builder/create-a-workflow.md)
* Browse related nodes in [Component List](/workflow-builder/component-list.md)
