hlsdemux: using iframe playlists when seeking
dpalmer at digisoft.tv
Thu Dec 4 21:55:48 PST 2014
I'm finding that seek performance with hlsdemux is poor when seeking
to a time near the end of a segment. This is because the entire
segment is pushed through the pipeline - most of it is not decoded,
but with HD streams, the volume of data is high enough that it takes 2
or 3 seconds for data at the correct offset to arrive at the decoders,
if I seek to somewhere near the end of a 10 second segment.
I'm looking at using iframe playlists in hlsdemux to enable it to seek
to the correct offset within a segment. I think this can be
Modifying gst_hls_demux_src_event() so that it does something like the
- switch to the iframe playlist
- determine the offset within the current segment corresponding to the
seek position. Store this in demux->client->partial_range_start (new
- switch back to the regular playlist
Modifying gst_m3u8_client_get_next_fragment() so that rather than
using the offset it's just read from the m3u8 file, use
demux->client->partial_range_start, just once.
I've attached a patch which implements the core part of this idea (it
compiles, but it untested, and undoubtedly has bugs and missing bits).
Would anyone like to comment on this approach? Can you think of a
neater way to do it?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7017 bytes
Desc: not available
More information about the gstreamer-devel