-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
converting timecodes with 3 digits for milliseconds #5
Comments
@pietrop Try replacing the comma ',' with a period / full-stop '.' which is the decimal in the US |
@novaterata I am not sure why you say a period would help? The regex the input is being tested against explictly wants a colon at the end: https://github.com/Synchronized-TV/node-timecodes/blob/master/src/toSeconds.js#L5 It would be nice if this library supported a user supplied custom frame delimiter ':', '.', ',', etc.
etc... |
The usage of a period is widely used and is some kind of standard. https://en.wikipedia.org/wiki/SMPTE_timecode :
It's really easy to just convert the dot yourself ? :
|
@jide I feel like the point of this issue is getting confused. The problem is, the library expects frames to be specified with a colon. @pietrop is working with "," as a frame delimiter, and I myself am working with a period being a delimiter. Your first example will not work with the current implementation which throws an error if the input does not match the regex With the current implementation your second example would actually need to be: Because frames are delimited with ':' not '.'--- which is why I said, it would be nice if this library would accommodate a custom frame delimiter. |
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 ishh:mm:sss,fff
wherefff
represents milliseconds?I tried this in npm runkit
using this code
and as expected it gives a bunch of errors.
Object.toSeconds in node-timecodes/dist/toSeconds.js — line 16
The text was updated successfully, but these errors were encountered: