How to create byte-range m3u8 playlist for HLS?

前端 未结 4 814
旧巷少年郎
旧巷少年郎 2021-02-01 08:49

Apple gives an example of support for byte-range segments in m3u8 files for HLS

#EXTM3U
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-VERSION:4
#EXTINF         


        
4条回答
  •  难免孤独
    2021-02-01 09:17

    There is -hls_flags as a ffmpeg option. (https://www.ffmpeg.org/ffmpeg-formats.html)

    Following command generates single ts file which is segmented by byte range feature(supported from HLS version 4) in m3u8 index file.

    $ ffmpeg -i sample.mp3 -hls_time 20 -hls_flags single_file out.m3u8
    

提交回复
热议问题