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

@catlabtech/webcvt-transcode

v0.2.2

Published

WebCodecs-first audio/video transcode backend for webcvt — real cross-format conversion (wav/opus/aac/flac) via demux → decode → encode → mux, no ffmpeg.wasm

Readme

@catlabtech/webcvt-transcode

WebCodecs-first audio transcode backend for webcvt. Performs real cross-format audio conversion by chaining demux → decode → encode → mux over the container packages and the browser's WebCodecs codecs — no ffmpeg.wasm, no SharedArrayBuffer, no cross-origin isolation.

This is the "hardware path": WebCodecs runs in any secure context (HTTPS) and uses the platform's codecs. When a codec pair is unsupported at runtime (e.g. Safari < 26 has no AudioEncoder/AudioDecoder), canHandle returns false and routing falls through to the ffmpeg-wasm backend automatically.

Install

npm install @catlabtech/webcvt-transcode

Usage

Nothing registers on import — register explicitly (keeps the backend tree-shakeable):

import { convert } from '@catlabtech/webcvt-core';
import { registerTranscodeBackend } from '@catlabtech/webcvt-transcode';

registerTranscodeBackend(); // into core's defaultRegistry

const wav = await convert(mp3File, { format: 'wav' });
const opus = await convert(flacFile, { format: 'ogg', quality: 0.8 });

Register into a custom registry and unregister by name:

import { BackendRegistry } from '@catlabtech/webcvt-core';
const registry = new BackendRegistry();
registerTranscodeBackend(registry);
registry.unregister('webcodecs-transcode');

v1 audio matrix

Inputs (decodable): wav (PCM), mp3, aac (ADTS), flac, opus-in-ogg. Outputs: wav, opus-in-ogg, opus-in-webm, aac (ADTS), flac.

| To → | Path | |---|---| | wav | decode → interleave int16 PCM → serializeWav (no encoder needed) | | ogg / opus | Opus encode → serializeOgg (OpusHead identification packet) | | webm | Opus encode → serializeWebm (OpusHead as CodecPrivate, cluster-split for int16 deltas) | | aac | encoder-native ADTS (aac: { format: 'adts' }) → concatenate frames | | flac | FLAC encode (Chromium; probe-gated) → description ++ frames |

Off-matrix by design → routed to ffmpeg-wasm: → mp3 (no WebCodecs MP3 encoder), → ogg(vorbis) (no Vorbis encoder), → mp4/m4a (no from-scratch mp4 muxer yet), and all video.

canHandle — two-stage, cached

  1. Static matrix gate — O(1) reject for any off-matrix pair, with no probing.
  2. Concrete codec probeAudioDecoder.isConfigSupported for the input codec and AudioEncoder.isConfigSupported for the output codec. Only both-supported → true. A missing WebCodecs global is treated as false (never throws).
  3. Per-session cache — probe results are memoised, so repeated registry lookups don't re-probe.

Options

  • quality (0–1, default 0.7) → bitrate ladder. Opus/AAC stereo land on 128 kbps at q0.7; ends at 64→256 kbps (Opus) / 96→256 kbps (AAC). Mono ≈ 0.6×.
  • codec — accepted; the audio targets here have a fixed codec per container.
  • signal — abort via AbortSignal; in-flight codecs are close()-d.
  • onProgress — four weighted phases: demux (0–10%), decode (10–45%), encode (45–90%), mux (90–100%), then done at 100%.

Limits

Buffer-all (every serializer takes a complete in-memory model): input is capped at 256 MiB. mp4/m4a/webm/mkv audio-track inputs and video transcoding are handled by later stages.

License

MIT