Skip to content

Add support for #EXT-X-I-FRAME-STREAM-INF and #EXT-X-I-FRAMES-ONLY#7757

Merged
robwalch merged 5 commits intomasterfrom
feature/i-frame-variants
Apr 6, 2026
Merged

Add support for #EXT-X-I-FRAME-STREAM-INF and #EXT-X-I-FRAMES-ONLY#7757
robwalch merged 5 commits intomasterfrom
feature/i-frame-variants

Conversation

@robwalch
Copy link
Copy Markdown
Collaborator

@robwalch robwalch commented Mar 20, 2026

This PR will...

Implements support for I-FRAME variants:

  • Parses I-FRAME-STREAM-INF variants and exposes them via hls.iframeVariants (not selectable)
  • Provides a method, createIFramePlayer(): HlsIFramesOnly, to create a child instance that treats the iframe variants as levels
  • hlsIFramesOnly.loadMediaAt(time) loads then seeks to render a frame without clearing the last.

Implements support for I-FRAMES-ONLY playlists:

  • Always handles segments in media playlists with #EXT-X-I-FRAMES-ONLY as I-Frames segments
    • This includes not erroring when loading an I-Frame playlist into primary instance (useful for troubleshooting I-Frame media playlists and segments on the demo page)
  • Supports I-Frame remuxing of fmp4 (unmuxed video) and TS segments

Example Usage:
https://github.com/video-dev/hls.js/blob/69ad3e5f4e657b6476d5fcd9ac7d63025f859261/docs/API.md#i-frame-variants-api

Known issues

  • Muxed mp4 is not supported. An "audiovideo" sourcebuffer is created for muxed mp4 init segments. Editing mp4 init segments is currently missing, as is remuxing and dropping audio in muxed fmp4 media segments.
  • Some mp4 I-Frame segment content has multiple track fragment runs which are not supported (PFRM and APMP content has moof headers that are compatible with the current I-Frame mp4 remuxing
  • Interstitial I-Frame loading not yet supported. To be added with Support I-Frame requests of Interstitials on integrated timeline #7781.
  • AES-128 m2ts byte-range segments generally fail to decrypt
  • Chrome joins buffered ranges between non-adjacent segments due to large remuxed sample duration (after appending a 6s video sample, Chrome will coalesce buffered ranges roughly that size). This is being worked around successfully by using the fragment tracker state over buffered ranges when determining if a segment needs to be loaded.
  • Frames can only be scheduled to load two at a time - one active, and the last scheduled. There is no in-memory cache of frames. They are appended to the video SourceBuffer and then subject to ejection by the platform MSE implementation.
  • "mjpg/jpeg" or image codecs are currently filtered out when unsupported by MSE. Support for retrieving image mdat data will be added with "mjpg" or "jpeg" #EXT-X-FRAME-STREAM-INF variant support #7755

Are there any points in the code the reviewer needs to double check?

Resolves issues:

Resolves #5392

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
@robwalch robwalch force-pushed the feature/i-frame-variants branch from f99c8aa to b45e14e Compare March 26, 2026 19:22
@robwalch robwalch force-pushed the feature/i-frame-variants branch from b45e14e to 12a946c Compare April 1, 2026 19:03
@robwalch
Copy link
Copy Markdown
Collaborator Author

robwalch commented Apr 6, 2026

Merging with known issues. Please file bugs and feature requests if any of them impact your ability to use this feature. Or, comment on #7755 and #7781 if you are waiting on or would like to contribute to those features.

@robwalch robwalch merged commit c7c2876 into master Apr 6, 2026
49 of 52 checks passed
@robwalch robwalch deleted the feature/i-frame-variants branch April 6, 2026 19:12
@github-project-automation github-project-automation bot moved this from Top priorities to Done in HLS.js Release Planning and Backlog Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Support for "trick play" thumbnails

2 participants