Skip to content

Releases: gkozlenko/node-video-lib

v2.5.0

20 Feb 17:24
719c2ce

Choose a tag to compare

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 (ctts atom).

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

03 Jan 09:34

Choose a tag to compare

Version 2.4.1

Fix H.265 codec:

  • Correct bytes order for compatibility flags.
  • Correctly extract profile_space and profile_idc.
  • Optimize general constraint indicator flags parsing.

v2.4.0

01 Jan 16:59

Choose a tag to compare

Version 2.4.0

HLS Packetizer

  • Use correct implementation of CRC-32/MPEG-2 algorithm.
  • Support more than 6.5 hours of video length.
  • Add 100ms time shift between DTS and PCR.

Other

  • Use v10 as a minimum node version.

v2.3.1

24 May 15:05

Choose a tag to compare

Version 2.3.1

  • Fix infinite loop issue in the parse method
  • Truncate floating numbers in elst atoms

v2.3.0

20 Apr 14:23

Choose a tag to compare

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

14 Feb 08:10

Choose a tag to compare

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

v2.2.2

07 Feb 19:29

Choose a tag to compare

Version 2.2.2

Fix bugs in FLV and MP4 parsers:

  • Ignore tags that cannot be read due to unexpected file ending
  • Ignore tracks that don't have proper codec information

v2.2.1

27 Apr 05:51

Choose a tag to compare

Version 2.2.1

Update dependencies

v2.2.0

07 Dec 07:43

Choose a tag to compare

Version 2.2.0

MP4: Basic implementation of the MP4 builder

v2.1.12

29 Nov 04:33

Choose a tag to compare

Version 2.1.12

HLS: Don't split video sample into chunks