Media (images, audio, video)

Media Utilities

Media info, extract audio or frames, make a thumbnail, trim, convert, compress or burn in subtitles — with FFmpeg on the server, no AI provider.

Media Utilities (media_tools) changes audio and video files with FFmpeg on the server. It needs no AI provider and sends nothing out. It is not available on Vercel (no FFmpeg) — see Where it runs.

Inputs

Audio or video (source): A file object (a form's Attachments field such as {{form.recording}}, or a file from another step), a list of files (the first is used), a storage:// reference, an http(s) URL (fetched through the egress guard) or base64 content. Files are read for the run's workspace only — the same rules as the document actions.

Operations

OperationoperationSettingsOutput
Get media infoinfo—Duration, size, container, bit rate, video codec / size / frame rate / rotation, audio codec / sample rate / channels
Extract audioextract_audioformat: mp3 (default), wav, m4a, ogg, flacAn audio file
Extract framesframesinterval (seconds, default 1), count (default 10, at most 100), format png or jpegA list of images, each with time
Thumbnailthumbnailat (default 1 second, or 10 % into a short clip), formatAn image
Trimtrimstart and / or end: seconds (12.5) or hh:mm:ss[.ms]A shorter file
Convert formatconvertformat: mp4, webm, mov, gif, mp3, wav, m4a, ogg, flac; optional max_width, max_heightA new file
Compresscompressquality: low (smallest), medium, high; optional max_width, max_heightA smaller file
Burn in subtitlesburn_subtitlessubtitles: an SRT or VTT file, SRT text, or a transcript from TranscribeA video with the subtitles drawn in

Also: Run (run_mode, auto / inline / background), Output file name (output_name) and Output variable (output_var).

Outputs

OperationVariableContents
info{{media_info}}duration, size, format, bit_rate, has_video, has_audio, video (codec, width, height, fps, rotation), audio (codec, sample_rate, channels)
frames{{frames}}, {{frames_count}}The frame images (each with time) and how many
every other{{media_file}}The new file

Example

Add subtitles to a clip
[
  { "type": "media_transcribe", "label": "Transcribe",
    "config": { "integration_id": "<integration-id>", "source": "{{form.video}}", "formats": ["srt"] } },
  { "type": "media_tools", "label": "Burn in subtitles",
    "config": { "operation": "burn_subtitles", "source": "{{form.video}}", "subtitles": "{{transcript_srt}}" } }
]