Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reinecke/editmaker
Python Editorial Tools
https://github.com/reinecke/editmaker
Last synced: about 1 month ago
JSON representation
Python Editorial Tools
- Host: GitHub
- URL: https://github.com/reinecke/editmaker
- Owner: reinecke
- License: mit
- Created: 2014-05-30T02:28:57.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2021-01-27T02:44:05.000Z (almost 4 years ago)
- Last Synced: 2024-11-25T19:41:45.368Z (about 1 month ago)
- Language: Python
- Size: 9.77 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
EditMaker
==========Python Editorial Tools
*NOTE: This project has been long abandoned. If this sort of thing is interesting to you, check out the [OpenTimelineIO](http://opentimeline.io) project.*
Right now the only useful thing is the Timecode object. This allows for simple
timecode math operations.All calculations are made based on the total number of frames represented by
the timecode object.So if you had a timecode of:
`00:00:01:00` @ 24fps (one second at 24 frames per second) - 24 total framesand you added this timecode:
`00:00:02:00` @ 16fps (two seconds at 16 frames per second) - 32 total framesit would yield:
`00:00:02:08` @ 24fps (two seconds and 8 frames at 24 frames per second) - 56 total framesExamples
--------
>>> # Instantiate a timecode object
>>> tc1 = EditMaker.Timecode('01:00:03:12', fps=24)
>>> tc1
EditMaker.Timecode('01:00:03:12', fps=24)>>> # Access individual timecode components
>>> tc1.hours
1
>>> tc1.minutes
0
>>> tc1.seconds
3
>>> tc1.frames
12
>>> tc1.total_frames
86484
>>> tc1.timecode
'01:00:03:12'
>>> tc1.seconds = 2
>>> tc1
EditMaker.Timecode('01:00:02:12', fps=24)>>> # Do math with the timecode
>>> tc2 = EditMaker.Timecode('00:00:00:20', fps=24)
>>> tc1 + tc2
EditMaker.Timecode('01:00:04:08', fps=24)
>>> tc1 - tc2
EditMaker.Timecode('01:00:02:16', fps=24)
>>> tc2 * 2
EditMaker.Timecode('00:00:01:16', fps=24)