Requesting HLS video url from KALTURA


I am uploading videos to KALTURA server and streaming them on my device.
How do I request “hls” urls for videos ? I am using php to connect to KALTURA.

Any help is appreciated.

1 Like

Hello @karanveer_sharma ,

Starting with version 2.48 of the Kaltura HTML5 player, HLS is the default playback method and so, going to KMC->Studio and creating a new player [or making sure your existing players are upgraded to the latest version] will result with a player that uses HLS for playback.

When playing a video, you can easily see the playback method used and the full playManifest request by starting a HTTP sniffer [you can use your browser’s dev tools and look at the requests listed in the “Network” tab], a HLS manifest request looks like this:$PARTNER_ID/sp/$PARNER_ID00/playManifest/entryId/$ENTRY_ID/flavorIds/$LIST_OF_FLAVOUR_IDs/format/applehttp/protocol/https/a.m3u8

To embed a player, go to KMC->Content->YOUR ENTRY->Actions select box->Preview & Embed

From there, you will be able to select your desired player and copy the HTML and JS code you need to place on the page you’d like to load the player to.

Thanks @jess , I got the hls url.
I have one more doubt though.
Could you explain to me about adaptive streaming using Kaltura.
How do I support multiple qualities of same video using Kaltura ?
Do I have to use encoder at my web-server to provide multiple bitrate of videos to Kaltura, if yes how could I do it and how Kaltura manages the manifest file ?
Do Kaltura have inbuilt encoder which could do this on time of uploading ?

Your help is greatly appreciated.

Hello @karanveer_sharma,

Here is a general explanation as to how things work:
A source video is transcoded into various flavours grouped under a conversion profile. The transcoding is done by a mechanism called KDL [Kaltura Decision Layer], which is part of our server code base, which you can browse here:

The transcoding is done mainly by ffmpeg, although we also make use of mencoder in certain situations.

Each such conversion profile can include one or more flavours, optimised for different bandwidth conditions and devices.
A certain partner can have one or more such profiles, if more than one profile exist, you can specify the desired profile when uploading an entry [using KMC or the API directly].

We have a default set of flavours that comprises the default conversion profile and each partner gets these set up when the account is created.
You can then use the KMC to disable some flavours and adjust some basic attributes.
This can be done from ‘Settings’->‘Transcoding settings’

In order to modify more advanced settings in each flavour, API calls need to be made. Using the API, you can also define additional flavours, on top of the default ones each partner is set up with.

You can read a bit more on that here:

Needless to say, setting up flavours requires a lot of expertise and knowledge, in video formats in general and the inner workings of ffmpeg [the main tool used by Kaltura to perform the transcoding] in particular.

As for the playback side of things, the Kaltura player supports HLS, HDS and DASH [all of which make use of adaptive bitrate mechanisms] and the default playback method is HLS.
The player makes an API request to server to get the manifest which looks like this:


for instance:


which will result in the following manifest being returned:


As you can see, in this example, the entry was transcoded into 4 different flavours, each with a different bitrate and the player will toggle these based on the bandwidth available.

Hi Jess,
in my case (KalturaCE 14.18) the selector of flavor always only show one flavor although the video contains more.

I detected some things when I request entry for HLS:

The browsers Firefox, Explorer or Edge request 2 requests m3u8 (in the case of Chrome requests 3) of which the first request contains the parameters “&responseFormat=jsonp” and “&callback=jQueryXXX_YYY& _=ZZZ” and as
I think that the JSONP does not return correctly, it asks for the same request again but without the parameters and the result is a playlist.m3u8 with only the information of a single flavor.

For instance, If I use Firefox I can see the following JSONP error:

I have verified that if I modify the parameter “&responseFormat=json” if it correctly returns the XML:

Also the last data of the parameter “&callback=XXX_YYY&_=ZZZ” should be “&callback=XXX_YYY_ZZZ” so that the browser does not think it is another different parameter

Hi @angober,

Please post the invalid JSON so that we can understand what makes it invalid and why…


I use delivery profile type “LOCAL_PATH_APPLE_HTTP” with stream_type “APPLE_HTTP”.

When I push play over video the firt request (m3u8):,0_v54m2rwx,0_uxesz3yg,0_t6eja5ji/format/applehttp/protocol/https/a.m3u8?referrer=aHR0cHM6Ly92aWRlb3MuY2FuYWwtZHNhLmd2YS5lcw==&ks=ZDdhNTJjMGQwOTA2NzE4NjhmZDhjMmUyOWFlZjc0OTAwMzJiY2E3YXwxMzY7MTM2OzE1NjE3ND

Response JSONP (Include all flavors):


but the second request (m3u8) not include JSONP:,0_v54m2rwx,0_uxesz3yg,0_t6eja5ji/format/applehttp/protocol/https/a.m3u8?referrer=aHR0cHM6Ly92aWRlb3MuY2FuYWwtZHNhLmd2YS5lcw==&ks=ZDdhNTJjMGQwOTA2NzE4NjhmZDhjMmUyOWFlZjc0OTAwMzJiY2E3YXwxMzY7MTM2OzE1NjE3NDg0MzM7MjsxNTYxNjYyMDMzLjk2OTk7Y2FuYWxndmFAZ3ZhLmVzOyosZGlzYWJsZWVudGl0bGVtZW50Ozs&playSessionId=65bc39bc-73e5-c6fb-0529-7635323621b8&clientTag=html5:v2.75.1&uiConfId=23449452

and response equal nothing:

How this second m3u8 not include info of flavor (#EXTM3U…) the third request is a playlist.m3u8 where only contain one flavor:


And the result is a entry with only one flavor in selector:

I found my problem over the second request (m3u8) not include response :

As I am using the delivery profile “LOCAL_PATH_APPLE_HTTP” I have modified the file DeliveryProfileLocalPathAppleHttp.php by replacing “kRedirectManifestRenderer” with “kM3U8ManifestRenderer” (it also works if I delete the function function __construct) and so that Wowza also has the multiflavor by replace /playlist.m3u8 by /chunklist.m3u8:

me too…