hlssink: to include BANDWIDTH tag
Submitted by Andy S
Link to original bug (#777229)
Description
Would it be possible to change the hlssink to allow adaptive bitrate streaming?
This would mean that the #EXT-X-STREAM-INF:BANDWIDTH=1280000 type tag is written to the playlist file. Multiple bandwidth tags would be written to the playlist file to allow the client to choose which bandwidth is best for the current connection.
See here for more info:
https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-4.3.4.2
It says:
4.3.4.2. EXT-X-STREAM-INF
The EXT-X-STREAM-INF tag specifies a Variant Stream, which is a set
of Renditions which can be combined to play the presentation. The
attributes of the tag provide information about the Variant Stream.
The URI line that follows the EXT-X-STREAM-INF tag specifies a Media
Playlist that carries a Rendition of the Variant Stream. The URI
line is REQUIRED. Clients that do not support multiple video
renditions SHOULD play this Rendition
Its format is:
#EXT-X-STREAM-INF:<attribute-list>
<URI>
The following attributes are defined:
BANDWIDTH
The value is a decimal-integer of bits per second. It represents
the peak segment bit rate of the Variant Stream.
If all the Media Segments in a Variant Stream have already been
created, the BANDWIDTH value MUST be the largest sum of peak
segment bit rates that is produced by any playable combination of
Renditions. (For a Variant Stream with a single Media Playlist,
this is just the peak segment bit rate of that Media Playlist.)
An inaccurate value can cause playback stalls or prevent clients
from playing the variant.
If the Master Playlist is to be made available before all Media
Segments in the presentation have been encoded, the BANDWIDTH
value SHOULD be the BANDWIDTH value of a representative period of
similar content, encoded using the same settings.
Every EXT-X-STREAM-INF tag MUST include the BANDWIDTH attribute.
AVERAGE-BANDWIDTH
The value is a decimal-integer of bits per second. It represents
the average segment bit rate of the Variant Stream.
If all the Media Segments in a Variant Stream have already been
created, the AVERAGE-BANDWIDTH value MUST be the largest sum of
average segment bit rates that is produced by any playable
combination of Renditions. (For a Variant Stream with a single
Media Playlist, this is just the average segment bit rate of that
Media Playlist.) An inaccurate value can cause playback stalls or
prevent clients from playing the variant.
If the Master Playlist is to be made available before all Media
Segments in the presentation have been encoded, the AVERAGE-
BANDWIDTH value SHOULD be the AVERAGE-BANDWIDTH value of a
representative period of similar content, encoded using the same
settings.
The AVERAGE-BANDWIDTH attribute is OPTIONAL.
Version: 1.10.2