{"id":43041593,"url":"https://github.com/spiretechnology/js-timecode","last_synced_at":"2026-01-31T09:14:02.550Z","repository":{"id":176436177,"uuid":"657757346","full_name":"spiretechnology/js-timecode","owner":"spiretechnology","description":"SMPTE timecode parser and formatter for JavaScript and TypeScript.","archived":false,"fork":false,"pushed_at":"2024-03-18T19:57:19.000Z","size":32632,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-14T02:37:10.423Z","etag":null,"topics":["audio","javascript","multimedia","smpte","timecode","typescript","video"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@spiretechnology/js-timecode","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spiretechnology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-23T19:26:50.000Z","updated_at":"2025-06-15T23:29:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"82a6385e-44d9-4f49-8d19-636fff4728a8","html_url":"https://github.com/spiretechnology/js-timecode","commit_stats":null,"previous_names":["spiretechnology/js-timecode"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/spiretechnology/js-timecode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiretechnology%2Fjs-timecode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiretechnology%2Fjs-timecode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiretechnology%2Fjs-timecode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiretechnology%2Fjs-timecode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spiretechnology","download_url":"https://codeload.github.com/spiretechnology/js-timecode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiretechnology%2Fjs-timecode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28936100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T08:53:31.997Z","status":"ssl_error","status_checked_at":"2026-01-31T08:51:38.521Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","javascript","multimedia","smpte","timecode","typescript","video"],"created_at":"2026-01-31T09:14:00.181Z","updated_at":"2026-01-31T09:14:02.544Z","avatar_url":"https://github.com/spiretechnology.png","language":"TypeScript","readme":"# js-timecode\n\nA TypeScript / JavaScript library for parsing and manipulating SMPTE timecodes and frame rates.\n\nDevelopment of this library is very test-driven to ensure accuracy of the frame and timecode calculations. If you'd like to contribute to this library, adding additional useful test cases is a great place to start!\n\n## Installation\n\n```sh\nnpm install --save @spiretechnology/js-timecode\n```\n\n## Usage Examples\n\n### Parse a timecode (drop frame)\n\n```ts\nimport { Parse, Rate_29_97 } from '@spiretechnology/js-timecode';\n\nconst tc = Parse('00:01:02;23', Rate_29_97);\ntc.toString(); // =\u003e 00:01:02;23\ntc.frame; // =\u003e 1881\n```\n\n### Parse a timecode (non-drop frame)\n\n```ts\nconst tc = Parse('00:01:02:23', Rate_24);\ntc.toString(); // =\u003e 00:01:02:23\ntc.frame; // =\u003e 1511\n```\n\n### Create a timecode from a frame count\n\n```ts\nconst tc = new Timecode(1511, Rate_24, false /* non-drop frame */);\ntc.toString(); // =\u003e 00:01:02:23\ntc.frame; // =\u003e 1511\n```\n\n### Algebra with timecodes and frames\n\n```ts\nlet tc = Parse('00:01:02:23', Rate_24);\ntc = tc.add(3);\ntc.toString(); // =\u003e 00:01:03:02\ntc.frame; // =\u003e 1514\n```\n\n## Note: parsing timecodes that don't exist in drop frame\n\nDrop frame timecodes skip the first 2 frames of each minute, unless the minute is a multiple of 10. This changes to the first 4 frames of each minute if the frame rate is 59.94.\n\nFor instance, in `29.97`, the timecode `00:00:59:29` is immediately followed by `00:01:00:02`. Two timecodes were dropped: `00:01:00:00` and `00:01:00:01`\n\nThose dropped timecodes don't correspond to any actual frame number, and so we need to choose how to resolve those frames. The choice we have made with this library is to round up the next valid frame. If you try to parse `00:01:00:00`, the result will be rounded up to `00:01:00:02`, which is the next valid frame in the sequence.\n\n## Contributing\n\nWe welcome contributions that make this library more reliable. To add test cases, fix bugs, or anything else, please submit a pull request.\n\n## Other resources\n\n-   [spiretechnology/go-timecode](https://github.com/spiretechnology/go-timecode) - A Go library for parsing and manipulating SMPTE timecodes and frame rates.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiretechnology%2Fjs-timecode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspiretechnology%2Fjs-timecode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiretechnology%2Fjs-timecode/lists"}