WebCodecs for Node.js
Native WebCodecs API implementation for Node.js, using FFmpeg for encoding and decoding. Frame-level video and audio processing without subprocess overhead.v1.0.0 — 84/84 tests passing on the vjeux WebCodecs harness
Quick Start
Get encoding in 5 minutes
API Reference
Complete API documentation
Migration from FFmpeg
Switch from FFmpeg CLI
Examples
Working code examples
Why node-webcodecs?
Frame-accurate control
Frame-accurate control
Encode and decode video frame-by-frame with precise control over every aspect. Set keyframes exactly where you want them, not where FFmpeg decides.
Real programming, not filter strings
Real programming, not filter strings
Use JavaScript conditionals, loops, and variables instead of cryptic FFmpeg filter syntax. Debug with breakpoints, not stderr parsing.
Browser API parity
Browser API parity
Same API as browser WebCodecs. Write effects once, run in both browser preview and server export. No more parity bugs.
Hardware acceleration
Hardware acceleration
Access platform encoders (VideoToolbox, NVENC, QuickSync, VA-API) for 8-15x faster encoding with optional worker threads.
Installation
Prerequisites: Node.js 18+, FFmpeg libraries (libavcodec, libavformat, libavutil)See Installation Guide for platform-specific setup.
Quick Example
Use Cases
Isomorphic Video Editors
Same effects code in browser and server. Visual parity guaranteed.
WebRTC Recording
Decode, composite, and re-encode in the same Node process.
Live Highlight Clipping
Frame-accurate clips from live streams with no timestamp drift.
Video Ingest Validation
Frame-by-frame quality assurance, not just metadata parsing.
Personalized Video
Actual programming for template-based video assembly.
HDR & Wide Gamut
BT.2020 primaries, PQ/HLG transfer functions natively supported.
Next Steps
Install
Follow the installation guide for your platform
Quick Start
Complete the 5-minute tutorial
Explore
Browse cookbook recipes for your use case
Community & Support
- GitHub Issues: Report bugs or request features
- npm Package: node-webcodecs on npm
- License: MIT