Server

RenderServer adapter — configuration, runtime behavior, and per-render options.

import { RenderServer } from "@remocn/render-sdk/server";

const adapter = RenderServer({
  serveUrl: "http://localhost:3001", // or a local bundle path
  workDir: "./out",
  publicUrl: "https://cdn.example.com/renders",
  concurrency: 2,
});

Requires @remotion/renderer as an optional peer dependency. Install it separately:

npm install @remotion/renderer

ServerConfig

type ServerConfig = {
  serveUrl: string;
  workDir: string;
  publicUrl?: string;
  concurrency?: number; // default 2
  store?: StateStore;
};
fieldrequireddescription
serveUrlyesURL or local path of the Remotion bundle (from bundle()).
workDiryesDirectory where rendered files are written. Must exist and be writable.
publicUrlnoBase URL prepended to ${handle}.${ext} by getUrl(). If omitted, getUrl() returns a bare ${handle}.${ext} filename.
concurrencynoMaximum simultaneous renders. Controlled by p-limit. Default: 2.
storenoStateStore for persisting render records. Default: InMemoryStore().

Runtime behavior

  • Renders are queued through a p-limit limiter. Incoming renders beyond concurrency wait in-process.
  • Progress is persisted to the StateStore as each frame completes.
  • Output is written to ${workDir}/${handle}.${ext} where ext is determined by codec (default mp4).
  • getUrl() does not verify the file exists. Call it only after status === "done".
  • The SDK does not serve files over HTTP. You must expose workDir as a static file directory using your own HTTP server (e.g. Next.js public/, Express static(), Nginx, CDN). publicUrl is just a base string — the SDK concatenates it with the filename.
  • download() opens a ReadableStream from the file at ${workDir}/${handle}.${ext} using Node.js streams.

Per-render options (ServerOptions)

type ServerOptions = {
  concurrency?: number;
  chromiumOptions?: ChromiumOptions;
  timeoutInMilliseconds?: number;
};

Pass these as the second argument to sdk.start(input, options).

On this page