Skip to content
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

[WebM] Seen a lot of small gaps when trying to package an existing WebM input #68

Closed
kqyang opened this issue Jan 20, 2016 · 1 comment
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly

Comments

@kqyang
Copy link
Collaborator

kqyang commented Jan 20, 2016

Test file: https://commons.wikimedia.org/wiki/File:Sintel_webm_extract.webm

[0120/102238:WARNING:mpd_builder.cc(1259)] Found a gap of size 170000 > kRoundingErrorGrace (5). The new segment starts at 10667000 but the previous segment ends at 10497000.
[0120/102238:WARNING:mpd_builder.cc(1259)] Found a gap of size 168000 > kRoundingErrorGrace (5). The new segment starts at 21167000 but the previous segment ends at 20999000.
[0120/102238:WARNING:mpd_builder.cc(1259)] Found a gap of size 165000 > kRoundingErrorGrace (5). The new segment starts at 31500000 but the previous segment ends at 31335000.
[0120/102238:WARNING:mpd_builder.cc(1259)] Found a gap of size 164000 > kRoundingErrorGrace (5). The new segment starts at 41750000 but the previous segment ends at 41586000.
...

Investigated into the problem, and found out that: we set the duration for every sample to track level default duration; however, the actual duration or more precisely, the time stamp difference between two consecutive samples are not exactly the same as track level default duration. The difference is small for each individual samples, e.g. 42ms vs 41ms. However, the difference is accumulated and grows to a large value. That is what we are seeing in the warning.

To fix the problem, we should not use track level default duration. Instead, we should compute the duration from next sample instead.

@kqyang kqyang added the type: bug Something isn't working correctly label Jan 20, 2016
@kqyang kqyang self-assigned this Jan 20, 2016
kqyang added a commit that referenced this issue Jan 21, 2016
- dts was not set earlier, although for WebM, we could assume that
  dts is the same as pts.
- Calculate block duration with the difference with the next block
  if duration is not encoded, even if track default_duration is set.
- Use track default_duration as a duration estimate for the last
  block.
- This also removes opus duration computation from encoded data.

Issues #67, #68

Change-Id: Icaa2769dcb2a89269ae014f44ad6a9262770aed2
@kqyang
Copy link
Collaborator Author

kqyang commented Jan 22, 2016

Fixed.

@kqyang kqyang closed this as completed Jan 22, 2016
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 19, 2018
@shaka-project shaka-project locked and limited conversation to collaborators Apr 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants