FFmpeg.wasm icon

FFmpeg.wasm

Process audio and video files using FFmpeg.wasm

Video Overlay

AI-generated

Summary

Overlays an image or video onto a source video as a watermark or picture-in-picture element.

Inputs

  • binaryPropertyName — Name of the binary property containing the input file
  • outputBinaryPropertyName — Name of the binary property to store the output file
  • overlayBinaryProperty (required) — Name of binary property containing overlay image/video
  • overlayType (required) — Type of overlay to apply: watermark (image) or pip (video)
  • overlayX — X position (pixels or expressions like W-w-10)
  • overlayY — Y position (pixels or expressions like H-h-10)
  • overlayWidth — Overlay width (-1 for original size)
  • overlayHeight — Overlay height (-1 for original size)
  • overlayOpacity — Overlay opacity (0.0 to 1.0)
  • overlayOutputFormat — Output file format
  • additionalOptions — Additional execution options (timeout, enableLogging, encodingPreset)

Output shape

A single output item with the processed video stored in the binary property specified by outputBinaryPropertyName.

The output binary property contains base64-encoded video data, the generated filename, and MIME type. The JSON output includes FFmpeg metadata (operation, input/output filenames, size).

Examples

Example 1: Add a logo as a watermark at position (20,20) with 70% opacity.

Set overlayType to 'watermark', overlayBinaryProperty to the logo binary property, overlayX to '20', overlayY to '20', overlayOpacity to '0.7'.

Example 2: Place a clip as picture-in-picture in the bottom-right corner.

Set overlayType to 'pip', overlayX and overlayY to expressions positioning the overlay (e.g., 'W-w-10' and 'H-h-10'), and optionally set overlayWidth/overlayHeight to constrain size.

Links

Discussion