New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freeze availabilityStartTime and adjust timeShiftBufferDepth #48
Freeze availabilityStartTime and adjust timeShiftBufferDepth #48
Conversation
I'll check this. Idea looks good. But start_time modification a little confusing. |
Yes exactly. According to the DASH spec, it should never change (even though a bit counter-intuitive since Nginx starts removing segments after a while). Here are a few related bugs: Dash-Industry-Forum/dash.js#531 |
Looks like Wowza had this bug too. They introduced "mpegdashStrictSpecComplianceForAST" config flag for the same reasons. Maybe this patch could be toggled on/off through nginx.conf. |
I'm about that code: Maybe it must refer to |
Can you post two examples of mpd - before and after code changes? |
Ah I understand what you mean. But no I don't think so. The timestamp of the first fragment will change over time when Nginx starts removing fragments. To follow the spec, it should always be the same for the whole duration of the stream. |
Sure I will post them. Give me a few minutes. Also, I found a little mistake in my patch. I will correct it (the msec should have 2 decimals places, but since the value could be > 100, there would be 3 decimal places). |
Here's the relevant parts in the MPD file with 2 decimals places (patch coming) with my branch: One of the first MPD:
After a few seconds:
|
Alright, changes are in. Only 2 decimals places for msec are allowed in spec (according to what I could find online). I tried adding days but it seems Dash.js can't parse the timestamps anymore. |
For days string must be like According to durationRegex here: https://github.com/Dash-Industry-Forum/dash.js/blob/development/src/dash/DashParser.js And months and years are not precise counters. So better keep days only: |
You're right I was using the wrong format. Here's the correct one on Wikipedia: https://en.wikipedia.org/wiki/ISO_8601#Durations Patch coming. |
Live streams works like expected now? |
With my branch and latest dash.js, yes.
|
Freeze availabilityStartTime and adjust timeShiftBufferDepth
Merged |
Fix gcc warning in cd416d5 |
I was not able to use Dash.js to play live DASH stream. After much investigation, I figured that the standard says that availabilityStartTime should not increase (in the MPD file). I created a patch that freezes availabilityStartTime and adjusts timeShiftBufferDepth instead. Now my live streams play perfectly. Tell me what you think.