Browser support

Longpipe is supported on all major browsers, on all major operating systems. While Longpipe uses new browser APIs like WebGPU when available, it implements multiple fall backs to ensure maximum compatibility.

ChromiumFirefoxSafari
Windows94+WebGPU 113+132+WebGPU 141+n/a
macOS94+WebGPU 113+132+WebGPU 145+17+WebGPU 26+
Linux94+WebGPU 144+132+WebGL2n/a
Android94+WebGPU 121+132+WebGL2n/a
iOS / iPadOSiOS 17+WebGPU iOS 26+iOS 17+WebGPU iOS 26+17+WebGPU 26+

Browser APIs used by Longpipe

Here is a list of some of the key browser APIs used by Longpipe, though again some of these are alternatives for each other (e.g. WebGPU vs WebGL)

APIChromiumFirefoxSafariUsed for
WebGL2 in a worker (OffscreenCanvas)6910517GPU backend (fallback)
WebGPU11314126GPU backend (preferred)
Module workers8011415Runs the pipeline off the main thread
VideoFrame (WebCodecs)9413016.4Frames in the worker
MediaStreamTrackProcessor / Generator94––Frames in / out (Chromium)
requestVideoFrameCallback8313215.4Frames in (Firefox, Safari)
transferControlToOffscreen + captureStream69–16.4Frames out (Safari)
ImageBitmap + bitmaprenderer + captureStream665011.1Frames out (Firefox)
AudioWorklet + WebAssembly667614.1Audio denoise

WebGPU and WebGL2

Longpipe doesn’t use an ML runtime. Every network is written by hand as WebGPU compute shaders and as WebGL2 fragment shaders, with the same weights, so every model and effect runs on both. Longpipe picks WebGPU when the browser offers it and WebGL2 otherwise; output quality is the same.

WebGPU is faster. Background replacement at 360p, Apple M4, Chrome 157, presets as shipped (benchmarks):

PresetWebGPUWebGL2
xs344 fps182 fps
small332 fps188 fps
medium250 fps153 fps
large158 fps97 fps
xl83 fps59 fps

Frame transport

The models run in a worker, so every camera frame has to get into the worker and every processed frame back out as a MediaStreamTrack. Browsers expose different APIs for this, so Longpipe picks a path by feature detection. The path depends on the browser, not the OS.

Transport (in → out)BrowsersNotes
MediaStreamTrackProcessor → MediaStreamTrackGeneratorChromiumFrames stream straight into and out of the worker. Output follows the camera’s frame rate.
requestVideoFrameCallback → transferred canvas + captureStreamSafariThe main thread posts each frame to the worker; the worker draws into a canvas whose stream is the output. Capped at 30 fps.
requestVideoFrameCallback → ImageBitmap + captureStreamFirefoxLike Safari, but Firefox can’t capture a transferred canvas, so each output frame is sent back to the main thread as an ImageBitmap. Capped at 30 fps.

Either way the result is a normal MediaStreamTrack