Skip to content

v2.5.0

Latest

Choose a tag to compare

@gkozlenko gkozlenko released this 20 Feb 17:24
· 4 commits to master since this release
719c2ce

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.