TimecodeFramerate class

The framerate of a Timecode instance. It may be based on any arbitrary floating point value, but usually will be one of the industry standard framerates: 23.976, 23.98, 24, 25, 29.97, 30, 50, 59.94, 60, 1000. If the framerate is either 29.97 or 59.94, the internal isDropFrame flag will be set unless forceNonDropFrame is specified in the constructor.

This class handles all calculations regarding framerates. It handles the drop frame calculations, and can convert between seconds and frames.

Drop Frame Calculations are done by implementing code found here:

However, Rob Womack's implementation uses the integer fps when it should have used the full fps. David Heidelberger's code is likewise ambiguous on when to use integer fps and when to use the full fps.

Constructors

TimecodeFramerate(double fps, {dynamic forceNonDropFrame = false})
Will create a TimecodeFramerate instance. fps may be any arbitrary floating point value, but usually will be one of the industry standard framerates: 23.976, 23.98, 24, 25, 29.97, 30, 50, 59.94, 60, 1000. If the framerate is either 29.97 or 59.94, the internal isDropFrame flag will be set unless forceNonDropFrame is specified in the constructor.
factory

Properties

fps double
final
hashCode int
The hash code for this object.
no setterinherited
integerFps int
final
isDropFrame bool
final
realFramesPer10Minutes int
latefinal
realFramesPer24Hours int
latefinal
realFramesPerHour int
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skippedFrameNumbersPerMinute int
skippedFrameNumbersPerMinute is the number of frames to drop every minute and is computed as the nearest integer to 6% of the full fps
latefinal
timecodeFramesPerMinute int
latefinal

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseFrames(int frameCount, {dynamic ignoreDropFrame = false}) TimecodeData
Code modified for Dart and split into two functions from https://www.davidheidelberger.com/2010/06/10/drop-frame-timecode/ Also consider the implementation here: http://www.andrewduncan.net/timecodes/
realFrames(int timecodeFrames) int
timecode frames will be equal to or larger than real frames. Example: in 29.97 fps, after each minute, two frames will be added to the timecode frame count, except after 10 minutes, no frames are added This code removes the extra timecode frames to get the real underlying frame count.
realSecondsToFrames(double seconds) int
returns real frame count from seconds of real time and does not account for drop frames if seconds > 24 hours, rolls over
rollover(double seconds) double
timecodeFrames(int frameCount, {dynamic ignoreDropFrame = false}) int
timecode frames will be equal to or larger than real frames. Example: in 29.97 fps, after each minute, two frames will be added to the timecode frame count, except after 10 minutes, no frames are added This function adds in the extra timecode frames.
timecodeSecondsToFrames(double seconds, {dynamic ignoreDropFrame = false}) int
returns timecode frame count from timecode seconds. Timecode seconds are always based on the integerFps and that's why drop frames are needed will roll over after 24 hours
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited