3.2 Time Representation¶
The API uses a flexible scheme to represent time values which can maintain accuracy for any video or audio rate. Time is always represented as a time scale and a time value. The time scale is a unit of ticks per second specified by the API user. Time values are represented as a number of time units since playback or capture began. The API user should choose a time scale value appropriate to the type of video or audio stream being handled. Some examples are provided below:
Stream type |
Suggested time scale |
Frame time values |
---|---|---|
24 fps video |
24000 |
0, 1000, 2000, 3000… |
23.98 fps video |
24000 |
0, 1001, 2002, 3003… |