ClipMagic icon

ClipMagic

Interact with ClipMagic API for video and audio processing

Overview

The ClipMagic node integrates with the ClipMagic API to perform various video and audio processing tasks. Specifically, the "Trim Media" operation allows users to trim segments from a 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 a longer video for social media sharing.
  • Extracting specific audio segments from podcasts or interviews.
  • Preparing multiple trimmed segments from a single source media in one operation.

For example, a user can input a URL of a video and specify a single segment starting at 00:01:00 and lasting 30 seconds, outputting the result as an MP4 clip.

Properties

Name Meaning
Media URL Input media URL to trim (required). Can be a direct file URL or a share link.
Trim Mode Choose between trimming a Single Segment or Multiple Segments from the media.
Start Time For Single Segment mode: the start time of the trim in HH:MM:SS format or seconds.
End Mode For Single Segment mode: whether to specify the end by End Time or Duration.
End Time For Single Segment mode with End Mode "End Time": the end time in HH:MM:SS format.
Duration For Single Segment mode with End Mode "Duration": length of the clip in seconds or HH:MM:SS format.
Segments For Multiple Segments mode: list of segments each with Start, End Mode, End Time or Duration.
Output Format Target format for the trimmed clips. Options: MP4, GIF, MOV, MP3, WAV.
Output Filename Optional custom filename for the output clip.
Options Extra settings such as Timeout (ms) for the HTTP request.

Output

The node outputs JSON data indicating success and details about the operation. If the response contains media data (video/audio), it outputs binary data under the binary.data field, which contains the trimmed media file content.

Output JSON fields include:

  • success: boolean indicating if the operation succeeded.
  • operation: the operation performed ("trim").
  • filename: the name of the output file.
  • contentType: MIME type of the output media.
  • Additional metadata returned by the API if the response is JSON.

Binary output (binary.data) holds the actual trimmed media file, ready for further use or saving.

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

  • Timeouts: If trimming large files or slow network, increase the "Timeout (ms)" option to avoid premature aborts.
  • Invalid time formats: Ensure start, end, and duration times are correctly formatted as HH:MM:SS or seconds.
  • Unsupported media URLs: The input URL must be accessible and supported by the ClipMagic API.
  • API errors: Errors from the API will be returned in the JSON output; check error messages for details.
  • Filename issues: If no output filename is specified, the node attempts to infer it from the response headers.

Links and References

Discussion