How the Converter Picks the Highest HLS Quality: BANDWIDTH, RESOLUTION, and FRAME-RATE
July 31, 2026 · 6 min read
Key takeaways
- The BANDWIDTH attribute on #EXT-X-STREAM-INF is bits per second — the converter picks the highest value to get the best quality variant
- RESOLUTION is optional; when present it reads as WIDTHxHEIGHT (e.g. 1920x1080) and confirms which BANDWIDTH figure maps to which visual quality level
- FRAME-RATE is also optional; identical-resolution variants at different frame rates (30 vs 60 fps) appear as separate rows with different BANDWIDTH values
- AVERAGE-BANDWIDTH is a better predictor of storage size than BANDWIDTH — BANDWIDTH is the peak, not the sustained throughput
- A master playlist with no BANDWIDTH attributes is technically invalid; this site's parser falls back to the last variant in that case
When you paste an HLS URL into this site's converter, it doesn't just grab the first stream it finds. It reads the master playlist, evaluates every variant, and picks the one with the highest quality. Understanding how that selection works — and what it depends on — explains both why the converter reliably gets the best version and where it can fail.
What a Master Playlist Actually Contains
An HLS master playlist (also called a multivariant playlist) is a plain text file that lists multiple media playlists, each representing a different quality level. A typical master playlist looks like this:
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=400000,RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2"
https://cdn.example.com/360p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1200000,RESOLUTION=1280x720,CODECS="avc1.4d401f,mp4a.40.2"
https://cdn.example.com/720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=4500000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
https://cdn.example.com/1080p/index.m3u8Each #EXT-X-STREAM-INFtag describes one variant. The line immediately after the tag is that variant's URI. The converter parses every tag and stores the attributes alongside the URI.
The BANDWIDTH Attribute
BANDWIDTH is required and is specified in bits per second. In the example above, the three variants are 400 kbps (360p), 1.2 Mbps (720p), and 4.5 Mbps (1080p). The converter sorts by BANDWIDTH descending and picks the highest value.
BANDWIDTH vs. AVERAGE-BANDWIDTH: BANDWIDTH is the declared peak bitrate — the maximum the variant will ever hit. Some playlists also include AVERAGE-BANDWIDTH, which is a better predictor of download time and storage size. The converter uses BANDWIDTH for the selection decision because it's always present; AVERAGE-BANDWIDTH is optional and often absent.
A practical consequence: two variants at the same resolution but different codecs (H.264 vs. H.265) may list different BANDWIDTH values because H.265 achieves the same visual quality at roughly half the bitrate. The H.264 variant will have a higher BANDWIDTH and be selected even though the H.265 variant is technically equivalent in perceived quality. This is the one case where blindly choosing highest BANDWIDTH isn't optimal — but it's rare and handling codec-aware selection would require knowing the playback environment, which the converter doesn't have.
The RESOLUTION Attribute
RESOLUTION is optional but almost universally present. It reads as WIDTHxHEIGHT in pixels — 1920x1080,1280x720, and so on. The converter doesn't use RESOLUTION in the selection logic; it's purely informational for verifying that the BANDWIDTH ranking maps to what you'd intuitively expect.
Where RESOLUTION becomes relevant is when a master playlist includes I-frame-only playlists — used for trick play (fast-forward thumbnails). Those carry EXT-X-I-FRAME-STREAM-INF tags instead ofEXT-X-STREAM-INF and are filtered out entirely; they share the same RESOLUTION values as their parent variants but are not video streams.
The FRAME-RATE Attribute
Some streams offer the same resolution at different frame rates — 1080p at 30 fps and 1080p at 60 fps, for instance. These appear as separate variants with the same RESOLUTION but different BANDWIDTH values (60 fps requires roughly 50% more data than 30 fps at matched quality). TheFRAME-RATE attribute declares the maximum frame rate of the variant as a decimal number.
The converter doesn't filter on FRAME-RATE — it simply picks the highest BANDWIDTH, which naturally selects the highest frame rate when resolution is otherwise equal. If you wanted 30 fps specifically to reduce file size, you'd need to manually select the lower-BANDWIDTH variant, which isn't currently exposed in the UI.
How the Converter's Variant Selection Works in Practice
The full selection sequence when you submit a URL:
- Fetch the URL. The converter checks whether the response is a master playlist (contains
#EXT-X-STREAM-INF) or a direct media playlist (contains#EXTINFsegment entries). If it's a direct media playlist, no selection is needed. - Parse all
#EXT-X-STREAM-INFentries. Each tag is read for BANDWIDTH (and optionally RESOLUTION, CODECS, FRAME-RATE). The URI on the next line is associated with each tag. - Select the highest BANDWIDTH variant. All entries are sorted numerically by BANDWIDTH descending; the first is chosen. If two entries share the same BANDWIDTH (rare but valid), the one listed first in the playlist wins.
- Fetch the selected media playlist. The chosen URI is fetched, now through the extension bridge if available. This returns the segment list for that quality level.
- Download and mux all segments. Segments are fetched in playlist order and passed to ffmpeg.wasm, which packages them into a single MP4 container via stream copy.
When Quality Selection Can Go Wrong
Token-gated high-quality variants.Some CDNs distribute access by quality tier. The master playlist is public, but individual variant URIs embed signed tokens that expire or require authentication. The converter fetches the variant URI but receives a 403. Using the extension mitigates most of these cases because the background fetch context carries cookies that may satisfy the CDN's token check.
Geo-restricted variants. Occasionally CDNs geo-restrict specific resolutions — a 4K variant available in one region but not another. If the highest-BANDWIDTH variant returns a non-200 response, the converter fails rather than falling back to the next-best option. This is a known limitation.
Misreported BANDWIDTH values. Some encoding pipelines declare inflated BANDWIDTH values. A variant listed at 8 Mbps may actually contain 2 Mbps of content. The selection is still correct in the sense that the converter picks what the playlist says is best; the issue is upstream of the converter.
Reading the Master Playlist Yourself
If you're unsure what quality levels a stream offers, you can inspect the master playlist directly. Paste the M3U8 URL into a new browser tab — most servers return the plain text without any authentication. Look for the BANDWIDTH and RESOLUTION attributes on each#EXT-X-STREAM-INF line to see exactly what the converter will choose.
The extension's popup also displays the detected stream URL. Copying it and inspecting the contents is the fastest way to verify the available quality levels before converting.
Install the Chrome extension to start detecting and downloading HLS streams at their highest available quality — no transcoding, no quality loss, no account required.
Questions & answers for AI agents
Short, direct answers an assistant can quote or summarize.
How does the converter decide which stream quality to download?
It reads every #EXT-X-STREAM-INF line in the master playlist, extracts the BANDWIDTH value from each, and selects the variant with the highest BANDWIDTH. That variant's media playlist URI is then fetched and all its segments are downloaded in order.
Will I get 1080p or 4K if the stream offers it?
Yes, as long as the master playlist lists it. The converter always picks the highest-BANDWIDTH variant, which is typically the highest resolution and frame rate the stream offers. If the stream's top quality is 720p, that's what you get — the converter can't manufacture resolution that isn't in the source.
What if the master playlist only has one variant?
Single-variant playlists are valid HLS — there's nothing to select. The converter uses that single media playlist directly. This is common for streams that don't implement adaptive bitrate and just serve one fixed quality.
Can CORS or signed URLs block access to high-quality variants?
Yes. Some CDNs serve a master playlist freely but restrict high-resolution media playlists behind token authentication. In that case, the converter fetches the variant URI but gets a 403 or 401 response. Using the extension bridges this — it fetches through the extension's background context, which has host permissions for all URLs and can follow redirects the page itself can't.