Media Workflows
The workflows in this agent follow a simple pattern: upload to blob storage, persist metadata in commands/mediaAttachments, then preview or compile.
Attachment Upload Flow
- The plugin selects a local file via a file input.
processMediaUploadvalidates maximum size, extracts metadata (duration, dimensions), then uploads to blob storage.- The result is persisted to document/chapter/paragraph attachments through the
documentmodule APIs. - The user interface (UI) refreshes the list and exposes edit controls for
start/end/volume/loopwhere applicable.
FFmpeg Image to Video Flow
The ffmpegImageToVideo skill accepts images (and optional audio), normalizes inputs (blob id or URL), runs FFmpeg, and uploads the resulting MP4 to blob storage.
{
"images": ["blob-id-1", "blob-id-2"],
"audio": "blob-audio-id",
"duration": 6,
"fps": 25,
"width": 1280,
"height": 720,
"bg": "black"
}
SVG is explicitly rejected in the processing flow. Use PNG/JPG for image input.
Preview and Compile
paragraph-video-preview and document-video-preview are used for fast scene verification, including audio/video sync behavior and visibility of unfinished tasks.
document-video-actions starts compilation through documentModule.documentToVideo(...) and tracks task status for live user interface feedback.