Timecode class

Some parts have been copied / inspired by the pytimecode library by Joshua Banton

https://pypi.org/project/pytimecode.py/

Notes: *There is a 24 hour SMPTE Timecode limit, so if your time exceeds that limit, it will roll over.

Timecode Does all the calculation over frames, so the main data it holds is frames, then when required it converts the frames to a timecode by using the frame rate setting.

Note: Drop frame timecodes operate by reporting higher frame numbers than really exist so that 29.97 timecodes stay in sync with 30 fps ones, etc.

Drop Frame Example:

at 29.97 fps, the next frame after 00:00:59;29 will be 00:01:00;02 (skipping 0 & 1) See the document here: https://www.connect.ecuad.ca/~mrose/pdf_documents/timecode.pdf

Drop Frame Calculations are done by implementing code found here:

Constructors

Timecode({TimecodeFramerate? framerate, int startFrames = 0})
Creates a new Timecode instance.
Timecode.atSeconds(double seconds, {TimecodeFramerate? framerate})
Creates a timecode at a specific number of seconds with a specified framerate.
factory
Timecode.atTimecode(String timecodeString, {TimecodeFramerate? framerate})
Creates a timecode with a specific timecode string and framerate.
factory

Properties

ff int
will always honor the drop frame setting in the framerate
no setter
forceFractionalSeconds bool
getter/setter pair
fps double
no setter
frac int
fractional seconds in milliseconds honors drop frame
no setter
frameCount int
getter/setter pair
frameDelimiter String
no setter
framerate TimecodeFramerate
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
hh int
no setter
integerFps int
no setter
isDropFrame bool
no setter
isMillis bool
no setter
millis int
millis reflects the realtime duration of this instance
no setter
mm int
no setter
parts TimecodeData
the real timecode parts get updated whenever frames are changed
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
ss int
no setter

Methods

addFrames(int n) → void
back() → void
divFrames(int n) → void
multFrames(int n) → void
next() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subFrames(int n) → void
toString() String
A string representation of this object.
override

Operators

operator *(int multiplier) Timecode
operator +(Timecode other) Timecode
operator -(Timecode other) Timecode
operator /(int divisor) Timecode
operator <(Timecode other) → dynamic
operator ==(Object other) bool
The equality operator.
override
operator >(Timecode other) → dynamic

Static Methods

parseToFrames(String timecodeString, {TimecodeFramerate? framerate}) int
The default format for a timecodeString is HH:MM:SS:FF where FF stands for the number of frames after the current second and may be 0 <= FF < fps.