{"id":37084388,"url":"https://github.com/opencinemac/vtc-py","last_synced_at":"2026-01-14T10:19:38.349Z","repository":{"id":50881288,"uuid":"363001125","full_name":"opencinemac/vtc-py","owner":"opencinemac","description":"A SMTPE video timecode library for Python","archived":false,"fork":false,"pushed_at":"2022-09-13T15:32:01.000Z","size":6811,"stargazers_count":22,"open_issues_count":7,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T14:11:31.226Z","etag":null,"topics":["audio","audio-processing","film","filmmaking","media","media-pipeline","python","smpte-timecode","timecode","timecode-strings","timecode-validation","video","video-processing","video-timecode"],"latest_commit_sha":null,"homepage":"https://opencinemac.github.io/vtc-py/","language":"Python","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/opencinemac.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}},"created_at":"2021-04-30T02:11:34.000Z","updated_at":"2025-08-26T02:58:29.000Z","dependencies_parsed_at":"2022-08-28T05:21:31.017Z","dependency_job_id":null,"html_url":"https://github.com/opencinemac/vtc-py","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":"opencinemac/occlib-py","purl":"pkg:github/opencinemac/vtc-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencinemac%2Fvtc-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencinemac%2Fvtc-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencinemac%2Fvtc-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencinemac%2Fvtc-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencinemac","download_url":"https://codeload.github.com/opencinemac/vtc-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencinemac%2Fvtc-py/sbom","scorecard":{"id":708992,"data":{"date":"2025-08-11","repo":{"name":"github.com/opencinemac/vtc-py","commit":"8f2f0d08f2e6c65aed7890e9879d699694b1e6bd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T07:35:47.510Z","repository_id":50881288,"created_at":"2025-08-22T07:35:47.510Z","updated_at":"2025-08-22T07:35:47.510Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:18:03.274Z","status":"ssl_error","status_checked_at":"2026-01-14T10:16:11.865Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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","audio-processing","film","filmmaking","media","media-pipeline","python","smpte-timecode","timecode","timecode-strings","timecode-validation","video","video-processing","video-timecode"],"created_at":"2026-01-14T10:19:37.469Z","updated_at":"2026-01-14T10:19:38.338Z","avatar_url":"https://github.com/opencinemac.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003evtc-py\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg height=150 class=\"heightSet\" align=\"center\" src=\"https://raw.githubusercontent.com/opencinemac/vtc-py/master/zdocs/source/_static/logo1.svg\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eA SMPTE Timecode Library for Python\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://dev.azure.com/peake100/Open%20Cinema%20Collective/_build?definitionId=12\"\u003e\u003cimg src=\"https://dev.azure.com/peake100/Open%20Cinema%20Collective/_apis/build/status/vtc-py?repoName=opencinemac%2Fvtc-py\u0026branchName=dev\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://dev.azure.com/peake100/Open%20Cinema%20Collective/_build?definitionId=12\"\u003e\u003cimg src=\"https://img.shields.io/azure-devops/tests/peake100/Open%20Cinema%20Collective/12/dev?compact_message\" alt=\"click to see build pipeline\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://dev.azure.com/peake100/Open%20Cinema%20Collective/_build?definitionId=12\"\u003e\u003cimg src=\"https://img.shields.io/azure-devops/coverage/peake100/Open%20Cinema%20Collective/12/dev?compact_message\" alt=\"click to see build pipeline\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://codeclimate.com/github/opencinemac/vtc-py/maintainability\"\u003e\u003cimg src=\"https://api.codeclimate.com/v1/badges/0d196b40c063b040cd21/maintainability\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/opencinemac/vtc-py/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/vtc\" alt=\"Documentation\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/vtc/\"\u003e\u003cimg src=\"https://badge.fury.io/py/vtc.svg\" alt=\"PyPI version\" height=\"18\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://opencinemac.github.io/vtc-py/\"\u003e\u003cimg src=\"https://img.shields.io/badge/docs-github.io-blue\" alt=\"Documentation\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nOverview\n========\n\n``vtc-py`` is inspired by years of scripting workflow solutions in a Hollywood cutting\nroom. It is designed to support both quick, one-off scripts and higher level production\ncode.\n\nvtc aims to capture all the ways in which timecode is used throughout the industry so \nusers can spend more time on their workflow logic, and less time handling the \ncorner-cases of parsing and calculating timecode.\n\nFeatures\n--------\n\n  - SMPTE Conventions:\n    - [X] NTSC\n    - [X] Drop-Frame\n    - [ ] Interlaced timecode (not implemented)\n  - Timecode Representations:\n    - Timecode    | '01:00:00:00'\n    - Frames      | 86400\n    - Seconds     | 3600.0\n    - Runtime     | '01:00:00.0'\n    - Rational    | 18018/5\n    - Feet+Frames | '5400+00'\n      - [X] 35mm, 4-perf\n      - [ ] 35mm, 3-perf\n      - [ ] 35mm, 2-perf\n      - [ ] 16mm\n    - Premiere Ticks | 15240960000000\n  - Operations:\n    - Comparisons (==, \u003c, \u003c=, \u003e, \u003e=)\n    - Add\n    - Subtract\n    - Scale (multiply and divide)\n    - Divmod\n    - Modulo\n    - Negative\n    - Absolute\n    - Rebase (recalculate frame count at new framerate)\n  - Flexible Parsing:\n    - Partial timecodes      | '1:12'\n    - Partial runtimes       | '1.5'\n    - Negative string values | '-1:12', '-3+00'\n    - Poorly formatted tc    | '1:13:4'\n  - Type inference for fast scripting (add a tc string to a Timecode value).\n  - Built-in consts for common framerates.\n  - Range type for working with and comparing frame ranges.\n  - Modern Python Typehints for static analysis.\n\nDemo\n----\n\nLet's take a quick high-level look at what you can do with this library:\n\n```python\n\u003e\u003e\u003e import vtc\n\n# It's easy to make a new 23.98 NTSC timecode.\n\u003e\u003e\u003e tc = vtc.Timecode(\"17:23:13:02\", rate=23.98)\n\n# We can get all sorts of ways to represent the timecode.\n\u003e\u003e\u003e tc.timecode\n'17:23:13:02'\n\n\u003e\u003e\u003e tc.frames\n1502234\n\n\u003e\u003e\u003e tc.seconds\nDecimal('62655.67641666666666666666667')\n\n\u003e\u003e\u003e tc.rational\nFraction(751868117, 12000)\n\n\u003e\u003e\u003e tc.runtime(precision=3)\n'17:24:15.676'\n\n\u003e\u003e\u003e tc.premiere_ticks\n15915544300656000\n\n\u003e\u003e\u003e tc.feet_and_frames\n'93889+10'\n\n# We can inspect the framerate.\n\u003e\u003e\u003e tc.rate.playback\nFraction(24000, 1001)\n\n\u003e\u003e\u003e tc.rate.timebase\nFraction(24, 1)\n\n\u003e\u003e\u003e tc.rate.ntsc\nTrue\n\n\u003e\u003e\u003e tc.rate.dropframe\nFalse\n\n# Parsing is flexible\n# Partial timecode\n\u003e\u003e\u003e vtc.Timecode(\"3:12\", rate=23.98)\n[00:00:03:12 @ [23.98 NTSC]]\n\n# Frame count (ints)\n\u003e\u003e\u003e vtc.Timecode(24, rate=23.98)\n[00:00:01:00 @ [23.98 NTSC]]\n\n# Seconds (floats, decimals, or fractions)\n\u003e\u003e\u003e vtc.Timecode(1.5, rate=23.98)\n[00:00:01:12 @ [23.98 NTSC]]\n\n# Premiere ticks\n\u003e\u003e\u003e vtc.Timecode(vtc.PremiereTicks(254016000000), rate=23.98)\n[00:00:01:00 @ [23.98 NTSC]]\n\n# Feet + Frames\n\u003e\u003e\u003e vtc.Timecode(\"1+08\", rate=23.98)\n[00:00:01:00 @ [23.98 NTSC]]\n\n# We can add two timecodes\n\u003e\u003e\u003e tc += vtc.Timecode(\"01:00:00:00\", rate=23.98)\n\u003e\u003e\u003e tc\n[18:23:13:02 @ [23.98 NTSC]]\n\n# But if we want to do something quickly, we just use a timecode string instead.\n\u003e\u003e\u003e tc += \"00:10:00:00\"\n\u003e\u003e\u003e tc.timecode\n'18:33:13:02'\n\n# Adding ints means adding frames.\n\u003e\u003e\u003e tc += 2\n\u003e\u003e\u003e tc.timecode\n'18:33:13:04'\n\n# Adding floats, decimals, or fractions means adding seconds.\n\u003e\u003e\u003e tc += 1.5\n\u003e\u003e\u003e tc.timecode\n'18:33:14:16'\n\n# We can subtract too.\n\u003e\u003e\u003e tc -= \"01:00:00:00\"\n\u003e\u003e\u003e tc.timecode\n'17:33:14:16'\n\n# It's easy to compare two timecodes\n\u003e\u003e\u003e tc \u003e vtc.Timecode(\"02:00:00:00\", rate=vtc.RATE.F23_98)\nTrue\n\n# Just like adding, we can use a shortcut and compare directly against a string\n\u003e\u003e\u003e \"02:00:00:00\" \u003c tc\nTrue\n\n# Or against an int to check the frame count.\n\u003e\u003e\u003e vtc.Timecode(\"01:00:00:00\", rate=vtc.RATE.F23_98) == 86400\nTrue\n\n# It's easy to sort timecodes.\n\u003e\u003e\u003e sorted([tc, vtc.Timecode(\"03:00:00:00\", rate=23.98)])\n[[03:00:00:00 @ [23.98 NTSC]], [17:33:14:16 @ [23.98 NTSC]]]\n\n# We can multiply\n\u003e\u003e\u003e tc *= 2\n\u003e\u003e\u003e tc.timecode\n'35:06:29:08'\n\n# ... divide ...\n\u003e\u003e\u003e tc /= 2\n\u003e\u003e\u003e tc.timecode\n'17:33:14:16'\n\n# ... and even get the remainder while dividing!\n\u003e\u003e\u003e dividend, remainder = divmod(tc, 3)\n\u003e\u003e\u003e dividend.timecode\n'05:51:04:21'\n\u003e\u003e\u003e remainder.timecode\n'00:00:00:01'\n\n# Maybe just the remainder!\n\u003e\u003e\u003e remainder = tc % 3\n\u003e\u003e\u003e remainder.timecode\n'00:00:00:01'\n\n# We can make a timecode negative.\n\u003e\u003e\u003e tc = -tc\n\u003e\u003e\u003e tc.timecode\n'-17:33:14:16'\n\n# Or get it's absolute value.\n\u003e\u003e\u003e tc = abs(tc)\n\u003e\u003e\u003e tc.timecode\n'17:33:14:16'\n\n# We can make dropframe timecode for 29.97 or 59.94 using one of the pre-set\n# framerates. We can use an int to parse 15000 frames.\n\u003e\u003e\u003e vtc.Timecode(15000, rate=vtc.RATE.F29_97_DF)\n[00:08:20;18 @ [29.97 NTSC DF]]\n\n# We can make new timecodes with arbitrary framerates if we want:\n\u003e\u003e\u003e vtc.Timecode(\"01:00:00:00\", rate=240)\n[01:00:00:00 @ [240]]\n\n# Using a non-whole number indicates this is an NTSC timecode.\n\u003e\u003e\u003e vtc.Timecode(\"01:00:00:00\", rate=239.76)\n[01:00:00:00 @ [239.76 NTSC]]\n\n# We can signal that we want a whole-frame timebase to be converted to an\n# NTSC framerate.\n\u003e\u003e\u003e tc = vtc.Timecode(\"01:00:00:00\", rate=vtc.Framerate(48, ntsc=True))\n\u003e\u003e\u003e tc\n[01:00:00:00 @ [47.95 NTSC]]\n\n# We can also rebase the frames using a new framerate!\n\u003e\u003e\u003e tc.rebase(vtc.RATE.F23_98)\n[02:00:00:00 @ [23.98 NTSC]]\n\n```\n\nGoals\n-----\n\n- Parse and fetch all Timecode representations.\n- A clean, Pythonic API.\n- Support all operations that make sense for timecode.\n- Sane shortcuts for scripting.\n\nNon-Goals\n---------\n\n- Real-time timecode generators.\n\nInstallation\n------------\n\n```shell\npip install vtc\n```\n\nGetting Started\n---------------\n\nFor full documentation:\n[read the docs](https://opencinemac.github.io/vtc-py/).\n\nFor library development guide, \n[read the docs](https://opencinemac.github.io/occlib-py/).\n\nAuthors\n-------\n\n* **Billy Peake** - *Initial work*\n\nAttributions\n------------\n\u003cdiv\u003eDrop-frame calculations adapted from \u003ca href=\"https://www.davidheidelberger.com/2010/06/10/drop-frame-timecode/\"\u003eDavid Heidelberger's blog.\u003c/a\u003e\u003c/div\u003e\n\u003cdiv\u003eLogo made by \u003ca href=\"\" title=\"Freepik\"\u003eFreepik\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003ewww.flaticon.com\u003c/a\u003e\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencinemac%2Fvtc-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencinemac%2Fvtc-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencinemac%2Fvtc-py/lists"}