Skip to main content

pycmx is a parser for CMX 3600-style EDLs.

Project description

Documentation Status GitHub last commit Lint and Test

pycmx

The pycmx package provides a basic interface for parsing a CMX 3600 EDL and its most most common variations.

Features

  • The major variations of the CMX 3600: the standard, "File32" and "File128" formats are automatically detected and properly read.
  • Preserves relationship between events and individual edits/clips.
  • Remark or comment fields with common recognized forms are read and available to the client, including clip name and source file data.
  • Symbolically decodes transitions and audio channels.
  • Does not parse or validate timecodes, does not enforce framerates, does not parameterize timecode or framerates in any way. This makes the parser more tolerant of EDLs with mixed rates.
  • Unrecognized lines are accessible on the EditList and Event classes along with the line numbers, to help the client diagnose problems with a list and give the client the ability to extend the package with their own parsing code.

Usage

Opening and Parsing EDL Files

>>> import pycmx
>>> with open("tests/edls/TEST.edl") as f
... 	edl = pycmx.parse_cmx3600(f)
...
>>> edl.title
'DC7 R1_v8.2'

Reading Events and Edits

EditList.events is a generator...

>>> events = list( edl.events )  
>>> len(events)
120
>>> events[43].number 
'044'

...and events contain 1...n edits.

>>> events[43].edits[0].source_in 
'00:00:00:00'
>>> events[43].edits[0].transition.cut
True
>>> events[43].edits[0].record_out
'01:10:21:10'

Acessing Transitions and Enabled Channels

>>> events[41].edits[0].transition.dissolve
False
>>> events[41].edits[1].transition.dissolve
True
>>> events[41].edits[0].clip_name
'TC R1 V1.2 TEMP1 DX M.WAV'
>>> events[41].edits[1].clip_name
'TC R1 V6 TEMP2 M DX.WAV'
   
              # parsed channel maps are also
              # available to the client
>>> events[2].edits[0].channels.get_audio_channel(7)
True
>>> events[2].edits[0].channels.get_audio_channel(6)
False
>>> for c in events[2].edits[0].channels.channels:
...     print(f"Audio channel {c} is present")
... 
Audio channel 7 is present
>>> events[2].edits[0].channels.video
False

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycmx-1.2.2.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

pycmx-1.2.2-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file pycmx-1.2.2.tar.gz.

File metadata

  • Download URL: pycmx-1.2.2.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.6

File hashes

Hashes for pycmx-1.2.2.tar.gz
Algorithm Hash digest
SHA256 4c4ee2a1e96bfdd22d4216ceccfe3c48c96d11d4a0a31d6735cd8ad94cf7d3dc
MD5 6f12589f9358e6149d173b2d87f83125
BLAKE2b-256 636851e0aaeec7077b426f02f069b96386e7e80799eb3d73c61c11e093705cfc

See more details on using hashes here.

File details

Details for the file pycmx-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: pycmx-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.6

File hashes

Hashes for pycmx-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1314a6aa8eced7fa77b8975ebce29b51741102c4548683e168064dac6bf563c2
MD5 82a950ec4692a55ef8dd8fd7992a5577
BLAKE2b-256 dc288d3c88317734388ef193cb0c40f7e01064cfabcfaee1047e992a411100ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page