maravilla-media-transforms

Installation
SKILL.md

Maravilla media transforms

Async media + document processing jobs that derive new storage objects from existing ones — video transcode, image resize, OCR, document → PDF / HTML / Markdown / thumbnails, image-replacement templating, QR injection. The runtime exposes two equivalent paths:

  1. Declarative — list patterns in maravilla.config.ts under transforms. The adapter compiles each entry into a synthetic onStorage({ keyPattern, op: 'put' }) handler that fires every transform in Promise.all whenever a matching key lands. Default for all "every upload of type X gets these renditions" cases.
  2. Imperative — call platform.media.transforms.transcode/thumbnail/resize/ocr/probe(...) from a route or event handler. For one-off jobs, on-demand re-derivation, or when the source key isn't predictable from a pattern.

Both paths return a JobHandle whose output_key is deterministic — content-addressed via keyFor(srcKey, spec). Clients can render placeholder UI for the derived asset before the worker even starts.

Declarative: transforms in maravilla.config.ts

import { defineConfig } from '@maravilla-labs/platform/config';

export default defineConfig({
  transforms: {
    // Every video upload → mp4 + webm + a 1s thumbnail.
    'uploads/videos/**': {
      transcode: [
Related skills

More from maravilla-labs/maravilla-cli

Installs
16
First Seen
Apr 29, 2026