[FFmpeg-trac] #6888(avformat:new): HLS segmenter doesn't cut .m4s files at its expected duration

FFmpeg trac at avcodec.org
Thu Dec 14 11:22:38 EET 2017


#6888: HLS segmenter doesn't cut .m4s files at its expected duration
------------------------------------+------------------------------------
             Reporter:  beloko      |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  HLS         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by j_karthic):

 While this bug gets fixed in HLS segmenter, you could DASH segmenter as a
 workaround. Please note DASH segmenter is also capable of generating HLS
 playlists. I have tried the following command in latest ffmpeg and it
 generates the segments correctly.


 {{{
 ffmpeg -i
 "http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"
 -loglevel verbose -threads 0 -an -sn -vcodec libx264 -x264opts scenecut=-1
 -force_key_frames "expr:gte(t,n_forced*4)" -r 25  -min_seg_duration
 4000000 -window_size 99999  -t 30 -hls_playlist 1 /tmp/big_bunny.mpd
 }}}

 The above command will generate HLS playlist with the name media_0.m3u8,
 in the same folder as the output mpd file. You can ignore the
 big_bunny.mpd file that gets created.

 {{{
 akamai at akamai-VirtualBox:~/ffmpeg$ cat /tmp/media_0.m3u8
 #EXTM3U
 #EXT-X-VERSION:6
 #EXT-X-TARGETDURATION:4
 #EXT-X-MEDIA-SEQUENCE:1
 #EXT-X-MAP:URI="init-stream0.m4s"
 #EXTINF:4.000000,
 chunk-stream0-00001.m4s
 #EXTINF:4.000000,
 chunk-stream0-00002.m4s
 #EXTINF:4.000000,
 chunk-stream0-00003.m4s
 #EXTINF:4.000000,
 chunk-stream0-00004.m4s
 #EXTINF:4.000000,
 chunk-stream0-00005.m4s
 #EXTINF:4.000000,
 chunk-stream0-00006.m4s
 #EXTINF:4.000000,
 chunk-stream0-00007.m4s
 #EXTINF:2.000000,
 chunk-stream0-00008.m4s
 #EXT-X-ENDLIST
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6888#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list