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 "Burn Captions" operation allows users to burn subtitles directly into a video file by providing a video URL and a subtitle file URL (.srt or .ass). This is useful for creating videos with hardcoded captions that are always visible, regardless of the playback environment.

Common scenarios include:

  • Adding permanent subtitles to videos for accessibility or localization.
  • Preparing videos for platforms that do not support separate subtitle tracks.
  • Customizing subtitle appearance such as font size, color, outline, and background box.

Example: Burn captions onto a promotional video by supplying the video URL and an SRT subtitle file URL, adjusting font size and color to match branding, and outputting a 1080p landscape video.

Properties

Name Meaning
Video URL URL of the input video file to which captions will be burned.
Subtitle URL URL of the subtitle file (.srt or .ass) containing the captions to burn into the video.
Font Size Font size in pixels for the subtitle text (default 24).
Font Color Primary color of the subtitle text, specified as a hex color code (default white #FFFFFF).
Font Name Font name to use for subtitles; can be a system font or a URL to a font file.
Outline Width Width of the text outline in pixels; set to 0 for no outline (default 0).
Boxed Subtitles Boolean indicating whether subtitles should have a background box behind the text (default false).
Resolution Output video resolution; options include 480p, 720p, 1080p, 1440p, and 4K (default 720p).
Orientation Orientation of the output video; options are Landscape, Portrait, or Square (default Landscape).
Output Filename Desired filename for the output video file without extension (optional).
Options > Timeout (ms) How long to wait before aborting the HTTP request in milliseconds; 0 means no timeout (default 600000 ms).

Output

The node outputs a single item per execution containing:

  • json:

    • success: boolean indicating if the operation succeeded.
    • operation: the string "burnCaptions".
    • filename: the name of the output video file.
    • contentType: MIME type of the returned file (e.g., video/mp4).
    • Additional fields from the API response if the output is JSON.
  • binary.data: The binary data of the processed video file with burned-in captions.

This binary output can be used downstream in n8n workflows for saving to disk, uploading, or further processing.

Dependencies

  • Requires an API key credential for authenticating with the ClipMagic API.
  • The node makes HTTP requests to the ClipMagic service endpoint.
  • No additional local dependencies are required.
  • Network access to the provided video and subtitle URLs must be available.

Troubleshooting

  • Timeouts: If the video processing takes longer than expected, increase the "Timeout (ms)" option or set it to 0 for no limit.
  • Invalid URLs: Ensure the video URL and subtitle URL are accessible and correctly formatted. Private or restricted links may cause failures.
  • Unsupported subtitle formats: Only .srt and .ass subtitle files are supported.
  • Font issues: If specifying a custom font URL, ensure the font file is accessible and compatible.
  • API errors: Errors returned by the ClipMagic API will be surfaced in the node output under error. Check the error message for details.
  • Output filename: Avoid using special characters in the output filename to prevent file handling issues downstream.

Links and References

Discussion