framesToTimecode
Converts a frame number to timecode format (HH:MM:SS:FF).number
required
Frame number to convert (will be floored to nearest integer and clamped to non-negative)
number
required
Frames per second (must be greater than 0)
string
Timecode string in HH:MM:SS:FF format
Example
Errors
ThrowsHeliosError with code INVALID_FPS if fps is less than or equal to 0.
timecodeToFrames
Converts a timecode string to a frame number.string
required
Timecode string in HH:MM:SS:FF format
number
required
Frames per second (must be greater than 0)
number
The corresponding frame number
Example
Errors
ThrowsHeliosError with:
INVALID_FPSif fps is less than or equal to 0INVALID_TIMECODE_FORMATif timecode is not in HH:MM:SS:FF format
framesToTimestamp
Converts a frame number to a timestamp format (HH:MM:SS.mmm).number
required
Frame number to convert (will be clamped to non-negative)
number
required
Frames per second (must be greater than 0)
string
Timestamp string in HH:MM:SS.mmm format with milliseconds
Example
Errors
ThrowsHeliosError with code INVALID_FPS if fps is less than or equal to 0.
Format differences
- Timecode (HH:MM:SS:FF): Uses frame numbers (00-fps), suitable for video editing
- Timestamp (HH:MM:SS.mmm): Uses milliseconds, suitable for web standards like WebVTT