Skip to content

sb2702/longpipe

Repository files navigation

Longpipe 🐉

Fast, high-quality video effects in the browser — virtual backgrounds, face touch-up, auto-reframe, and mic noise removal in one open-source SDK.

video-effects-sdk

Try the live demo → longpipe.dev/demo

Warning — This project is very new and still under active development. Expect API changes between versions and bugs.

Quick start

npm install longpipe
import { EffectsPipeline } from 'longpipe'

const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: true })

const pipeline = new EffectsPipeline(stream, {
  background: 'blur',   // or an image, video, or solid color
  touchup: true,        // skin smoothing
  reframe: true,        // auto-frame the subject
  audio: 'denoise',     // mic noise removal
})

videoEl.srcObject = pipeline.stream   // available immediately
await pipeline.ready                  // optional — resolves once the effect is live

pipeline.stream is wired synchronously and emits the unprocessed input until the model is ready (~1–3 s on cold start), so users see live video the whole time. Model weights stream from cdn.longpipe.dev by default — no extra setup, and self-hostable.

Why Longpipe

  • One model, many effects. Backgrounds, touch-up, and auto-reframe all run off a single shared encoder pass — enabling another effect doesn't cost another inference. Audio denoise runs in a parallel AudioWorklet, off the GPU entirely. (Architecture)
  • More accurate and faster than the open-source alternatives. Custom-trained models running as pure WebGPU/WebGL shaders in a zero-copy, fully-GPU pipeline — no general-purpose runtime, no CPU↔GPU round trips.
  • Works everywhere. Chromium, Firefox, and Safari (desktop + iOS). WebGPU when available, WebGL2 fallback, per-browser frame transport handled internally.
  • Adapts to the device. Five model presets (xsxl); autotune benchmarks the actual device at init and an adaptive controller swaps presets at runtime to hold 30 fps — on 10-year-old netbooks and the latest MacBook Pro alike.
  • Production pedigree. Built by the founder of Vectorly, a commercial effects SDK acquired in 2021 — a ground-up redesign for the WebGPU era.

Best models on the web

Longpipe's hydranet architecture, custom model-specific shaders, zero-memory-copy pipeline, developer friendly interface and 100% MIT open source license mean that 🐲 Longpipe pareto dominates on performance, model quality and ease of use.

lp-performance

Documentation

Full docs live at longpipe.dev/docs:

Roadmap

  • Background segmentation / virtual backgrounds
  • Background noise removal (audio, separate pipeline)
  • Face landmarks + touch-up
  • Multi-face support
  • Auto-reframe
  • AR effects
  • Lighting correction

License

SDK source code and pre-trained model weights are MIT-licensed — see LICENSE and WEIGHTS_LICENSE. You're free to self-host the weights inside other open-source or commercial projects under MIT-compatible terms.

The weights were trained on permissively-licensed public datasets (P3M-10k, AISegment, COCO, OpenImages), Z-Image synthetics, and a custom webcam dataset collected with participants' explicit, informed consent. The full dataset list and provenance details: longpipe.dev/docs/licensing.

About

Open-source video effects SDK for the browser — virtual backgrounds, beauty filters, auto-reframe & noise removal on WebGPU/WebGL. MIT.

Topics

Resources

License

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors