-
Notifications
You must be signed in to change notification settings - Fork 63
Add a tolerance of one second to MO duration sums equalling the total #2106
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
Conversation
|
+1 to indicate tolarance for rounding off errors. |
I believe it is cleaner. Otherwise, it becomes an RS or checker dependency and possibly an interoperability issue. I cannot comment whether it should be 1sec or less. For a layperson like me, 1 sec seems to be enough, because it is just a global indication for the RS. But I leave this to experts. |
Right, and this is what causes complaints in the epubcheck tracker. If we don't formalize in the specification, then we open the door to people demanding other tolerances or no tolerance.
This is why I suggested we should discuss on a call before accepting this PR. Like Ivan, I'm not sure what specificity most authors/tools use, so I'm not sure how big a discrepancy we might get. Over 100+ files of Moby Dick, for example, small rounding differences could add up, but to what I'm not sure. It's easy enough to adjust the tolerance from this default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending the approval of the default tolerance threshold by the WG.
|
The issue was discussed in a meeting on 2022-03-25 List of resolutions:
View the transcript1. Tolerance margin for the sum of MO durations? (issue epub-specs#2093)See github issue epub-specs#2093. See github pull request epub-specs#2106. Dave Cramer: we say the sum of the duration for each MO document should equal the total duration, but we've never specified a margin or tolerance for this. Avneesh Singh: I think this is not controversial. Ivan Herman: what I learned when I made tests, is that this value which is in the manifest is there to check the data. Ivan Herman: I can't say whether or not that is so, but if it is just for checking purposes, then allowing some rounding error is fine. Zheng Xu (徐征): from what i've implemented, the duration is variable for different players on different platforms. Avneesh Singh: regarding 1 second, i feel this is more than enough. Maximum 50 ms is what i've used in the past. Brady Duga: can epubcheck just tell you the total duration value that should be in the manifest?. Matt Garrish: epubcheck is checking the total time, yes. I guess it could output that value.. GeorgeK: my recollection is that its difficult to calculate some of these things precisely, depending upon the compression that is being used, resulting in it being off by a smidgen in each file.
Zheng Xu (徐征): as a RS I appreciate having the duration values for the whole book, and for each file. Dave Cramer: i'm not hearing an argument against the 1 sec tolerance.
|
I've added a tolerance to the recommendation per the discussion in #2093. I've also added a note to explain why we have this tolerance.
This is probably another to take to the WG to discuss before merging, though, since it changes the recommendation.
Fixes #2093
Preview | Diff