Graphrt

FFmpeg

Probe, convert (fixed format/codec/quality presets), trim, extract audio, thumbnails, resize, join, burn subtitles and GIFs, files in allowed directories only, protocol and demuxer whitelists, new output files only

Stable v0.1.0 Node.js 9 actions
Use in Graphrt Desktop

About

A Graphrt plugin for local media files with the system ffmpeg/ffprobe. Workflows and agents can inspect, convert, cut, join and render video and audio files that live in directories you allow, and every result is a new file in one output directory. Tools choose from a fixed menu of formats, codecs and quality levels, they never pass raw ffmpeg options.

What it can do

  • probe: container, duration, size, bit rate and streams (codec, resolution, frame rate, rotation, sample rate, channels, language), include_raw adds ffprobe's JSON.
  • transcode: mp4, mov, mkv, webm, mp3, m4a, wav, flac, ogg or opus, with an allowed codec per format (h264, h265, vp9, av1, aac, mp3, opus, vorbis, flac, pcm) and quality low/medium/high. Workflow nodes may add allowlisted output options with extra_args.
  • trim: start with end or duration (seconds or HH:MM:SS.fff), frame-accurate re-encode, or a fast stream copy with accurate: false.
  • extract_audio: the first audio track as mp3, m4a, wav, flac, ogg or opus.
  • thumbnail: one frame at time as jpg, png or webp, optionally scaled to target_width.
  • resize: target_width and/or target_height (16–7680), aspect kept.
  • concatenate: 2–50 files in order, by stream copy (all parts must share codecs and sizes) or reencode: true.
  • burn_subtitles: draws the cues of an .srt file into the picture, with an optional font_size.

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • Probe a media file ffmpeg.probe
  • Convert a media file ffmpeg.transcode
  • Extract the audio track ffmpeg.extract_audio
  • Resize a video ffmpeg.resize
  • Cut a section ffmpeg.trim
  • Join media files ffmpeg.concatenate
  • Burn in subtitles ffmpeg.burn_subtitles
  • Grab a frame ffmpeg.thumbnail
  • Make a GIF ffmpeg.make_gif

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • FFMPEG_INPUT_DIRS (required)
    Comma-separated directories (absolute or ~/...) that input files may be read from, subdirectories included
  • FFMPEG_OUTPUT_DIR (none)
    Existing directory for outputs. Without it only probe works, the rest return setup_required. Outputs can be read back as inputs.
  • FFMPEG_MAX_INPUT_BYTES 2 GiB
    Largest input file
  • FFMPEG_MAX_OUTPUT_BYTES 2 GiB
    Largest output (ffmpeg's -fs), an output that reaches it is removed and the call fails
  • FFMPEG_TIMEOUT_MS 600000
    Per ffmpeg/ffprobe run (1000 to 1780000), the process is killed when it passes
  • FFMPEG_MAX_INPUT_PIXELS 33177600 (8K)
    Most pixels (width × height) of any video stream an operation decodes, also passed as -max_pixels
  • FFMPEG_MAX_INPUT_SECONDS 3600
    Longest input (or concatenation) an agent tool call may process, nodes are not limited
  • FFMPEG_THREADS 4
    Decoder, encoder and filter threads per run (1 to 64)
  • FFMPEG_BINARY Ffmpeg, ffprobe on PATH
    Absolute paths to the programs
  • FFPROBE_BINARY

How to use it

In Graphrt Desktop

  1. Open Plugins and search for FFmpeg.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install ffmpeg
workflow.yaml
- id: ffmpeg
  type: ffmpeg.probe
Plugins in the docs