Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

converting timecodes with 3 digits for milliseconds #5

@pietrop

Description

@pietrop

First of all thanks for the great module, been using it as part of autoEdit_2, text based video editing app.

However I've run into a use case when I am not sure how would I convert a timecode like this '00:33:19,470' where the timestamp format is hh:mm:sss,fff where fff represents milliseconds?


I tried this in npm runkit

using this code

var nodeTimecodes = require("node-timecodes")
console.log(nodeTimecodes.toSeconds('00:33:19,470')); 

and as expected it gives a bunch of errors.

Object.toSeconds in node-timecodes/dist/toSeconds.js — line 16

 var frameRate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.framerate;
  if (!TIMECODE_REGEXP.test(timecode)) {
    throw new Error('invalid timecode : ' + timecode);
  }
  if (typeof timecode === 'number') {
    return timecode;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions