M3U8 / HLS parser test methodology
Test permitted HLS manifests by recording playlist structure, variants, tracks, segment access, expiration, encryption, and refusal conditions.
An M3U8/HLS parser test should use a public, owned, or explicitly permitted manifest and record whether it is a master or media playlist, which variants and tracks are exposed, whether segments remain accessible, and whether encryption, DRM, credentials, or expiration require a refusal.

Direct answer
An M3U8/HLS parser test should use a public, owned, or explicitly permitted manifest and record whether it is a master or media playlist, which variants and tracks are exposed, whether segments remain accessible, and whether encryption, DRM, credentials, or expiration require a refusal.
Test scope
Parsing and downloading are separate claims. A parser can identify playlist tags, variants, audio groups, subtitles, segment references, and encryption markers without proving that every referenced object is accessible or that an MP4 can be produced.
The test excludes private streams, paid access, login-only manifests, DRM key acquisition, credential replay, and attempts to defeat platform controls.
Required fields
| Field | What to record |
|---|---|
| Manifest source and permission | Public, owned, or explicitly permitted fixture |
| Test date and deployment | Exact time and code/deployment reference |
| Playlist type | Master or media playlist |
| Variants | Bandwidth, resolution, codecs when declared |
| Alternate tracks | Audio and subtitle groups when declared |
| Segment behavior | Accessible, missing, expired, or restricted |
| Protection state | Unencrypted, declared encryption, DRM/protected, or unknown |
| Result | Parsed, partial, unsupported, refused, expired, or unknown |
Procedure
- Verify the fixture's permission and remove secrets from any stored test record.
- Fetch the manifest under the approved public or test conditions and retain the timestamp and response status.
- Identify whether it is a master playlist or a media playlist.
- For a master playlist, enumerate declared variants and alternate audio or subtitle groups.
- For a media playlist, record sequence information, segment count, duration tags, discontinuities, and end-state markers when present.
- Inspect encryption declarations without requesting or deriving protected keys.
- Check only a minimal permitted segment sample to distinguish parsing success from expired or inaccessible media.
- Classify the result and preserve the exact failure reason; do not convert unknown behavior into support.
Interpretation rules
- Parsed: the playlist structure was read under the recorded conditions.
- Partial: the manifest parsed but one or more tracks or segments could not be verified.
- Expired: the manifest or segment reference was no longer valid at test time.
- Unsupported: the observed structure was outside the tested parser behavior.
- Refused: the source required DRM bypass, private access, payment, login credentials, cookies, or restricted headers.
- Unknown: evidence was insufficient to choose another category.
Successful parsing does not guarantee a particular resolution, audio track, subtitle, file size, duration, or MP4 output. Those properties depend on what the source exposes and on a separate end-to-end verification.
Sample record
fixture_id: permitted-hls-master-001
playlist_type: master
variants_observed: 3
audio_groups_observed: 1
subtitle_groups_observed: 0
segment_check: permitted_sample_accessible
protection_state: unencrypted
result: parsed
limitation: result applies only to this dated fixture
FAQ
What is the difference between a master and media playlist?
A master playlist points to variants and alternate tracks; a media playlist lists the segments for one rendition.
Can the test include DRM-protected HLS?
It may classify a protected condition as a refusal, but it must not attempt to obtain keys or bypass DRM.
Why can a manifest work once and fail later?
Manifest or segment URLs may expire, depend on temporary authorization, or change with the source response. Record the test time and access conditions.
Does successful parsing prove a downloadable MP4 exists?
No. Parsing only describes the playlist. Media access, track combination, duration, and output creation require separate verification.