https://github.com/patopesto/linear-timecode-js
A javascript library to encode and decode Linear Timecode (LTC)
https://github.com/patopesto/linear-timecode-js
javascript linear-timecode smpte smpte-timecode timecode
Last synced: 3 months ago
JSON representation
A javascript library to encode and decode Linear Timecode (LTC)
- Host: GitHub
- URL: https://github.com/patopesto/linear-timecode-js
- Owner: patopesto
- License: mit
- Created: 2023-11-27T06:31:16.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-20T14:33:02.000Z (10 months ago)
- Last Synced: 2025-01-08T16:07:34.224Z (5 months ago)
- Topics: javascript, linear-timecode, smpte, smpte-timecode, timecode
- Language: JavaScript
- Homepage:
- Size: 2.74 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linear Timecode
A pure javascript implementation of a LTC encoder/decoder.
## Features
- [x] LTC decoder
- [x] Support for 24, 25 and 30 fps
- [ ] Support for 29.97 fps
- [x] Support for drop-frame and color-frame
- [ ] Support for user bits and bgf
- [x] LTC encoder
- [x] Support for 24, 25 and 30 fps
- [ ] Support for 29.97 fps
- [x] Support for drop-frame and color-frame
- [ ] Support for user bits and bgf
- [ ] Volume control
- [ ] Rise and fall time control## Usage
### Installation
```shell
npm install linear-timecode
```### Usage
```javascript
const ltc = require('linear-timecode');
const sampleRate = 44100;
let decoder = new ltc.Decoder(sampleRate);
```or
```javascript
import { Decoder } from "linear-timecode";
const sampleRate = 44100;
let decoder = new Decoder(sampleRate);
```#### Examples
##### Decoding
- Decode from wav file: [snippet](https://gitlab.com/patopest/linear-timecode-js/-/snippets/3624978).
- Decode from live input source: [snippet](https://gitlab.com/patopest/linear-timecode-js/-/snippets/3624979).## Development
- Install dependencies
```shell
npm install
```- Run tests
```shell
npm test
```- Build library
```shell
npm run build
```## Useful links
- Linear Timecode [wikipedia](https://en.wikipedia.org/wiki/Linear_timecode).
- Linear Timecode [specification](https://pub.smpte.org/pub/st12-1/st0012-1-2014.pdf).