[FFmpeg-devel] [PATCH 2/2] Advertise current segment in streaming mode

Kevin LaFlamme kevin at aiera.com
Wed Jul 14 17:48:41 EEST 2021


Ah I didn’t realize the SegmentTemplate was actually required in the spec for streaming mode. This should be closed then, thanks.
On Jul 14, 2021, 10:45 AM -0400, Jeyapal, Karthick <kjeyapal at akamai.com>, wrote:
>
>
> On 6/24/21, 6:28 PM, "Kevin LaFlamme" <kevin at aiera.com> wrote:
>
> > In streaming mode when using a segment list, the current segment should
> > be listed so that clients can immediately request it even before
> > complete. Without this, even though the segment is being written in a
> > way that it can be requested while still writing, clients won't know
> > it's available.
> > ---
> > libavformat/dashenc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> > index 2b8fbcbe6e..901999324f 100644
> > --- a/libavformat/dashenc.c
> > +++ b/libavformat/dashenc.c
> > @@ -706,6 +706,8 @@ static void output_segment_list(OutputStream *os, AVIOContext *out, >AVFormatCont
> > Segment *seg = os->segments[i];
> > avio_printf(out, "\t\t\t\t\t<SegmentURL media=\"%s\" />\n", seg->file);
> > }
> > + if (c->streaming)
> > + avio_printf(out, "\t\t\t\t\t<SegmentURL media=\"%s\" />\n", os->filename);
> As far as I understand the streaming mode is better supported only with SegmentTemplate.
> Adding the yet-to-be-completed segment in the SegmentList might break some backward compatibility with clients that doesn't support low latency streaming.
> After we added streaming support in ffmpeg, DASH-IF came up with a spec for low latency streaming.
> https://dashif.org/docs/CR-Low-Latency-Live-r8.pdf. This spec also specifies that SegmentTemplate is mandatory for low latency streaming.
> > avio_printf(out, "\t\t\t\t</SegmentList>\n");
> > }
> > if (!c->lhls || final) {
> > --
> > 2.31.1
> >
>


More information about the ffmpeg-devel mailing list