Overview
This node, named "jimeng Node," provides functionality to generate videos from text prompts ("文生视频" operation under the "视频生成" resource). It allows users to input a descriptive prompt and receive a generated video based on that description. This is useful for creative content generation, marketing materials, or rapid prototyping of video concepts without manual filming or animation.
Typical use cases include:
- Creating short promotional videos from textual descriptions.
- Generating visual content for social media posts.
- Rapidly visualizing ideas or storyboards described in text form.
For example, a user can input a prompt like "一个3D形象的小男孩,在公园滑滑板。" (A 3D character boy skateboarding in the park), select a model and video aspect ratio, and get a generated video matching that description.
Properties
| Name | Meaning |
|---|---|
| 提示词 (prompt) | The text prompt describing the video content to generate. Example: "一个3D形象的小男孩,在公园滑滑板。" |
| 模型 (modal) | The video generation model to use. Options: video-S2.0, video-S2.0-Pro, video-S3.0, video-S3.0-pro |
| 视频比例 (video_aspect_ratio) | The aspect ratio of the generated video. Options: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 |
| 视频时长 (duration_ms) | Duration of the video in milliseconds. Only 5 seconds (5000 ms) or 10 seconds (10000 ms) allowed. Note: Models video-S2.0 and video-S2.0-Pro only support 5 seconds. |
| 是否等待视频返回 (isImgReturn) | Boolean flag indicating whether to wait for the video generation to complete and return the video data before continuing. |
Output
The node outputs JSON data representing the generated video information. The exact structure depends on the underlying API response but typically includes metadata about the generated video and possibly URLs or references to the video file.
If the node supports returning binary data (not explicitly shown in the code snippet), it would represent the actual video file content or a downloadable link.
Dependencies
- Requires an API key credential for authentication with the external video generation service.
- Depends on the external "jimeng" API or service that performs the text-to-video generation.
- The node uses a resource-operation factory pattern to call the appropriate method for the selected resource and operation.
- No additional environment variables are explicitly required beyond the API credentials.
Troubleshooting
Common issues:
- Using unsupported video duration with certain models (e.g., requesting 10 seconds with
video-S2.0which only supports 5 seconds). - Invalid or empty prompt leading to errors or no meaningful video output.
- Network or authentication failures when calling the external API.
- Using unsupported video duration with certain models (e.g., requesting 10 seconds with
Error messages:
"未实现方法: 视频生成.文生视频"indicates the requested resource-operation combination is not implemented; ensure correct resource and operation names.- API errors returned from the external service will be caught and either cause the node to fail or continue depending on the "Continue On Fail" setting.
Resolutions:
- Verify prompt text is valid and descriptive.
- Select compatible model and duration combinations.
- Ensure API credentials are correctly configured and have sufficient permissions.
- Check network connectivity and API endpoint availability.
Links and References
- No direct links provided in the source code.
- For more details, consult the documentation of the external video generation API/service used by this node.
- n8n documentation on creating custom nodes and handling credentials may be helpful.