Skip to main content

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 KeyURL Parameter Value
min-qualityld sd hd 4k
max-qualityld sd hd 4k
start-qualityld sd hd 4k

With the corresponding values meaning these “short edge” resolutions:

ValueResolution
ld480p
sd720p
hd1080p
4k2160p

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 URLhttps://worker.antcdn.net/v1/{edgeKey}/master.m3u8?min-quality=sd&max-quality=hd&start-quality=hd

More ExamplesOnly 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.