[FFmpeg-trac] #1842(undetermined:open): create better HTTP Live Streaming with segment

FFmpeg trac at avcodec.org
Thu Nov 22 01:10:02 CET 2012


#1842: create better HTTP Live Streaming with segment
-------------------------------------+-------------------------------------
             Reporter:  teric        |                    Owner:
                 Type:  enhancement  |                   Status:  open
             Priority:  wish         |                Component:
              Version:  1.0          |  undetermined
             Keywords:               |               Resolution:
  segment,hls,m3u8                   |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by brownard):

 The problem is that the segmenter doesn't correctly increment the #EXT-X
 -MEDIA-SEQUENCE tag as per the spec and I don't think the -segment-list-
 size works as the spec envisages.
 The current behaviour is to completely empty the playlist when it reaches
 the specified size and increment the #EXT-X-MEDIA-SEQUENCE tag by 1
 e.g

 {{{
 #EXTM3U
 #EXT-X-MEDIA-SEQUENCE:0
 #EXT-X-TARGETDURATION:10
 #EXTINF:10,
 000.ts
 #EXTINF:10,
 001.ts
 #EXTINF:10,
 002.ts

 .....

 #EXTM3U
 #EXT-X-MEDIA-SEQUENCE:1
 #EXT-X-TARGETDURATION:10
 #EXTINF:10,
 003.ts

 .....

 #EXTM3U
 #EXT-X-MEDIA-SEQUENCE:1
 #EXT-X-TARGETDURATION:10
 #EXTINF:10,
 003.ts
 #EXTINF:10,
 004.ts
 }}}

 but the #EXT-X-MEDIA-SEQUENCE tag should be equal to the index of the
 first segment in the list, so in the example above the value in the second
 and third playlist should be 3 not 1 because the first segment in the list
 is the fourth overall.

 What should happen is rather than emptying the playlist, the first item in
 the list should be removed and the new item appended so you have a
 "sliding window" with the #EXT-X-MEDIA-SEQUENCE increasing by 1 each time
 e.g

 {{{
 #EXTM3U
 #EXT-X-MEDIA-SEQUENCE:0
 #EXT-X-TARGETDURATION:10
 #EXTINF:10,
 000.ts
 #EXTINF:10,
 001.ts
 #EXTINF:10,
 002.ts

 .....

 #EXTM3U
 #EXT-X-MEDIA-SEQUENCE:1
 #EXT-X-TARGETDURATION:10
 #EXTINF:10,
 001.ts
 #EXTINF:10,
 002.ts
 #EXTINF:10,
 003.ts

 .....

 #EXTM3U
 #EXT-X-MEDIA-SEQUENCE:2
 #EXT-X-TARGETDURATION:10
 #EXTINF:10,
 002.ts
 #EXTINF:10,
 003.ts
 #EXTINF:10,
 004.ts
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1842#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list