[FFmpeg-devel] [PATCH] avformat/hlsenc: Port support for LHLS from lavf/dashenc

Michael Niedermayer michael at niedermayer.cc
Thu Mar 28 19:16:29 EET 2019


On Wed, Mar 27, 2019 at 11:08:02AM +0200, Zenon Mousmoulas wrote:
> Add experimental support for LHLS (low-latency HLS), following what
> was introduced to lavf/dashenc in f22fcd4483f.
> ---
>  doc/muxers.texi           |  6 +++++
>  libavformat/dashenc.c     |  2 +-
>  libavformat/hlsenc.c      | 63 ++++++++++++++++++++++++++++++++++++++---------
>  libavformat/hlsplaylist.c | 28 +++++++++++++--------
>  libavformat/hlsplaylist.h |  3 ++-
>  5 files changed, 79 insertions(+), 23 deletions(-)
> 
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index aac7d94edf..4ebaf559c5 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -1067,6 +1067,12 @@ Set timeout for socket I/O operations. Applicable only for HTTP output.
>  @item -ignore_io_errors
>  Ignore IO errors during open, write and delete. Useful for long-duration runs with network output.
>  
> + at item -lhls @var{lhls}
> +Enable low-latency HLS (LHLS). Adds #EXT-X-PREFETCH tag with current segment's URI.
> +Apple does not have an official spec for LHLS. Meanwhile hls.js player folks are
> +trying to standardize an open LHLS spec. The draft spec is available in https://github.com/video-dev/hlsjs-rfcs/blob/lhls-spec/proposals/0001-lhls.md
> +This is an experimental feature.
> +
>  @end table
>  
>  @anchor{ico}
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 1b74bce060..04950222d3 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -483,7 +483,7 @@ static void write_hls_media_playlist(OutputStream *os, AVFormatContext *s,
>                                  (double) seg->duration / timescale, 0,
>                                  seg->range_length, seg->start_pos, NULL,
>                                  c->single_file ? os->initfile : seg->file,
> -                                &prog_date_time);
> +                                &prog_date_time, 0);
>          if (ret < 0) {
>              av_log(os->ctx, AV_LOG_WARNING, "ff_hls_write_file_entry get error
> ");

patch corrupted by newlines

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190328/fc286b72/attachment.sig>


More information about the ffmpeg-devel mailing list