HLS and keyframes

Dave Walker dave at happybits.co
Thu Mar 6 09:01:48 PST 2014


I hadn't seen EXT-X-MAP before - neat.

I'm only using a single playlist, not a master with different sub-playlists
for different bitrates. So the behavior I'm seeing isn't related to bitrate
changes. But I'm on 1.2, which I'm now realizing isn't up to date enough.
I'll get up to date and then report back.

Andoni, Sebastian, thanks to you both.

Dave


On Thu, Mar 6, 2014 at 8:30 AM, Andoni Morales <ylatuya at gmail.com> wrote:

>
>
>
> 2014-03-06 16:19 GMT+01:00 Dave Walker <dave at happybits.co>:
>
> The spec I'm reading seems looser than that:
>> http://tools.ietf.org/html/draft-pantos-http-live-streaming-12, with
>> SHOULD language instead of MUST. Particularly in the presence of the new
>> byte range segments (which I know aren't supported by gstreamer yet) I
>> wouldn't think it would be desirable to force every segment to have its own
>> PPS/SPS.
>>
>
> Byterange segments are the same as file segments, except they are packet
> in a single file, so each "virtual" segment (as defined in the playlist
> with the range start-stop) should be able to initialize itself. SPS/PPS are
> not needed at the beginning of the segment the EXT-X-MAP tag is provided,
> but when it's not there there having these headers is the only way to
> warranty that playback can start at any segment.
>
> Andoni
>
>>
>> But my question is more about the behavior I'm seeing. Would you expect
>> me to be getting glitches and dropouts with segments that *don't* start
>> with a keyframe and PPS/SPS? Does the next stage in the pipeline treat each
>> segment independently, rather than as one big continuous stream? If it's
>> all one big stream I wouldn't think it would matter where the boundaries
>> between segments are.
>>
>> Dave
>>
>>
>> On Thu, Mar 6, 2014 at 5:34 AM, Andoni Morales <ylatuya at gmail.com> wrote:
>>
>>>
>>>
>>>
>>> 2014-03-06 4:46 GMT+01:00 Dave Walker <dave at happybits.co>:
>>>
>>> I'm experimenting with the HLS plugin, and have found that playback
>>>> behaves much, much better if HLS segments begin with a key frame. Without
>>>> key frames at the beginning I get skipping, dropped frames, and other
>>>> glitches.
>>>>
>>>> I'm wondering why that is? I'm imagining that the HLS demuxer is simply
>>>> responsible for fetching new content and providing it in a continuous
>>>> stream to the next element in the pipeline. If that's the case then the
>>>> exact boundaries between segments wouldn't matter.
>>>>
>>>> I definitely understand that for seeking, keyframes at the start of
>>>> segments is crucial. But I'm just doing live streaming.
>>>>
>>>
>>> HLS segment *must* start with a PPS/SPS + Keyframe, this is mandatory in
>>> the spec. Even if you are not seeking and only doing live streaming, the
>>> client will start play at any segment and therefore this segment must be
>>> able to initialize the decoder correctly. You are also switching bitrates,
>>> which means the segment for the new bitrate must also start with a keyframe
>>> for a correct transition.
>>>
>>> Cheers,
>>> Andoni
>>>
>>>>
>>>> Thanks.
>>>>
>>>> Dave
>>>>
>>>> _______________________________________________
>>>> gstreamer-android mailing list
>>>> gstreamer-android at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>>>>
>>>>
>>>
>>>
>>> --
>>> Andoni Morales Alastruey
>>>
>>> LongoMatch:The Digital Coach
>>> http://www.longomatch.ylatuya.es
>>>
>>> _______________________________________________
>>> gstreamer-android mailing list
>>> gstreamer-android at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>>>
>>>
>>
>> _______________________________________________
>> gstreamer-android mailing list
>> gstreamer-android at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>>
>>
>
>
> --
> Andoni Morales Alastruey
>
> LongoMatch:The Digital Coach
> http://www.longomatch.ylatuya.es
>
> _______________________________________________
> gstreamer-android mailing list
> gstreamer-android at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20140306/65016e9f/attachment.html>


More information about the gstreamer-android mailing list