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/rendererServerConfig
type ServerConfig = {
serveUrl: string;
workDir: string;
publicUrl?: string;
concurrency?: number; // default 2
store?: StateStore;
};| field | required | description |
|---|---|---|
serveUrl | yes | URL or local path of the Remotion bundle (from bundle()). |
workDir | yes | Directory where rendered files are written. Must exist and be writable. |
publicUrl | no | Base URL prepended to ${handle}.${ext} by getUrl(). If omitted, getUrl() returns a bare ${handle}.${ext} filename. |
concurrency | no | Maximum simultaneous renders. Controlled by p-limit. Default: 2. |
store | no | StateStore for persisting render records. Default: InMemoryStore(). |
Runtime behavior
- Renders are queued through a
p-limitlimiter. Incoming renders beyondconcurrencywait in-process. - Progress is persisted to the
StateStoreas each frame completes. - Output is written to
${workDir}/${handle}.${ext}whereextis determined bycodec(defaultmp4). getUrl()does not verify the file exists. Call it only afterstatus === "done".- The SDK does not serve files over HTTP. You must expose
workDiras a static file directory using your own HTTP server (e.g. Next.jspublic/, Expressstatic(), Nginx, CDN).publicUrlis just a base string — the SDK concatenates it with the filename. download()opens aReadableStreamfrom 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).