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

Rewrite timestamp intepretations using ticks #521

Merged
merged 25 commits into from Jan 30, 2022
Merged

Rewrite timestamp intepretations using ticks #521

merged 25 commits into from Jan 30, 2022

Conversation

robUx4
Copy link
Contributor

@robUx4 robUx4 commented Jun 27, 2021

Draft: the Block, TrackTimestampScale are not rewritten yet

The notion of Matroska/Segment/Track ticks is introduced to make it easier to know what formula to apply. For example Cluster\Timestamp is using the TimestampScale but NOT the TrackTimestampScale.

The Info\Duration is expressed in Segment Ticks, but it's in floating point which is odd, only Track Ticks may be in floating point due to TrackTimestampScale.

Fixes #517

@robUx4
Copy link
Contributor Author

@robUx4 robUx4 commented Jul 4, 2021

Still missing the rewrite of the TrackTimestampScale section.

Using more of the Segment/Track Tick unit to make things easier to explain.

@robUx4 robUx4 marked this pull request as ready for review Jul 11, 2021
@robUx4
Copy link
Contributor Author

@robUx4 robUx4 commented Jul 11, 2021

Ready for review: the TrackTimestampScale is removed as the default usage was wrong. The proper text will come in #437.

@robUx4 robUx4 changed the title Rewrite timestamp intepretations Rewrite timestamp intepretations using ticks Aug 8, 2021
@robUx4
Copy link
Contributor Author

@robUx4 robUx4 commented Aug 8, 2021

Cleaned up so all elements refer to a tick. We could remove the Matroska Ticks, just nanoseconds, to make this a bit lighter.

Depending if we chose to keep TrackTimestampScale or not, Track Ticks can be merged in Segment Ticks or not. In that case it's easier to remove Matroska Ticks and just keep the Segment Tick. (but I'm in favor or keeping TrackTimestampScale for good)

@robUx4
Copy link
Contributor Author

@robUx4 robUx4 commented Aug 27, 2021

Poke @mbunkus as this is also blocking #437

IMO the math is sound to use TrackTimestampScale to have more accurate timestamps. It may not be well supported in current players but it's definitely doable in the future without any additions to the format.

robUx4 added 8 commits Jan 23, 2022
Add SeekPreRoll and DiscardPadding which were missing a proper tick definition.
The file timestamps are in Segment Ticks.

Put the reseved status in usage notes
Unfortunately it's in nanoseconds (Matroska ticks) and not segment or track ticks
so it can (almost) never be sample accurate.
@robUx4
Copy link
Contributor Author

@robUx4 robUx4 commented Jan 23, 2022

Rebased and fixed a sentence. This seems mergeable.

Effectively reverts "rewrite the TimestampScale Rounding audio-only example"

This is not the preferred solution as it won't be backward compatible anyway.

Keep the rounding rules though as it's better than leaving people pick whatever
they want.
@robUx4
Copy link
Contributor Author

@robUx4 robUx4 commented Jan 23, 2022

And remove the section that explained how to get finer frame precision as it's not the way we're going to do it. (Ref #422 )

notes.md Outdated Show resolved Hide resolved
notes.md Outdated Show resolved Hide resolved
@robUx4 robUx4 merged commit 2a4aadf into master Jan 30, 2022
4 checks passed
@robUx4 robUx4 deleted the timestamp-values branch Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants