3 ms·
Many multimedia formats, frameworks and libraries actually store them that way. In Mpeg 4, each track header has a “time scale” integer field. For a video trac
by Const-me 4y ago
Many multimedia formats, frameworks and libraries actually store them that way.
In Mpeg 4, each track header has a “time scale” integer field. For a video track of 23.976 FPS the value can be 23976, or half of that, 11988. Audio tracks typically have different time scale field, often 48000 for 48kHz audio.
In Media Foundation, MF_MT_FRAME_RATE media type attribute is a rational number with uint32_t numerator and denominator. In DXGI, the RefreshRate field of DXGI_MODE_DESC structure which contains a refresh rate of a monitor is a rational number, for instance my display actually uses 59997/1000 Hz frame rate, not exactly 60 Hz.
- anderskaseorg 4y agoI think part of the parent’s complaint is that, although 23976/1000 fps is much more accurate than 24 fps, it’s still very slightly slower than the correct value 24000/1001 fps, by about 2.1 frames per day.
- Const-me 4y agoMpeg-4 can do that just fine. Here’s what MediaInfo tool shows about the video stream of some *.mp4 file on my computer. The content was first released in 1997, before modern digital stuff. Frame rate mode: Constant Frame rate: 23.976 (24000/1001) FPS Specifically, the timescale value in "mdhd" box (overall information about the media, defined in section 8.4.2 of the ISO/IEC 14496-12 spec) is 24000, and "stts" box (time-to-sample, defined in section 8.6.1.2 of that spec) says all video frames have the same sampleDelta = 1001.