A Node.js library for parsing MP4 and FLV video files, building MP4 files, and creating HLS MPEG-TS chunks.
node-video-lib is a Node.js library for parsing, building, and manipulating MP4 and FLV video files. It provides tools to extract video metadata, create MP4 files from scratch, and generate HLS-compatible MPEG-TS chunks for streaming. The library solves the need for programmatic video processing in Node.js without relying on external binaries or services.
Node.js developers building video processing applications, such as custom transcoding pipelines, streaming servers, or video analysis tools that require low-level access to video file structures.
Developers choose node-video-lib because it offers a pure JavaScript solution for video manipulation with no external dependencies, provides fine-grained control over video containers and codecs, and includes specialized tools for HLS streaming preparation.
Node.js Video Library / MP4 & FLV parser / MP4 builder / HLS muxer
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library is implemented purely in JavaScript, eliminating the need for external binaries like FFmpeg, as highlighted in the philosophy section.
It provides low-level access to video structures, such as parsing tracks and samples, allowing for detailed manipulation as shown in the Movie and Fragment classes.
Includes built-in tools like HLSPacketizer and FragmentListBuilder for generating MPEG-TS chunks, directly supporting HTTP Live Streaming workflows.
Optimized for H.264/H.265 video and AAC audio within MP4 and FLV containers, ensuring reliable performance for these common standards.
The README explicitly states it only works with MP4 and FLV files using H.264/H.265 and AAC, excluding many popular formats and codecs.
Usage examples require manual opening and closing of file descriptors, increasing boilerplate code and potential for resource leaks.
The API exposes low-level concepts like fragments and timescales, which can be intimidating for developers unfamiliar with video file internals.