Verse by CtruhDocsPlug-insPricingOpen in the docs site

Export a flythrough video

Every streamed scene can become a client-ready MP4 or WebM — recorded from the live engine, in the viewer's own browser, with nothing uploaded and no server render farm. Two ways to get one: a button in the playground, or exportVideo() in an embed.

You need: a scene that has a tour. Scenes Verse builds a walkthrough for already do (an orbit for open-sky scenes, a walkthrough for interiors). A recorded tour (?tour=) works too, and in embeds a scene with no tour at all gets an orbit.

From the playground

  1. Open the share link. Once the scene is up, a Tour chip appears — and beside it, Export video.
  2. Click it and pick duration (defaults to the tour length), resolution (1080p / 720p / native) and go.
  3. The file downloads as <scene>-tour.mp4 (H.264, where the browser can mux MP4: Chrome/Edge 126+, Safari) or .webm (VP9 elsewhere). The chip is labelled with the container you will actually get.

During capture the engine renders at full quality; everything restores afterwards, including on cancel.

From an embed

The capture runs inside the engine iframe (that is where the canvas lives) and the finished bytes transfer to your page as a Blob, so your page decides: download, upload to your own storage, or preview inline.

<div id="viewer"></div>
<button id="make-video">Export video</button> <button id="cancel" hidden>Cancel</button>
<progress id="bar" max="100" value="0" hidden></progress>
<script src="https://verse.ctruh.com/embed.js"></script>
<script>
  const viewer = Verse.embed(document.getElementById("viewer"), { scene: "docs-demo-718035483f84" });
  const bar = document.getElementById("bar"), cancel = document.getElementById("cancel");
  viewer.on("export-progress", (p) => (bar.value = p.percent));

  document.getElementById("make-video").onclick = async () => {
    bar.hidden = cancel.hidden = false;
    try {
      const r = await viewer.exportVideo({ duration: 10, fps: 30, height: 1080 });
      if (!r.cancelled) {
        // r.blob is yours. Download it…
        const a = Object.assign(document.createElement("a"), { href: URL.createObjectURL(r.blob), download: r.name });
        a.click();
        // …or upload it: fetch("/my/upload", { method: "POST", body: r.blob })
      }
    } catch (e) {
      console.warn("export failed:", e.message);   // "no scene loaded yet", "an export is already running"
    } finally {
      bar.hidden = cancel.hidden = true;
    }
  };
  cancel.onclick = () => viewer.cancelExport();     // the pending promise resolves { cancelled: true }
</script>

Options

OptionDefaultMeaning
durationtour lengthseconds, clamped 1–600
fps30clamped 5–60
height1080output height in px; 0 = the canvas's native height
formatauto (MP4 where supported)"mp4" or "webm"
bitrate~10 Mbps at 1080p, scaled by areavideo bits per second

Resolves { blob, mimeType, name, width, height, frames, cancelled }. One export runs at a time; export-progress events fire per captured frame and an export-done { id, size, cancelled, error? } event summarises the run for analytics (the bytes ride the promise, not the event).

Without the SDK

If you talk to the iframe yourself, three messages do the job: verse:export-video { id, duration?, fps?, height?, format?, bitrate? } down; verse:event { name: "export-progress", detail: { id, percent, frame, total } } up while capturing; finally verse:export-video-done { id, bytes (transferred ArrayBuffer), mime, name, width, height, frames, cancelled } — or { id, error } on refusal (busy, no scene, recording unsupported). verse:export-video-cancel { id } cancels.

Getting a better video