All work fine but i would like to know if it's possible to reduce suggestedPresentationDelay in dash manifest to limit stream delay at just the timeShiftBufferDepth.
When i see the video in dash.js client the delay is approximately the sum of this two values (suggestedPresentationDelay+ timeShiftBufferDepth) -> 9s delay.
After many tests on dash_fragment and dash_playlist_length, it seems to be not possible to down under dash_fragment 1s.
dash_playlist_length cannot be set under 2 * dash_fragment duration.
manifest.mpd is not created on server so player can't get him to play video.
dash_fragment 1s and dash_playlist_length 2s generate a stable timeShiftBufferDepth of 4s.
sergey-dryabzhinsky nginx-rtmp-module
Stream working
ngx_rtmp_dash_module.c line 455
update_period = dacf->fraglen;
for (i = 0; i < ctx->nfrags; i++) {
f = ngx_rtmp_dash_get_frag(s, i);
if (f->duration > update_period) {
update_period = f->duration;
}
}
// Reasonable delay for streaming
presentation_delay = update_period * 2 + 1000;
presentation_delay_msec = presentation_delay % 1000;
presentation_delay -= presentation_delay_msec;
presentation_delay /= 1000;
// Calculate msec part and seconds
update_period_msec = update_period % 1000;
update_period -= update_period_msec;
update_period /= 1000;
// Buffer length by default fragment length
buffer_time = dacf->fraglen;
buffer_time_msec = buffer_time % 1000;
buffer_time -= buffer_time_msec;
buffer_time /= 1000;
// Fill DASH header
p = ngx_slprintf(buffer, last, NGX_RTMP_DASH_MANIFEST_HEADER,
// availabilityStartTime
avaliable_time,
// publishTime
publish_time,
// minimumUpdatePeriod
update_period, update_period_msec,
// minBufferTime
buffer_time, buffer_time_msec,
// timeShiftBufferDepth
buffer_depth,
// suggestedPresentationDelay
presentation_delay, presentation_delay_msec
);
fraglen is dash_fragment in milliseconds.
set dash_fragment 1s -> fraglen 1000ms .
minimumUpdatePeriod should be 1s -> 2s written .
minBufferTime 1s.
timeShiftBufferDepth should be 1s -> 4s written
suggestedPresentationDelay should be 3s -> 5s written
Why so big differences about header calcul values ?
This will be wonderfull if we can decrease timeShiftBufferDepth and or suggestedPresentationDelay for live.
Let me know if this is a possible way or if DASH can't do better than 10sec of delay.
Hello,
I stream rtsp camera ip which is redirect to rtmp server for dash and hls. Dash manifest is played with dash.js and hls with vlc.
All work fine but i would like to know if it's possible to reduce
suggestedPresentationDelay
in dash manifest to limit stream delay at just thetimeShiftBufferDepth
.When i see the video in dash.js client the delay is approximately the sum of this two values (suggestedPresentationDelay+ timeShiftBufferDepth) -> 9s delay.
After many tests on
dash_fragment
anddash_playlist_length
, it seems to be not possible to down underdash_fragment 1s
.dash_playlist_length
cannot be set under2 * dash_fragment
duration. manifest.mpd is not created on server so player can't get him to play video.dash_fragment 1s
anddash_playlist_length 2s
generate a stabletimeShiftBufferDepth
of 4s.sergey-dryabzhinsky nginx-rtmp-module Stream working
with sergey-dryabzhinsky nginx-rtmp-module
arut nginx-rtmp-module Stream not working
with arut nginx-rtmp-module
Why so big differences about header calcul values ?
This will be wonderfull if we can decrease timeShiftBufferDepth and or suggestedPresentationDelay for live. Let me know if this is a possible way or if DASH can't do better than 10sec of delay.
Best regards and thanks a lot for your job !