hlsenc: single_file, support HLS ver 4 byteranges

Multimedia / FFmpeg - Mika Raento [elisa.fi] - 15 September 2014 15:16 UTC

This adds a new option -hls_flags single_file that creates one .ts file for HLS and adds byteranges to the .m3u8 file, instead of creating one .ts file for each segment.

This is helpful at least for storing large number of videos, as the number of files per video is drastically reduced and copying and storing those files takes less requests and inodes.

This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel in July 2014. That patch seems abandoned by the author, and contained unrelated changes. This patch tries to add the minimum amount of code to support the byterange playlists.

f685f7d hlsenc: single_file, support HLS ver 4 byteranges
doc/muxers.texi | 23 ++++++++++++++----
libavformat/hlsenc.c | 64 ++++++++++++++++++++++++++++++++++++++++----------
2 files changed, 71 insertions(+), 16 deletions(-)

  • Share