Message ID | 20210624125808.45663-2-kevin@aiera.com |
---|---|
State | Withdrawn, archived |
Headers | show |
Series | [FFmpeg-devel,1/2] Fix double write of DASH manifest in streaming mode | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
Any feedback on this? On Jun 24, 2021, 8:58 AM -0400, Kevin LaFlamme <kevin@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); > avio_printf(out, "\t\t\t\t</SegmentList>\n"); > } > if (!c->lhls || final) { > -- > 2.31.1 >
On 6/24/21, 6:28 PM, "Kevin LaFlamme" <kevin@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 >
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@akamai.com>, wrote: > > > On 6/24/21, 6:28 PM, "Kevin LaFlamme" <kevin@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 > > >
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); avio_printf(out, "\t\t\t\t</SegmentList>\n"); } if (!c->lhls || final) {