https://github.com/jeffmikels/timecode_dart
Pure Dart implementation of the SMPTE timecode specification.
https://github.com/jeffmikels/timecode_dart
dart dartlang hacktoberfest smpte timecode
Last synced: 7 months ago
JSON representation
Pure Dart implementation of the SMPTE timecode specification.
- Host: GitHub
- URL: https://github.com/jeffmikels/timecode_dart
- Owner: jeffmikels
- License: mit
- Created: 2022-04-13T20:40:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-21T06:27:21.000Z (over 3 years ago)
- Last Synced: 2025-01-07T21:51:22.931Z (about 1 year ago)
- Topics: dart, dartlang, hacktoberfest, smpte, timecode
- Language: Dart
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
This package implements the Timecode SMPTE spec.
## Features
A `Timecode` object has a framerate and a number of frames. Various mathematical operations
can be done on the object, and it will be able to understand how to convert its frame number
to a human readable SMPTE string like `01:23:45:01` where the form is `HH:MM:SS:FF` (hours,
minutes, seconds, frames).
`Timecode` objects can also be configured to use milliseconds instead of frames or to output
SMPTE code with fractional seconds instead of frame numbers. In either case, the output will
look like this `01:23:45.123` where the last three digits are milliseconds.
## Usage
Add to your `pubspec.yaml`.
```bash
$ dart pub add timecode
```
Import in your file and create a `Timecode` object.
```dart
import 'package:timecode/timecode.dart';
var timecode = Timecode(framerate: TimecodeFramerate(24));
print(timecode);
for (var i = 0; i < 100; i++) {
timecode.next();
print(timecode);
}
```
## Additional information
The class is well-documented, so you should be able to understand it easily by looking at the API documentation
or by reading the source code directly.
### Reference material
This work is based on the work of the following:
- https://www.connect.ecuad.ca/~mrose/pdf_documents/timecode.pdf
- https://www.davidheidelberger.com/2010/06/10/drop-frame-timecode/
- https://pypi.org/project/pytimecode.py/