Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adaptive Streaming player playlist update interval

Regarding the behavior of an adaptive streaming player (concretely I'm interested in HLS and DASH), how often should it reload the playlist? Is this specified or up to the player implementation?

When it reloads the playlist, is it done only for the so-called variant playlist or also the master is every time reloaded?

Is this different for live and for on demand content?

like image 533
Silvia Avatar asked Dec 06 '22 20:12

Silvia


2 Answers

For HLS see the General Client Responsabilities in the draft. Note this is for the latest version, if you need an older one check the other versions.

Some relevant excerpts:

You only reload LIVE and EVENT without EXT-X-ENDLIST media playlist (so no master reload)

The client MUST periodically reload a Media Playlist file to learn what media is currently available, unless it contains an EXT-X- PLAYLIST-TYPE tag with a value of VOD, or a value of EVENT and the EXT-X-ENDLIST tag is also present.

Reloading:

When a client loads a Playlist file for the first time or reloads a Playlist file and finds that it has changed since the last time it was loaded, the client MUST wait for at least the target duration before attempting to reload the Playlist file again, measured from the last time the client began loading the Playlist file.

If the client reloads a Playlist file and finds that it has not changed then it MUST wait for a period of one-half the target duration before retrying.

like image 60
aergistal Avatar answered Dec 28 '22 09:12

aergistal


In case of MPEG-DASH, the MPD specifies the minimumUpdatePeriod attribute which signals the client the smallest period between potential changes to the MPD. This helps the client application to determine the frequency at which it should update/re-download the MPD. If for example minimumUpdatePeriod is 10 seconds you could update/re-download the MPD every 10 seconds and you should be fine.

HLS does not contain a specific attribute for that (to the best of my knowledge -> the draft changes) but you can update the M3U8 based on the segment duration, e.g., if the playlist contains segments with 10s you should update every 10s (every 10s a new segment could be available in case of a live stream). If the segment duration varies you could calculate an average based on the segments that you already downloaded and update on that interval.

You could also take a look at existing implementations such as JWPlayer, which both support HLS and DASH. If you want to generate HLS and DASH content for testing you could use ffmpeg&mp4box.

like image 22
Christopher Mueller Avatar answered Dec 28 '22 09:12

Christopher Mueller