Process videos uploaded to Supabase Storage

Edge Functions can't run FFmpeg. This one sends the job to Rendobar, which reads the upload from your bucket and writes the MP4 back next to it.

Guide
FFmpeg API
Updated
November 2026
supabase/functions/process-video/index.ts
import { createClient } from "npm:@rendobar/sdk";
const rb = createClient({ apiKey: Deno.env.get("RENDOBAR_API_KEY")! });
Deno.serve(async (req) => {
const { path }: { path: string } = await req.json();
// Read the upload from your bucket, write a web-ready MP4 back.
const job = await rb.jobs.create({
type: "ffmpeg",
inputs: { source: `storage://videos/${path}` },
params: {
command: "ffmpeg -i source -c:v libx264 -crf 23 -preset veryfast -c:a aac -movflags +faststart out.mp4",
},
destinations: ["storage://videos/processed"],
});
// Returns in milliseconds. The MP4 arrives in the bucket on its own.
return Response.json({ jobId: job.id });
});

Versus

Edge Function vs Rendobar

TopicEdge FunctionRendobar FFmpeg
CPU1 thread 2 s of CPU per request64 cores
Memory256 MB336 GB
Longest run400 s 150 s on Free9 hours On Pro and Studio. 1 hour on Free.
Disk512 MB 256 MB on Free512 GB Per job

Supabase figures from the Edge Functions limits and ephemeral storage pages, checked 15 November 2026.

Edge Functions have no GPU. An NVENC command runs on one of these, on Pro and Studio.

  • NVIDIA L4

    Memory
    24 GB
    NVENC engines
    2
  • NVIDIA L40S

    Memory
    48 GB
    NVENC engines
    3
  • NVIDIA RTX PRO 6000

    Memory
    96 GB
    NVENC engines
    4

How

How it works

  1. Connect your bucket, once

    Create an S3 access key in your Supabase Storage settings and add the bucket to Rendobar. Its ID is what storage:// points at.

    Storage connection in Rendobar
    ID
    videos
    Provider
    Supabase Storage
    Bucket
    videos
    Endpoint
    https://<project-ref>.storage.supabase.co/storage/v1/s3
  2. Upload, then call the function

    Your app uploads to uploads/ as it does today, then invokes process-video with the file's path.

    app.ts
    // In your app, after the user picks a video
    const { data, error } = await supabase.storage
    .from("videos")
    .upload(`uploads/${file.name}`, file);
    if (error) throw error;
    await supabase.functions.invoke("process-video", {
    body: { path: data.path },
    });
  3. The function sends the job

    That's the code at the top of this page. One request comes back in milliseconds, well inside the 2 s of CPU the function gets, and the encode runs on Rendobar. Any command from the recipes works the same way.

    What rb.jobs.create returns
    id
    job_8f2c41d07a6e4b19
    type
    ffmpeg
    status
    waiting
  4. Hear when it's ready

    When the MP4 is in processed/, a second Edge Function gets a signed job.deliveries_settled webhook and marks the video ready. Turn off JWT checks for it: Rendobar signs the request, not Supabase.

    supabase/functions/rendobar-webhook/index.ts
    // Deploy with --no-verify-jwt: the request is signed by Rendobar, not Supabase.
    import { verifyWebhook } from "npm:@rendobar/sdk/webhooks";
    import { createClient } from "npm:@supabase/supabase-js@2";
    const db = createClient(
    Deno.env.get("SUPABASE_URL")!,
    Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!,
    );
    const secret = Deno.env.get("RENDOBAR_WEBHOOK_SECRET")!;
    Deno.serve(async (req) => {
    const raw = await req.text();
    if (!(await verifyWebhook(raw, req.headers, secret))) {
    return new Response("Bad signature", { status: 401 });
    }
    const { event, data } = JSON.parse(raw);
    if (event === "job.deliveries_settled") {
    await db.from("videos").update({ ready: true }).eq("job_id", data.jobId);
    }
    return new Response("ok");
    });

FAQ

Frequently asked questions

Can I run FFmpeg in a Supabase Edge Function?

No. The Edge Runtime doesn't ship an ffmpeg binary, and a function gets 256 MB of memory and 2 seconds of CPU per request. Send the command to Rendobar's FFmpeg API from the function instead: one request, and native FFmpeg runs the job on the file in your bucket.

Does ffmpeg.wasm work in a Supabase Edge Function?

Not for a real transcode. Edge Functions have no Web Worker API, which the ffmpeg.wasm loader runs its core in, and 2 seconds of CPU per request ends an encode long before it finishes, for the same reasons it fails in a Cloudflare Worker. Supabase's own maintainers point out that ffmpeg is not in the runtime.

Will the processed file trigger processing again?

Not in this setup. Only your app calls the function, and only after an upload to uploads/. The output goes to processed/, so nothing calls the function for it.

What's the largest video I can process?

Supabase Storage takes uploads of up to 50 MB per file on its Free plan and up to 500 GB on Pro and Team. A Rendobar job takes inputs of up to 500 MB on Free and 10 GB on Pro and Studio, per the plans.

Can I add this to an app built with Lovable or Bolt?

Yes. Ask the builder to add the two Edge Functions on this page and to store your Rendobar API key and webhook secret as Edge Function secrets. The functions are plain Deno, so they run the same in any Supabase project. An AI agent can also run the jobs itself through the Rendobar MCP server.

What does it cost?

Jobs are billed per second of compute. A VP9 transcode we measured used 2.2 cores for 6.1 seconds and cost $0.0071. Every account starts with $5 of free credit and no card, and Rendobar bills nothing while you're not running jobs. Plans are on the pricing page.

Your command. Our infrastructure.

Bring your own commands. Run them on scalable CPU and GPU infrastructure, and pay only for compute time.