Actions11
- Filters and Effect Actions
- Metadata Actions
- RTMP Restreaming Actions
- Transcoding Actions
- Video Processing Actions
Overview
This node provides video processing capabilities using ffmpeg, specifically supporting a "Trim Video" operation under the "Video Processing" resource. The "Trim Video" operation allows users to specify segments of a video to extract based on highlight times and reasons. This is useful for creating clips from longer videos, such as extracting key moments from an event recording or summarizing content by trimming out irrelevant parts.
Practical examples:
- Extracting introduction and main event highlights from a recorded webinar.
- Creating short clips from a long sports match based on important plays.
- Generating preview snippets from full-length videos for social media sharing.
Properties
| Name | Meaning |
|---|---|
| Video Url | A valid URL pointing to the source video file to be trimmed. |
| Video Highlights | JSON-formatted string representing an array of objects, each containing highlight_reason (description of the segment) and highlight_time (time range in format "HH:MM - HH:MM") specifying which parts of the video to trim out. Example: [{"highlight_reason": "Introduction", "highlight_time": "00:00 - 00:10"}, {"highlight_reason": "Main event", "highlight_time": "01:00 - 01:30"}] |
Output
The node outputs JSON data representing the result of the trimming operation. Typically, this would include metadata about the trimmed video segments or URLs/paths to the newly created video clips corresponding to the specified highlights.
If binary data output is supported (not explicitly shown in the provided code), it would represent the actual trimmed video files ready for further use or download.
Dependencies
- Requires an API key credential for accessing the underlying ffmpeg service.
- Depends on an external ffmpeg-based backend service that performs the actual video trimming.
- The node expects the input video to be accessible via the provided URL.
Troubleshooting
- Invalid Video URL: If the video URL is incorrect or inaccessible, the node will fail to fetch the video. Ensure the URL is publicly accessible or properly authenticated.
- Malformed Video Highlights JSON: The highlights property must be a valid JSON string representing an array of objects with correct keys (
highlight_reasonandhighlight_time). Invalid JSON or missing fields will cause errors. - Unsupported Time Format: Highlight times should follow the "HH:MM - HH:MM" format. Incorrect formats may lead to trimming failures.
- API Authentication Errors: Missing or invalid API credentials will prevent the node from communicating with the ffmpeg service.
- Large Video Files: Trimming very large videos might cause timeouts or performance issues depending on the backend service limits.
Links and References
- FFmpeg Official Documentation
- n8n Documentation on Creating Custom Nodes
- General JSON formatting guide: https://www.json.org/json-en.html