Overview
This node extends existing videos by generating additional video content based on a descriptive prompt using the PiAPI Dream Machine service. It supports input videos either via a URL or as binary data, and allows customization of the video extension through model selection and aspect ratio settings.
Common scenarios where this node is beneficial include:
- Creators wanting to automatically extend short video clips with AI-generated content.
- Marketing teams enhancing promotional videos by adding more footage seamlessly.
- Developers building automated video editing pipelines that require AI-driven video extension.
Practical example: Given a short video clip of a landscape and a prompt describing a sunset scene, the node can generate an extended video that continues the original clip with a sunset ambiance, matching the specified aspect ratio and style.
Properties
| Name | Meaning |
|---|---|
| Prompt | Descriptive text guiding how the video should be extended. |
| Video Source | The source type of the input video; options are: - URL - Binary Data |
| Video URL | URL of the video to extend (required if Video Source is URL). |
| Binary Property | Name of the binary property containing the video data (required if Video Source is Binary Data). |
| Model Name | The AI model used for video extension; options: - Ray v1 - Ray v2 |
| Aspect Ratio | Aspect ratio of the generated video; options: - Portrait (9:16) - Portrait (3:4) - Square (1:1) - Landscape (4:3) - Landscape (16:9) - Cinematic (21:9) |
| Service Mode | Processing mode for the task; options: - Default (User Workspace Setting) - Pay-as-you-go (PAYG) - Host-your-account (HYA) |
| Wait for Completion | Whether to wait for the video extension task to complete before returning results (boolean). |
Output
The node outputs JSON data representing the response from the PiAPI Dream Machine service. This includes details about the created task and, if waiting for completion is enabled, the final results of the video extension process.
If the input was binary video data, the node converts it into a base64-encoded data URI format before sending it to the API.
No direct binary output is produced by the node; all results are returned as JSON metadata referencing the processed video.
Dependencies
- Requires an API key credential for authenticating with the PiAPI Dream Machine service.
- Uses the PiAPI endpoint
/api/v1/taskto submit video extension tasks. - Supports two service modes which may correspond to different billing or hosting setups.
- The node relies on helper functions for making authenticated API requests and optionally waiting for task completion.
Troubleshooting
Error: "The provided binary data is not a video"
Occurs if the binary input's MIME type does not indicate a video format. Ensure the binary property contains valid video data.Error: "No usable video data found in the provided binary property"
Happens when the binary property lacks both raw data and a URL. Verify that the binary property is correctly set and contains video content.Task submission failures or timeouts
Could be due to invalid API credentials, network issues, or service mode misconfiguration. Check API key validity and service mode settings.Waiting for completion hangs or delays
IfWait for Completionis enabled, long processing times may cause delays. Consider disabling this option for asynchronous workflows.
Links and References
- PiAPI Dream Machine Documentation (hypothetical link for reference)
- n8n Documentation on Creating Custom Nodes
- Video MIME Types Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types