[FFmpeg-user] How to generate the first few HLS playlist files for a live broadasting event?

sergiogiogio at ovi.com sergiogiogio at ovi.com
Sat Mar 1 12:31:23 CET 2014


Hello

Knowing that HLS is based on a playlist of N segment files, how to properly generate the first (N-1) playlist files for a live broadcasting event (sliding window method)? - should we wait for the first N segments to be recorded, and send a complete first playlist file? This of course works but means that there is a delay of N x segment_duration before streaming starts. - or is there an official way of sending "partial" playlist files such that streaming starts after 1 x segment_duration?

I have experimented with partial playlist files: ffmpeg 2.1.3 appends new segments into the playlist as they are recorded (below). I find this a reasonable way but my ipod5 usually stops playback after the first playlist or sometimes manages to playback the first few playlists but with much choppiness, so I believe it is not a supported way. Is there any official solution?

1st playlist file:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:8
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:8,
segment0.ts
2nd playlist file:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:8
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:8,
segment0.ts
#EXTINF:1,
segment1.ts
3rd playlist file:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:8
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:8,
segment0.ts
#EXTINF:1,
segment1.ts
#EXTINF:8,
segment2.ts


More information about the ffmpeg-user mailing list