Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-timecodes

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-timecodes

Time and SMTPE Timecodes conversions

  • 2.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

node-timecodes npm license github-issues

nodei.co

Time and SMTPE Timecodes conversions

references :

  • Apple cinematools
  • https://en.wikipedia.org/wiki/SMPTE_timecode

Usage

Install with npm i -s node-timecodes

var timecodes = require('node-timecodes');

timecodes.toSeconds('00:23:47:10'); // -> 1427.4

timecodes.fromSeconds(1427.4); // -> '00:23:47:10'

// you can use a specific frameRate
timecodes.fromSeconds(1427.4, {
  frameRate: 29.97
}); // -> '00:23:47:11'

// use ms format for WebVTT timestamps
timecodes.fromSeconds(1427.4, {
  ms: true
}); // -> '00:23:47:400'

// change default framerate to all methods
timecodes.constants.framerate = 29.97
timecodes.fromSeconds(1427.4); // -> '00:23:47:11'

Run as CLI :

$ timecodeFromSeconds 1427.4
# 00:23:47:10

$ timecodeToSeconds 00:23:47:10
# 1427.4

Scripts

  • npm run readme : node ./node_modules/.bin/node-readme
  • npm run test : ./node_modules/babel-tape-runner/bin/babel-tape-runner spec/**/*.spec.js | ./node_modules/.bin/tap-spec
  • npm run build : babel src --out-dir dist

Author

Julien Bouquillon julien.bouquillon@synchronized.tv http://github.com/Synchronized-TV

License

Keywords

FAQs

Package last updated on 02 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc