HLS multibitrate playlist

Picture of Written by BlazingCDN

Written by BlazingCDN

September 24, 2024

[print-me target="section"/]

To get HLS multibitrate “on-the-fly” you should use /multi=/ param in the URL and replace part of the filename(with quality) with ‘_TPL_’ template (without quotes). You should specify substitutions with resolutions at the /multi=/ param. Example:

				
					http://cdn.example.com/key=somekey,end=123456789/media=hls/multi=854x480:48,1280x720:72/000/111/file_TPL_0p.mp4

				
			

Two elements will be extracted from the link above : 854×480:48 и 1280×720:72 .

Instead of _TPL_ in the file name values 48 and 72 will be used. So manifest will contain such lines:

				
					...,RESOLUTION=854x480,...
.../media=hls/000/111/file480p.mp4
..,RESOLUTION=1280x720,...
.../media=hls/000/111/file720p.mp4