[Matroska-devel] Re: Timestamp precision in matroska files
paul at msn.com
Wed Jan 7 04:39:41 CET 2004
<DEATH> must be enough to point any sample with time values
<ChrisHJW> 1 / 44100 = 22 µs ?
<ChrisHJW> 1 / 48000 = 20 µs ?
<ChrisHJW> Hmm .... so even 10 µs would help much, right ? you need 1 µs ?
<ChrisHJW> or is 10 µs ok ?
<Case> is not for high rates
<DEATH> 10 looks like it could be enough
<DEATH> for 48000hz that is
<DEATH> how about just making it equal to samplerate ?
<ChrisHJW> Case : 96 KHz is quite unlikely to be lossy compressed ?
<Case> no it isn't
<ssamadhi97> think dvd audio
For 96KHz audio (96,000 samples/second), a single sample lasts 10,417ns. So,
for sample accurate seeking you could set the time TimecodeScale to 10,417ns,
giving you an accuracy of within 1ns for a single sample. The default is
1,000,000ns, or 1ms. This would decrease the maximum possible cluster size from
64 seconds to .64 seconds. The overhead would probably balloon quite a bit. If
a Block were created that used 32bit timecodes, you could have much larger
clusters again, but you would have to deal with an extra byte for every Block2.
Even with lacing, this would probably still be to much overhead.
If you find it to be such a big concern, then set the TimecodeScale to 104,167ns
and you will have 10 sample accuracy on the timecodes. The clusters could still
only be a max size of about 6.4 seconds, but that is much better the 0.64.
Also, even a Vorbis sample only has a minimum size of 64 samples, meaning that
you could never be off by even 1/6th of a packet.
Honestly this whole discussion is pretty idiotic since on the absolute highest
consumer audio samplerate available (96KHz), and using the default 1ms
TimecodeScale, you could only be off a maximum of about 99 samples, WHILE
SEEKING. 99 samples! Less than a millisecond! Most likely around half a
millisecond. And that is with 96KHz!
<Case> ChrisHJW: that inaccuracy in matroska must cause sync problems with
video and audio
<Case> and make inaccurate video seeking also impossible
<DEATH> not with +-1ms inaccuracy
<DEATH> i wonder what kind of sound lag console/whatever emulators have
<ChrisHJW> Case : you wont notice a lag between video and audio of 1 ms
<Case> that's still unacceptable
<DEATH> Case: emulators probably have 30ms+ sound lag, and people still dont
<ChrisHJW> even 100 ms are hard to distinguish
Exactly. Most people can't tell 100ms off. 30ms is pretty much impossible.1ms
IS impossible. But even if it weren't impossible to tell 1ms, the format is
designed allow greater accurracy.
Please stop the insanity that is shown in the rest of this thread. There is no
need to add such awful hacks to Matroska. Just use what you already have.
More information about the Matroska-devel