Controlling Video Quality
HLS players typically start conservative and adapt upward. If you want tighter control (cost caps, premium tiers, consistent start quality), AntCDN supports quality controls via URL query params and Edge Key defaults.
You can choose to set a minimum quality for a given video with these URL parameters:
| URL Parameter Key | URL Parameter Value |
|---|---|
| min-quality | ld sd hd 4k |
| max-quality | ld sd hd 4k |
| start-quality | ld sd hd 4k |
With the corresponding values meaning these “short edge” resolutions:
| Value | Resolution |
|---|---|
ld | 480p |
sd | 720p |
hd | 1080p |
4k | 2160p |
So, this URL will play a video starting with hd, but can drop down to sd if needed:
https://worker.antcdn.net/v1/{edgeKey}/master.m3u8?min-quality=sd&max-quality=hd&start-quality=hd
Full URL
https://worker.antcdn.net/v1/{edgeKey}/master.m3u8?min-quality=sd&max-quality=hd&start-quality=hdMore Examples
Only allow low definition playback:https://worker.antcdn.net/v1/{edgeKey}/master.m3u8?max-quality=ld
Only allow high definition playback (HD or 4k):
https://worker.antcdn.net/v1/{edgeKey}/master.m3u8?min-quality=hd
Start with sd (recommended for strong-bandwidth audiences):
https://worker.antcdn.net/v1/{edgeKey}/master.m3u8?start-quality=sd
Controlling Quality With Edge Keys Automatically
Edge Keys let you set defaults for playback quality. Create one Edge Key per audience (e.g. “HD-only” vs “4K”), and embed the appropriate one.
So, for example if you want to offer lower-tier subscribers hd and higher tier subscribers 4k, create two Edge Keys: one capped and one uncapped.
Caution
If you set min-quality, max-quality or start-quality on an Edge Key, you cannot override it with URL parameters.