{"id":17506244,"url":"https://github.com/orchetect/timecodekit","last_synced_at":"2025-04-06T13:12:22.746Z","repository":{"id":43183023,"uuid":"296288854","full_name":"orchetect/TimecodeKit","owner":"orchetect","description":"The definitive SMPTE timecode library for Swift.","archived":false,"fork":false,"pushed_at":"2024-10-19T01:11:13.000Z","size":8916,"stargazers_count":88,"open_issues_count":4,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-20T08:09:07.684Z","etag":null,"topics":["convert-timecode-values","format-timecode","frame-rate","framerate","ios","macos","smpte","smpte-timecode","swift","swift5","timecode","timecode-component","timecode-strings","timecode-validation","timecodes","tvos","wachos"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/orchetect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"orchetect"}},"created_at":"2020-09-17T10:04:48.000Z","updated_at":"2024-10-20T01:46:38.000Z","dependencies_parsed_at":"2024-01-06T23:24:40.546Z","dependency_job_id":"411b3bce-9ced-4401-a1af-c731c9b4113c","html_url":"https://github.com/orchetect/TimecodeKit","commit_stats":{"total_commits":282,"total_committers":3,"mean_commits":94.0,"dds":0.03191489361702127,"last_synced_commit":"848d0d36911798c7c674291880018382bc72e1e6"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2FTimecodeKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2FTimecodeKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2FTimecodeKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2FTimecodeKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orchetect","download_url":"https://codeload.github.com/orchetect/TimecodeKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485290,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["convert-timecode-values","format-timecode","frame-rate","framerate","ios","macos","smpte","smpte-timecode","swift","swift5","timecode","timecode-component","timecode-strings","timecode-validation","timecodes","tvos","wachos"],"created_at":"2024-10-20T03:34:24.845Z","updated_at":"2025-04-06T13:12:22.726Z","avatar_url":"https://github.com/orchetect.png","language":"Swift","readme":"![TimecodeKit](Images/timecodekit-banner.png)\n\n# TimecodeKit\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Forchetect%2FTimecodeKit%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/orchetect/TimecodeKit) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Forchetect%2FTimecodeKit%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/orchetect/TimecodeKit) [![Xcode 16](https://img.shields.io/badge/Xcode-16-blue.svg?style=flat)](https://developer.apple.com/swift) [![License: MIT](http://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat)](https://github.com/orchetect/TimecodeKit/blob/main/LICENSE)\n\nThe 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.\n\nTimecode 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.\n\n## Supported Timecode Frame Rates\n\nThe following timecode rates and formats are supported.\n\n| Film / ATSC / HD | PAL / SECAM / DVB / ATSC | NTSC / ATSC / PAL-M | NTSC Non-Standard | ATSC / HD |\n| ---------------- | ------------------------ | ------------------- | ----------------- | --------- |\n| 23.976           | 25                       | 29.97               | 30 DF             | 30        |\n| 24               | 50                       | 29.97 DF            | 60 DF             | 60        |\n| 24.98            | 100                      | 59.94               | 120 DF            | 90        |\n| 47.952           |                          | 59.94 DF            |                   | 120       |\n| 48               |                          | 119.88              |                   |           |\n| 95.904           |                          | 119.88 DF           |                   |           |\n| 96               |                          |                     |                   |           |\n\n## Supported Video Frame Rates\n\nThe following video frame rates are supported. (Video rates)\n\n| Film / HD | PAL       | NTSC            |\n| --------- | --------- | --------------- |\n| 23.98p    | 25p / 25i | 29.97p / 29.97i |\n| 24p       | 50p / 50i | 30p             |\n| 47.95p    | 100p      | 59.94p / 59.94i |\n| 48p       |           | 60p / 60i       |\n| 95.9p     |           | 90p             |\n| 96p       |           | 119.88p         |\n|           |           | 120p            |\n\n## Core Features\n\n- Convert timecode between:\n  - timecode display string\n  - total elapsed frame count\n  - real wall-clock time\n  - elapsed audio samples at any audio sample rate\n  - rational time notation (such as `CMTime` or Final Cut Pro XML and AAF encoding)\n  - feet + frames\n- Convert timecode and/or frame rate to a rational fraction, and vice-versa (including `CMTime`)\n- Support for Days as a timecode component (some DAWs including Cubase support \u003e 24 hour timecode)\n- Support for Subframes\n- Math operations: add, subtract, multiply, divide\n- Granular timecode validation\n- Form a `Range` or `Stride` between two timecode instances\n- Conforms to `Codable`\n- Formatters\n  - A `Formatter` object that can format timecode\n  - An `AttributedString` showing invalid timecode components using alternate attributes (such as red text color)\n- SwiftUI Views\n  - A timecode entry text field\n  - A timecode string `Text` view emphasizing invalid timecode components using alternate attributes (such as red text color)\n- `AVAsset` video file utilities to easily read/write timecode tracks and locate `AVPlayer` to timecode locations\n- Exhaustive unit tests ensuring accuracy\n\n## Installation\n\n### Swift Package Manager (SPM)\n\n1. Add TimecodeKit as a dependency using Swift Package Manager.\n   - In an app project or framework, in Xcode:\n     Add the package to your target using this URL: `https://github.com/orchetect/TimecodeKit`\n   - In a Swift Package, add it to the Package.swift dependencies:\n     ```swift\n     .package(url: \"https://github.com/orchetect/TimecodeKit\", from: \"2.3.1\")\n     ```\n2. Import the library:\n   ```swift\n   import TimecodeKit\n   ```\n\n## Documentation\n\nSee the [online documentation](https://orchetect.github.io/TimecodeKit) for library usage, getting started info, and 1.x → 2.x migration guide.\n\nAlso check out the [Examples](Examples) folder for sample code to see TimecodeKit in action.\n\n## References\n\n- Wikipedia: [SMPTE Timecode](https://en.wikipedia.org/wiki/SMPTE_timecode)\n\n## Author\n\nCoded by a bunch of 🐹 hamsters in a trenchcoat that calls itself [@orchetect](https://github.com/orchetect).\n\n## License\n\nLicensed under the MIT license. See [LICENSE](https://github.com/orchetect/TimecodeKit/blob/master/LICENSE) for details.\n\n## Sponsoring\n\nIf you enjoy using TimecodeKit and want to contribute to open-source financially, GitHub sponsorship is much appreciated. Feedback and code contributions are also welcome.\n\n## Community \u0026 Support\n\nPlease do not email maintainers for technical support. Several options are available for questions and feature ideas:\n\n- Questions and feature ideas can be posted to [Discussions](https://github.com/orchetect/TimecodeKit/discussions).\n- If an issue is a verifiable bug with reproducible steps it may be posted in [Issues](https://github.com/orchetect/TimecodeKit/issues).\n\n## Contributions\n\nContributions are welcome. Feel free to post in Discussions first before submitting a PR.\n","funding_links":["https://github.com/sponsors/orchetect"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forchetect%2Ftimecodekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forchetect%2Ftimecodekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forchetect%2Ftimecodekit/lists"}