AIMC Media icon

AIMC Media

Media operations using FFmpeg.

Convert / Transcode

AI-generated

Summary

Convert or transcode media files using FFmpeg, supporting binary, file path, or URL input and outputting to a chosen format optionally as binary.

Inputs

  • inputMode — How the input media is provided: Binary (from previous node), File Path, or URL.
  • binaryProperty — Binary property name for input data when inputMode is Binary.
  • inputFilePath — Local file path to the input media when inputMode is File Path.
  • inputUrl — URL to download the input media from when inputMode is URL.
  • outputMode — How the result should be delivered: Binary or File Path.
  • outputBinaryProperty — Binary property name for the output when outputMode is Binary.
  • outputFilePath — Local file path for the output media when outputMode is File Path.
  • outputFormat — Target container or codec format for conversion (e.g., MP4, MOV, WebM, MP3). Use 'Custom' to specify a custom format.
  • customOutputFormat — Custom file extension for output when outputFormat is set to Custom.
  • videoCodec — Video codec to use (e.g., libx264) for conversion operations.
  • audioCodec — Audio codec to use (e.g., aac) for conversion operations.
  • additionalOutputOptions — Additional ffmpeg command-line options, one per line.

Output shape

A list of items, each containing the original workflow item plus either a file path (if outputMode is File Path) or a binary under the specified outputBinaryProperty.

The shape depends on outputMode: binary output returns data in the property defined by outputBinaryProperty; file path output includes outputPath field. For metadata operation, a metadata object is returned.

Examples

Example 1: Convert an MP4 video from a URL to WebM and return binary data.

inputMode=url, inputUrl=https://example.com/video.mp4, outputMode=binary, outputBinaryProperty=data, outputFormat=webm

Example 2: Compress a locally stored video to MP4 using CRF 20 and a custom preset.

inputMode=filePath, inputFilePath=/data/video.mov, outputMode=filePath, outputFilePath=/data/output.mp4, outputFormat=mp4, crf=20, preset=slow, additionalOutputOptions=-vf scale=1280:-2

Example 3: Extract audio from a binary file and output as MP3 binary.

inputMode=binary, binaryProperty=data, operation=extractAudio, outputFormat=mp3, outputMode=binary, outputBinaryProperty=data

Links

Discussion