Actions11
- Filters and Effect Actions
- Metadata Actions
- RTMP Restreaming Actions
- Transcoding Actions
- Video Processing Actions
Overview
This node provides video processing capabilities focused on trimming and merging video segments based on user-defined highlights. It allows users to input a video URL and specify multiple highlight segments with start and end times, which the node then extracts and merges into a single output video. Optionally, transitions can be added between these trimmed segments to create smooth visual effects.
Common scenarios where this node is beneficial include:
- Creating highlight reels from longer videos by extracting key moments.
- Editing event footage to focus on important parts without manual video editing software.
- Automatically generating summarized videos for presentations or social media sharing.
For example, a user could input a full-length lecture video URL and specify highlights such as the introduction, main topics, and conclusion. The node would then produce a shorter video containing only those segments, optionally adding fade transitions between them.
Properties
| Name | Meaning |
|---|---|
| Video Url | A valid URL pointing to the source video to be processed. |
| Video Highlights | JSON-formatted array of objects specifying highlight segments. Each object contains highlight_reason (description) and highlight_time (time range in "HH:MM - HH:MM" format). Example: [{"highlight_reason": "Introduction", "highlight_time": "00:00 - 00:10"}, {"highlight_reason": "Main event", "highlight_time": "01:00 - 01:30"}]. |
| Add Transitions | Boolean flag indicating whether to add transitions between the trimmed video segments. |
| Transition Type | Type of transition effect to apply between segments if transitions are enabled. Options include: Cross Zoom, Dissolve, Fade, Wipe Left, Wipe Right. Default is Fade. |
| Transition Duration | Duration in seconds for each transition effect applied between video segments. Default is 1 second. |
Output
The node outputs a merged video composed of the specified highlight segments extracted from the original video. The output is provided in the json field of the node's output data, typically containing metadata about the processed video or a reference to the resulting video file.
If binary data output is supported (not explicitly shown in the code snippet), it would represent the actual video file content after trimming and merging, including any applied transitions.
Dependencies
- Requires access to an external video processing service or API that supports trimming, merging, and applying transitions to videos. This is implied by the need for an API key credential configured in n8n.
- The node depends on a bundled routing mechanism (
router.call(this)) that delegates execution to appropriate handlers, likely including video processing logic imported from internal modules. - Proper configuration of an API authentication token or key is necessary to authorize requests to the video processing backend.
Troubleshooting
- Invalid Video URL: If the provided video URL is invalid or inaccessible, the node will fail to retrieve the video. Ensure the URL is correct and publicly accessible or properly authenticated.
- Malformed Highlights JSON: The
Video Highlightsproperty must be a valid JSON string representing an array of objects with correct keys and time formats. Invalid JSON or incorrect formatting will cause parsing errors. - Transition Errors: If transitions are enabled but an unsupported transition type or invalid duration is set, the node may throw errors related to video processing. Use only the listed transition types and positive numeric durations.
- API Authentication Failures: Missing or incorrect API credentials will prevent the node from communicating with the video processing service. Verify that the required API key or token is correctly configured in n8n.
- Timeouts or Large Videos: Processing very large videos or many highlight segments might lead to timeouts or performance issues depending on the backend service limits.
Links and References
- FFmpeg Documentation – For understanding underlying video processing concepts like trimming and transitions.
- JSON Format Guide – To ensure proper formatting of the
Video Highlightsinput. - n8n Documentation on Creating Custom Nodes – For general guidance on node development and configuration.