Releases: gkozlenko/node-video-lib
Releases · gkozlenko/node-video-lib
v2.5.0
Version 2.5.0
Index Format Update
The index file format has been updated to version 3 to support the maxFragmentDuration() method and precise HLS #EXT-X-TARGETDURATION calculation. Existing version 2 index files must be regenerated.
HLS and Fragmenting
- Soft threshold: Introduced a soft threshold (10% tolerance) when cutting video fragments to hit target chunk sizes more accurately and prevent overshoots.
- Audio-only: Added support for audio-only streams (setting PCR timestamps, disabling segment merging for playback stability).
- Precision & Offsets: Eliminated timestamp drift by using the source stream timescale and added support for negative sample offsets (
cttsatom).
Codec Parsing and Logic
- Robust parsing: H.264 (AVCC) and H.265 (HVCC) parsing logic has been refactored: it is now stateless and includes strict buffer bounds and configuration version checks.
- HEVC Open GOP fix: Added a fix for initial HEVC frames (patching CRA to BLA) to eliminate visual artifacts at chunk boundaries.
Performance Optimizations
- FragmentReader: Optimized I/O and reduced garbage collection (GC) pressure by introducing a coalesced read strategy and removing intermediate arrays.
- HLS Packetizer: Removed unnecessary data copying and optimized the sample counter to work with different PIDs.
- FragmentListBuilder: Improved performance by deriving duration directly from sample data and fixing truncation errors for the last fragment.
v2.4.1
v2.4.0
v2.3.1
v2.3.0
Version 2.3.0
Basic implementation of empty edits
Add an ability to support empty edits at the beginning of audio and video tracks. If a track is started with a delay, it's reflected in the edts and elst atoms. This is a basic implementation of these atoms support in MP4 parser and builder classes.
MDHD atom improvement
- Take into account version 1 in the build method.
- Cover this atom with unit tests.
v2.2.3
Version 2.2.3
Fix a bug in the MP4 Builder
HDLR atom:
- Use the correct atom size
- Use the correct position for the component name
- Correctly parse the component name
FTYP atom:
- Set minor version to
0x200
Video sample atom:
- Get rid of the useless encoder name
Clean dev dependencies
Replace unnecessary dev dependencies with self-written code:
- tempy
- lodash
- faker
Improvements
- Replace deprecated Buffer.slice by Buffer.subarray
- Require all atom classes statically instead of require them dynamically