HTTP Live Streaming specification is still under IETF Internet draft while I am writing this blog. Probably when you read this new draft might have been released. So far 14 drafts has been released. Draft 14 has an expire date of April 17, 2015.

There are at least three points every HLS developer must know before starting writing HLS server/client. When I started writing HLS server, I was continuously asking myself three question, answers of which I got after reading HLS draft numerous times.
I am explaining three important points in a form of question and answers. This blog is a advance topic of HLS Live streaming. For beginners first read HLS draft.

Q: What should be the minimum size of playlist for Live Streaming?

A: Size of the HLS playlist should be atleast 3 times the size of target duration. In the example below Target Duration is 2 and the combined duration of all segments in a playlist is more than 6 seconds. This playlist is complete.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:25
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:2
#EXTINF:1.800000,
out025.ts
#EXTINF:1.200000,
out026.ts
#EXTINF:1.800000,
out027.ts
#EXTINF:1.212500,
out028.ts

Q: How frequently playlist should be updated by server?

A: Playlist should be updated not earlier than one-half times target duration and not later than 1.5 times target duration. For example above target duration is 2, So playlist should be updated not earlier than 1 seconds and not later than 3 seconds to achieve SMOOTH STREAMING.

In example above segments are of two sizes 1.2 and 1.8 seconds. And we are expecting next segment size between 1 – 2 secs.If playlist is requested immediately after 1 seconds and new segment is not available, server can send the old playlist. In that case client should wait for one-half of a target duration before retrying. After one-half of target duration i.e after 1 seconds next segments either 1.2 sec segment or 1.8 sec is expected to be available.

Q: When should client request for new playlist?

A: Client MUST wait for at least the target duration before attempting reload after first playlist or identifying that playlist has changed.