npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vosjs/render-core

v0.2.8

Published

The render harness for deterministic vos renders: timeline-sharded chunk planning and stream-copy chunk concat. Pixels stay in the browser; this package owns the orchestration math and the Node-side media plumbing.

Readme

@vosjs/render-core

The render harness for deterministic vos renders: shard a timeline into parallel chunks, then stream-copy the encoded chunks back into one file without re-encoding.

npm License: MIT

Part of vos. Pixels never leave the browser: every frame is encoded in-page with WebCodecs and mediabunny. This package owns what happens around that in Node: how a timeline is split into frame ranges that can render concurrently, and how the encoded parts are muxed into a single container. Its one dependency is mediabunny. Consumed by the vos CLI's local render and by any host that fans a render out across browser sessions.

What is deliberately not here: the pages a hosted fleet runs (a finalize page that fetches parts from an ingest route, an audio mix page), and any queue, storage or session-pool policy. Those are a host's opinions about its own infrastructure; this package hands them the plan and the mux and nothing else.

Install

pnpm add @vosjs/render-core

Why sharding is correct here

A vos render is a pure seek(t) function, so a timeline splits cleanly into independent frame ranges. Each range renders concurrently as its own page, encoded with pinned encoder params and chunk-local timestamps, and the packets are stream-copied into one container: a plain demux and remux, no re-encode, no quality loss. Timestamp offsets come from the plan (frames divided by fps), never from measured durations, so rounding cannot drift.

planChunks(totalFrames, fps, { maxParallel }) ──▶ [ { index, startFrame, endFrame, frameCount, startTime, duration }, … ]
        │  render each range concurrently (a browser page each, pinned encoder)
        ▼
muxEncodedExport({ video: parts, audio?, format }) ──▶ one file, packet-identical to a single-pass render

Audio stays out of the chunks by design and is mixed once at finalize, so codec priming seams never exist.

Exports

| Export | Purpose | | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | planChunks(totalFrames, fps, policy) | Split a timeline into balanced frame ranges. policy is { maxParallel, minFramesPerChunk? }; the floor is DEFAULT_MIN_FRAMES_PER_CHUNK (24). Pure math. | | muxEncodedExport(options) | Stream-copy encoded video parts (an iterable or async iterable of { data, duration }, fed one at a time) plus an optional encoded audio part into one webm or mp4. | | concatEncodedVideo(chunks, options) | The same for an in-memory list of video chunks; a thin wrapper over muxEncodedExport. | | countVideoPackets(bytes) | Count the video packets in an encoded file; used by parity checks. | | audioProducerCode(options?) | Page JavaScript that mixes a composition's audio in the browser through @vosjs/core/audio, from a host-built plan or from the studio's audio data, for the finalize step. | | dataHasAudio(data, stack?, plan?) | Whether a lowered composition carries any sound, so a video-only render can skip the audio page. | | studioEntryData(stack) | Find the studio layer entry's data in a lowered stack (array or keyed). |

Types: ChunkPlanPolicy, RenderChunk, ConcatChunk, ConcatOptions ({ format, frameRate? }), ConcatResult ({ bytes, packetCount, codec }), MuxExportOptions, AudioPlanJson, AudioProducerCodeOptions; plus CORE_AUDIO_CDN_URL, the pinned @vosjs/core/audio module the producer page imports.

Contract: the concat mirror

A host that concatenates parts inside a browser page (a fleet's fallback, where the Node mux cannot run) must stay packet-identical to concat.ts: the CLI uses the Node path, a fleet may use a page, and the two must produce the same file. Keep any such page in sync with concat.ts and assert the parity in the host's own harness.

Development

pnpm --filter @vosjs/render-core test
pnpm --filter @vosjs/render-core typecheck

License

MIT © vosso