Creating video tracks at 29.97 frames per second
Configure your time-to-sample atom for 29.97 frames per second.
Overview
NTSC color video is not 30 frames per second (fps), but actually 29.97 fps. The previous example showed how the media time scale and the duration of the frames specify the video’s frame rate. By setting the media’s time scale to 2997 units per second and setting the frame durations to 100 units each, the effective rate is 29.97 fps exactly.
In this situation, it is also a good idea to set the movie time scale to 2997 in order to avoid movie edits that don’t land on frame boundaries. The movie’s time scale is stored in the movie header atom.
With a time scale of 2997 in the media header atom, the time-to-sample atom would contain the data values listed in following table.
Field | Value |
|---|---|
Atom size |
|
Atom type |
|
Version/Flags |
|
Number of entries |
|
Sample count |
|
Sample duration |
|
See Also
Describing samples
Sample table atom ('stbl')Seeking with a QuickTime fileSample description atom ('stsd')Time-to-sample atom ('stts')Creating video tracks at 30 frames per secondCreating sound tracks at 44.1 kHzComposition offset atom ('ctts')Composition shift least greatest atom ('cslg')Using composition offset and composition shift least greatest atomsSync sample atom ('stss')Partial sync sample atom ('stps')Sample-to-chunk atom ('stsc')Referencing two data files with a single trackSample size atom ('stsz')Chunk offset atom ('stco')