ABS HLS with GStreamer

Michiel Konstapel michiel at aanmelder.nl
Fri Jul 2 07:20:42 UTC 2021


On 26-06-2021 22:05, Samyak via gstreamer-devel wrote:
> Hey,
> I am trying to serve HLS content with adaptive bitrate streaming 
> using GStreamer. I know GStreamer has hlssink2 but I wonder if there's a 
> way for gstreamer to generate a primary manifest like described here: 
> https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/creating_a_primary_playlist 
> <https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/creating_a_primary_playlist>. 
> I am using gstreamer to transcode the input stream into multiple 
> resolutions and bitrates so is there a way to give this all to hlssink 
> so that it will generate the segments for all the resolutions that I am 
> serving as well as make the appropriate manifests? Also, is there any 
> way to force key frames to be 2 seconds apart?
> 
> Thanks!

I don't think gstreamer can generate the primary playlist. However, the 
format is quite simple, and it doesn't change while the stream is 
running, so it's fairly easy to generate that file yourself and link to 
the dynamically generated ones. If you want multiple bit rates, you have 
to set up separate encoder and hlssink(2) branches yourself.

hlssink2 will by default request key frames at segment boundaries 
(send-keyframe-requests) so if there is an encoder upstream, it should 
emit a key frame, allowing hlssink2 to start a new segment. The 
target-duration property determines the desired segment duration, so 
that's the interval at which it will request key frames.

Cheers,
Michiel


More information about the gstreamer-devel mailing list