webmdashenc: parameter'ize minimumUpdatePeriod
Some players do not support setting minimumUpdatePeriod to zero. This patch adds a new parameter that will let the users set any value to this field. Also updates the test and the documentation. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ba625dd8a1
commit
f82ce6aa88
@ -1253,6 +1253,10 @@ Smallest time (in seconds) shifting buffer for which any Representation is
|
|||||||
guaranteed to be available. This will go in the @samp{timeShiftBufferDepth}
|
guaranteed to be available. This will go in the @samp{timeShiftBufferDepth}
|
||||||
attribute of the @samp{MPD} element. Default: 60.
|
attribute of the @samp{MPD} element. Default: 60.
|
||||||
|
|
||||||
|
@item minimum_update_period
|
||||||
|
Minimum update period (in seconds) of the manifest. This will go in the
|
||||||
|
@samp{minimumUpdatePeriod} attribute of the @samp{MPD} element. Default: 0.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@subsection Example
|
@subsection Example
|
||||||
|
@ -56,6 +56,7 @@ typedef struct WebMDashMuxContext {
|
|||||||
int chunk_duration;
|
int chunk_duration;
|
||||||
char *utc_timing_url;
|
char *utc_timing_url;
|
||||||
double time_shift_buffer_depth;
|
double time_shift_buffer_depth;
|
||||||
|
int minimum_update_period;
|
||||||
int debug_mode;
|
int debug_mode;
|
||||||
} WebMDashMuxContext;
|
} WebMDashMuxContext;
|
||||||
|
|
||||||
@ -116,7 +117,7 @@ static void write_header(AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
avio_printf(s->pb, " availabilityStartTime=\"%s\"\n", gmt_iso);
|
avio_printf(s->pb, " availabilityStartTime=\"%s\"\n", gmt_iso);
|
||||||
avio_printf(s->pb, " timeShiftBufferDepth=\"PT%gS\"\n", w->time_shift_buffer_depth);
|
avio_printf(s->pb, " timeShiftBufferDepth=\"PT%gS\"\n", w->time_shift_buffer_depth);
|
||||||
avio_printf(s->pb, " minimumUpdatePeriod=\"0\"");
|
avio_printf(s->pb, " minimumUpdatePeriod=\"PT%dS\"", w->minimum_update_period);
|
||||||
avio_printf(s->pb, ">\n");
|
avio_printf(s->pb, ">\n");
|
||||||
avio_printf(s->pb, "<UTCTiming\n");
|
avio_printf(s->pb, "<UTCTiming\n");
|
||||||
avio_printf(s->pb, " schemeIdUri=\"%s\"\n",
|
avio_printf(s->pb, " schemeIdUri=\"%s\"\n",
|
||||||
@ -517,6 +518,7 @@ static const AVOption options[] = {
|
|||||||
{ "chunk_duration_ms", "duration of each chunk (in milliseconds)", OFFSET(chunk_duration), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
|
{ "chunk_duration_ms", "duration of each chunk (in milliseconds)", OFFSET(chunk_duration), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
|
||||||
{ "utc_timing_url", "URL of the page that will return the UTC timestamp in ISO format", OFFSET(utc_timing_url), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
|
{ "utc_timing_url", "URL of the page that will return the UTC timestamp in ISO format", OFFSET(utc_timing_url), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
|
||||||
{ "time_shift_buffer_depth", "Smallest time (in seconds) shifting buffer for which any Representation is guaranteed to be available.", OFFSET(time_shift_buffer_depth), AV_OPT_TYPE_DOUBLE, { .dbl = 60.0 }, 1.0, DBL_MAX, AV_OPT_FLAG_ENCODING_PARAM },
|
{ "time_shift_buffer_depth", "Smallest time (in seconds) shifting buffer for which any Representation is guaranteed to be available.", OFFSET(time_shift_buffer_depth), AV_OPT_TYPE_DOUBLE, { .dbl = 60.0 }, 1.0, DBL_MAX, AV_OPT_FLAG_ENCODING_PARAM },
|
||||||
|
{ "minimum_update_period", "Minimum Update Period (in seconds) of the manifest.", OFFSET(minimum_update_period), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ FATE_VP8-$(call DEMDEC, WEBM_DASH_MANIFEST, VP8) += fate-webm-dash-manifest-repr
|
|||||||
fate-webm-dash-manifest-representations: CMD = run ffmpeg -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video4.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" -
|
fate-webm-dash-manifest-representations: CMD = run ffmpeg -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video4.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" -
|
||||||
|
|
||||||
FATE_VP8-$(call DEMDEC, WEBM_DASH_MANIFEST, VP8) += fate-webm-dash-manifest-live
|
FATE_VP8-$(call DEMDEC, WEBM_DASH_MANIFEST, VP8) += fate-webm-dash-manifest-live
|
||||||
fate-webm-dash-manifest-live: CMD = run ffmpeg -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_video_360.hdr -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_audio_171.hdr -c copy -map 0 -map 1 -f webm_dash_manifest -live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 5000 -time_shift_buffer_depth 7200 -debug_mode 1 -
|
fate-webm-dash-manifest-live: CMD = run ffmpeg -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_video_360.hdr -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_audio_171.hdr -c copy -map 0 -map 1 -f webm_dash_manifest -live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 5000 -time_shift_buffer_depth 7200 -minimum_update_period 60 -debug_mode 1 -
|
||||||
|
|
||||||
FATE_SAMPLES_AVCONV += $(FATE_VP6-yes)
|
FATE_SAMPLES_AVCONV += $(FATE_VP6-yes)
|
||||||
fate-vp6: $(FATE_VP6-yes)
|
fate-vp6: $(FATE_VP6-yes)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
profiles="urn:mpeg:dash:profile:isoff-live:2011"
|
profiles="urn:mpeg:dash:profile:isoff-live:2011"
|
||||||
availabilityStartTime=""
|
availabilityStartTime=""
|
||||||
timeShiftBufferDepth="PT7200S"
|
timeShiftBufferDepth="PT7200S"
|
||||||
minimumUpdatePeriod="0">
|
minimumUpdatePeriod="PT60S">
|
||||||
<UTCTiming
|
<UTCTiming
|
||||||
schemeIdUri="urn:mpeg:dash:utc:direct:2012"
|
schemeIdUri="urn:mpeg:dash:utc:direct:2012"
|
||||||
value=""/>
|
value=""/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user