The most robust, precise and complete Swift library for working with SMPTE/EBU timecode. Supports 23 industry timecode frame rates, with a suite of conversions, calculations and integrations with Apple AV frameworks.
Timecode is a broadcast and post-production standard for addressing video frames. It is used for video burn-in timecode (BITC), and display in a DAW (Digital Audio Workstation) or video playback/editing applications.
The following timecode rates and formats are supported.
Film / ATSC / HD | PAL / SECAM / DVB / ATSC | NTSC / ATSC / PAL-M | NTSC Non-Standard | ATSC / HD |
---|---|---|---|---|
23.976 | 25 | 29.97 | 30 DF | 30 |
24 | 50 | 29.97 DF | 60 DF | 60 |
24.98 | 100 | 59.94 | 120 DF | 90 |
47.952 | 59.94 DF | 120 | ||
48 | 119.88 | |||
95.904 | 119.88 DF | |||
96 |
The following video frame rates are supported. (Video rates)
Film / HD | PAL | NTSC |
---|---|---|
23.98p | 25p / 25i | 29.97p / 29.97i |
24p | 50p / 50i | 30p |
47.95p | 100p | 59.94p / 59.94i |
48p | 60p / 60i | |
95.9p | 90p | |
96p | 119.88p | |
120p |
CMTime
or Final Cut Pro XML and AAF encoding)CMTime
)Range
or Stride
between two timecode instancesCodable
Formatter
object that can format timecodeAttributedString
showing invalid timecode components using alternate attributes (such as red text color)Text
view emphasizing invalid timecode components using alternate attributes (such as red text color)AVAsset
video file utilities to easily read/write timecode tracks and locate AVPlayer
to timecode locationshttps://github.com/orchetect/TimecodeKit
.package(url: "https://github.com/orchetect/TimecodeKit", from: "2.3.1")
import TimecodeKit
See the online documentation for library usage, getting started info, and 1.x → 2.x migration guide.
Also check out the Examples folder for sample code to see TimecodeKit in action.
Coded by a bunch of 🐹 hamsters in a trenchcoat that calls itself @orchetect.
Licensed under the MIT license. See LICENSE for details.
If you enjoy using TimecodeKit and want to contribute to open-source financially, GitHub sponsorship is much appreciated. Feedback and code contributions are also welcome.
Please do not email maintainers for technical support. Several options are available for questions and feature ideas:
Contributions are welcome. Feel free to post in Discussions first before submitting a PR.