Media ProcessingAI Workflow
Transcode uploaded videos to web-friendly formats, upload to S3, and notify the team via a hub. Event-driven — each step triggers the next automatically.
Prerequisites
Environment variables
AWS_ACCESS_KEYAWS_SECRET_KEYAWS_REGIONS3_BUCKETSLACK_BOT_TOKENInstall
npx radzor@latest recipe add media-processingAI Prompt
“Run `npx radzor@latest add video-transcode s3-upload notification-hub` to install 3 Radzor components. Then read components/radzor/video-transcode/radzor.manifest.json, components/radzor/s3-upload/radzor.manifest.json, components/radzor/notification-hub/radzor.manifest.json and each component's llm/integration.md. Wire them together to transcode uploaded videos to web-friendly formats, upload to S3, and notify the team via a hub. Event-driven — each step triggers the next automatically. Use the manifest's inputs (check envVar for required environment variables), outputs (check fields for object shapes), composability (check mapField for field extraction), and actions — don't invent custom interfaces.”
Paste this into Claude Code, Cursor, Windsurf, or any AI coding agent.
Pipeline
VideoTranscode
Transcodes video to web format
S3Upload
Uploads to cloud storage
NotificationHub
Notifies team of processed video
Scaffolded Code
// npx radzor@latest add video-transcode s3-upload notification-hub
import { VideoTranscode } from "./components/radzor/video-transcode"
import { S3Upload } from "./components/radzor/s3-upload"
import { NotificationHub } from "./components/radzor/notification-hub"
const transcoder = new VideoTranscode({ outputDir: "/tmp/transcoded" })
const s3 = new S3Upload({
accessKeyId: process.env.AWS_ACCESS_KEY!,
secretAccessKey: process.env.AWS_SECRET_KEY!,
region: process.env.AWS_REGION!,
bucket: process.env.S3_BUCKET!,
})
const notify = new NotificationHub({})
notify.registerChannel("slack", "slack", { webhookUrl: process.env.SLACK_BOT_TOKEN! })
// Event-driven pipeline
transcoder.on("onTranscodeComplete", async (result) => {
// Upload transcoded file to S3
const fileBuffer = await import("node:fs/promises").then(fs => fs.readFile(result.outputPath))
const { url } = await s3.upload(
`videos/${Date.now()}-${result.format}.mp4`,
fileBuffer,
"video/mp4"
)
// Notify team
await notify.send({
title: "Video processed",
body: `Transcoded to ${result.format}, ${result.duration}s, uploaded to ${url}`,
recipient: "team@myapp.com",
})
})
transcoder.on("onTranscodeFailed", async (error) => {
await notify.send({
title: "Transcode failed",
body: `Error: ${error.message}`,
recipient: "team@myapp.com",
})
})
// Trigger: process an uploaded video
await transcoder.transcode("/uploads/raw-video.mov", "/tmp/transcoded/output.mp4", {
codec: "h264",
resolution: "1280x720",
bitrate: "2M",
})Components used
LLM tip
Pass all 3 radzor.manifest.json files to your agent at once. It will read the outputs of each step and match them against the inputs of the next — wiring the full pipeline without any extra instructions.