Recording · function
frameTimestampUs
Microseconds for frame index at fps.
Explained in Recording and clips.
function frameTimestampUs(index: number, fps: number): numberimport { frameTimestampUs } from '@driftengine/media';Parameters
| Parameter | Type | Description |
|---|---|---|
index | number | |
fps | number |
In depth
The product is rounded, never a per-frame constant accumulated. A 60 fps frame is 16666.67 µs and the nearest integer is 16667, which is a third of a microsecond long — trivial once and 20 ms over a minute, which is more than a frame of drift by the end of a clip. Deriving each stamp from its own index cannot drift at all.