Overview
This node enhances the resolution of MP4 videos by upscaling them using an external video processing API. It supports inputting the video either via a direct URL or as binary data within the workflow. The service currently doubles both the width and height of the video (2x upscaling), improving visual quality for videos that meet specific size and format requirements.
Common scenarios where this node is beneficial include:
- Improving the quality of user-uploaded videos before publishing.
- Preparing videos for higher-resolution displays.
- Enhancing archival footage or low-resolution content automatically in workflows.
For example, you could use this node to upscale a 720p MP4 video hosted online by providing its URL, or process a video file uploaded earlier in the workflow as binary data.
Properties
| Name | Meaning |
|---|---|
| Video Input Method | Method to input the video data. Options: URL (provide a video URL) or Binary Data (use binary video data from previous nodes). |
| Video Binary Property | Name of the binary property containing the video data. Required if "Binary Data" input method is selected. Default is "data". |
| Video URL | URL of the video to upscale (MP4 format only). Required if "URL" input method is selected. |
| Video Requirements | Notice describing the video constraints: max 720p resolution (1280×720), frame count between 10 and 240, max file size 10MB, MP4 format only, and 2x upscaling only. |
| Pricing Information | Notice about cost: $0.0003 per frame processed. Example given: a 60-frame video costs $0.018. |
| Wait For Completion | Boolean flag indicating whether the node should wait for the upscaling task to complete before continuing. |
| Max Retries | Maximum number of retries to check the task status when waiting for completion. Only shown if "Wait For Completion" is true. Default is 30. |
| Retry Interval | Interval in milliseconds between retries when checking task status. Only shown if "Wait For Completion" is true. Default is 5000 ms (5 seconds). |
Output
The node outputs JSON objects representing the status or result of the upscaling task:
- When not waiting for completion, the output contains the initial task ID and status (usually
"pending"). - When waiting for completion, the output includes the final task status and related details once the upscaling finishes.
- If an error occurs (e.g., invalid video format or API failure), the output contains an error message explaining the issue.
The output JSON structure typically includes fields like:
{
"task_id": "string",
"status": "string",
// additional task-related data depending on completion state
}
No binary data is output directly by this node; it manages video data input and returns metadata about the processing task.
Dependencies
- Requires an API key credential for the external PiAPI video processing service.
- The node calls the PiAPI endpoint
/api/v1/taskto create an upscaling task. - If waiting for completion, it repeatedly polls the task status using helper functions until done or retry limits are reached.
Troubleshooting
Error: "The provided binary data is not an MP4 video"
Occurs if the binary input is not an MP4 video. Ensure the binary data's MIME type includes"video/mp4".Error: "Failed to get a valid task ID from the API"
Indicates the API did not return a proper task identifier. Check API credentials and network connectivity.Error related to video requirements
If the API rejects the video, the node throws an error advising to verify the video meets these conditions: max 720p resolution, 10-240 frames, max 10MB size, MP4 format.Timeouts or long waits when "Wait For Completion" is enabled
Adjust "Max Retries" and "Retry Interval" properties to balance responsiveness and API rate limits.Cost considerations
Since pricing is per frame, large or long videos may incur significant costs. Monitor usage accordingly.
If "Continue On Fail" is enabled, errors will be returned as part of the output JSON instead of stopping execution.
Links and References
- MP4 File Format — General info on MP4 video format.
- Video Upscaling Concepts — Background on video resolution enhancement.
- External API documentation (not included here) would provide detailed info on task creation and status polling endpoints.