Repository navigation
Discover media resources in HLS playlists - #810
Open
Shrashti1234 wants to merge 1 commit into
Open
Shrashti1234 wants to merge 1 commit into
Shrashti1234 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements RFC 8216 playlist resource discovery for #799.
Fetching an HLS playlist currently does not discover the media needed to preserve the presentation. Add
ExtractorHLSto follow URI lines (segments and nested playlists) and quotedURIattributes onEXT-X-KEY,EXT-X-MAP,EXT-X-MEDIA,EXT-X-I-FRAME-STREAM-INF,EXT-X-SESSION-DATA, andEXT-X-SESSION-KEY.Resolve every link against the fetched playlist URL, classify it as an embed, and honor the shared outlink limit. Read UTF-8 playlists incrementally, recognize standard/legacy HLS MIME types and
.m3u8/.m3upaths, and require the#EXTM3Uheader before claiming extraction. Attribute parsing preserves commas inside quoted values and ignores malformed lists. Non-HTTP(S) links, inline data and unresolved variable templates are skipped.Enable the extractor in both default XML/Groovy profiles and document setup for existing jobs. This handles the fetched RFC 8216 playlist snapshot; live-playlist reload scheduling, newer variable substitution and low-latency HLS extensions are outside this change. Byte-range entries discover the underlying resource URL rather than adding a new ranged-fetch mechanism.
The branch is based directly on master and is independent of the other contribution branches.
Validation (JDK 21):
mvn -B -pl docgen,commons,modules,engine -Dtest=ExtractorHLSTest,ExtractorHTMLTest,JerichoExtractorHTMLTest,ProfileCrawlerBeansTest -Dsurefire.failIfNoSpecifiedTests=false test117 tests passed: 115 extraction tests (including 23 HLS tests) and 2 default-profile validation tests. Coverage includes HTML → master playlist → media playlist → segment, alternate/key/init/session resources, relative and protocol-relative URLs, extensionless URLs, quoted commas, malformed attributes, MIME/filename recognition, CRLF/BOM input, duplicate byte-range URLs, non-HTTP URLs and the outlink limit.
Reference: RFC 8216, section 4.