opencinemac / vtc-py Goto Github PK
View Code? Open in Web Editor NEWA SMTPE video timecode library for Python
Home Page: https://opencinemac.github.io/vtc-py/
License: MIT License
A SMTPE video timecode library for Python
Home Page: https://opencinemac.github.io/vtc-py/
License: MIT License
Currently we only have tests for 29.97. We should test that arbitrary drop frame works as expected
Right now we are at a B, might be worth trying to get it up to A.
For things like:
for tc in vtc.generate(start=vtc.Timecode("01:00:00:00", rate=vtc.RATE.24)):
print(tc)
Receiving this error in Python3.11.
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1210, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'vtc._framerate.Framerate'> for field F23_98 is not allowed: use default_factory
Works fine in Python 3.10. Looks like something may have broken in 3.11.
For NTSC Framerates, we should add a timebase property and maybe change frac to "playback" or something.
Currently when two Timecode instances are added together, the result is rounded to the nearest frame of the new Timecode value's rate.
There are instances where one might want to keep fractional frame values. We may want to have a setting where this rounding does not occur.
To support a partial-frame mode, we should probably also implement the following magic methods:
Vtc-py may suffer from the same logic error.
It would be nice to use error types for differentiating between our errors.
They should likely all inherit from a single lib type, then specialize from there.
Frame ranges would allow us to do things like check if other Timecodes are within a range with contains, and check if two frame ranges overlap (and if so, how much)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.