[vlc-devel] HttpLive: ChooseSegment function

Łukasz Korbel korbel85 at gmail.com
Mon Mar 5 20:39:42 CET 2012


In current version of httplive module its always choosed last but
three segment from playlist
(http://git.videolan.org/?p=vlc.git;a=commit;
=7b9b81d93cd4b47532dd79ea744f0dce028d4698)

HLS specification says: "The client SHALL choose which media file to
play first from the Playlist when playback starts.  If the Playlist
file contains the EXT-X-ENDLIST tag, any file in the Playlist MAY be
played first. If the EXT-X-ENDLIST tag is not present, any file except
for the last and second-to-last files in the playlist MAY be played
first." (http://tools.ietf.org/html/draft-pantos-http-live-streaming-00#section-6.2.2)

In some cases (e.g. when segments are very short) playing always last
but three segment maybe not the best solution.
I suggest to implement option for httplive module so the user can
decide from which segment in the playlist to start.

The one of possible solutions is to make hls-delay value in seconds.
It will describe how far before list end should playback starts.
Having such delay in seconds will be more intuitive for user and will
give ability to control how m3u8 playlist is handled. If someone want
to start always from first segment it could be special value like
delay=-1. Imho such flexibility will serves users better than
arbitrary condition (especially HSL draft leaves such choice to client
application). I'm able to write such modification if you agree.



More information about the vlc-devel mailing list