ClipMagic icon

ClipMagic

Interact with ClipMagic API for video and audio processing

Overview

The node interacts with the ClipMagic API to perform video and audio processing tasks. Specifically, the "Trim Media" operation allows users to trim segments from a given media file (video or audio) by specifying start and end times or durations. This is useful for extracting highlights, removing unwanted sections, or creating clips from longer media files.

Common scenarios include:

  • Creating short clips from long videos for social media sharing.
  • Extracting specific audio segments from podcasts or interviews.
  • Preparing video highlights for presentations or marketing.

For example, you can input a URL of a webinar recording and trim out multiple segments corresponding to key topics discussed, outputting them as separate MP4 clips.

Properties

Name Meaning
Media URL Input media URL to trim (direct file URL or share link).
Trim Mode Choose between trimming a single segment or multiple segments. Options: Single Segment, Multiple Segments.
Start Time Start time of the segment in HH:MM:SS format or seconds (used when Trim Mode is Single Segment).
End Mode Defines how the end of the segment is specified: by End Time or Duration (used when Trim Mode is Single Segment).
End Time End time of the segment in HH:MM:SS format (used if End Mode is End Time).
Duration Duration of the segment in seconds or HH:MM:SS format (used if End Mode is Duration).
Segments Collection of multiple segments to trim, each with its own Start, End Mode, End Time or Duration (used when Trim Mode is Multiple Segments).
Output Format Target format for the trimmed clips. Options: MP4, GIF, MOV, MP3, WAV.
Output Filename Optional custom filename for the output file.

Output

The node outputs JSON data indicating success and details about the operation performed. When the API returns media content (video/audio), the node outputs binary data representing the trimmed media clip(s).

Output structure includes:

  • success: Boolean indicating if the operation succeeded.
  • operation: The operation performed ("trim").
  • filename: The name of the output file.
  • contentType: MIME type of the returned media.
  • Binary data under the binary.data field containing the actual trimmed media file.

If the response is not media content but JSON, it outputs the parsed JSON data directly.

Dependencies

  • Requires an API key credential for authenticating with the ClipMagic API.
  • The node makes HTTP requests to the ClipMagic service endpoint.
  • No additional environment variables are required beyond the API credential.

Troubleshooting

  • Invalid URL or inaccessible media: Ensure the provided media URL is publicly accessible or properly shared.
  • Incorrect time format: Start, end, and duration fields must be in valid HH:MM:SS format or seconds; invalid formats may cause errors.
  • Unsupported output format: Use one of the supported formats listed in the properties.
  • API authentication errors: Verify that the API key credential is correctly configured and has necessary permissions.
  • Multiple segments misconfiguration: When using multiple segments, ensure each segment has valid start and end/duration values.

Common error messages come from failed HTTP requests or invalid parameters and will be surfaced in the node's output JSON under an error field if continue on fail is enabled.

Links and References

Discussion