This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

OpenClip XML Media Management Python Module

Openclip is a python abstraction of the openclip XML media classification format. It provides ORM-style access to “dotclip” data (file or generated) to make the life of a python developer much easier. This module is not meant to be a complete solution but rather a stable and standardized component of various other scripts, tools, guis, and software integrations.

About the OpenClip format

the following is adapted from the Autodesk documentation of the Gateway Clip specification…

The “.clip“ OpenClip XML format is an XML wrapper which points to single or multiple video and/or audio sources and wraps them in a single entity. The XML is built to reflect the structure of a complex clip, with the most atomic portions (paths to media) at the bottom of the hierarchy, and the clip at the top most entity.

An OpenClip XML structured file describes at least the following information:

  • Physical location of files
  • additional metadata information, such as timecode and keycode
  • Clip versions

Structure of OpenClip

The following is a basic representation of the structure of an Open Clip:

<clip>
  • highest level wrapper entity
  • comprises entire clip (Tracks, Versions)
  • defines global options (Clip Name, Comments)
<track>
  • found within <tracks> container
  • all information about a single channel
  • ChannelType (Video, Audio, Generic)
  • Extended Channel Type (eg. Matte, Normals, Shadow)
<feed>
  • found within <feeds> container
  • Track Version or “View”
  • Distinguished by a Version Number
  • Storage Format (bit-depth, resolution, etc.)
<span>
  • found within <spans> container
  • Media (Image sequence or streaming media/container eg. QuickTime)
  • Path(s) to media

Within a clip, you have tracks, within tracks you have feeds and within feeds, spans.

Installation

This should be easy. You may need administrator priveleges depending on your system configuration.

Note: Some software have their own isolated python environment for a good reason - try at your own risk to integrate this library…

For the latest dev branch:

git clone https://github.com/robmoggach/python-openclip.git
cd python-openclip
python setup.py install

or for the latest (possibly stable?) release:

pip install openclip

or

easy_install openclip

**Note:** I prefer markdown for documentation but setuptools prefers
restructuredText. For this reason the ``setup.py`` file
**optionally** requires package ``pypandoc`` which can be installed
using ``pip install pypandoc``.

lxml.etree

lxml.etree has been used in development for this project but it does have fallbacks for system xml element tree tools. It’s faster and produces cleaner xml so it’s preferable but not implicitly required. If you don’t want it, remove it from the setup.py file and you’ll be good to go.

Usage

The documentation (non-existent) provides more on this but essentially you create an OpenClip object / class instance and that object has a number of built in methods for manipulating the data within.

Example

Here’s an example that creates a generic clip object. (no file specified)

>>> import openclip
>>> oc = openclip.OpenClip()
>>> oc.clip
<openclip.elements.Clip object at 0x102529c90>
>>> print oc.clip.xml
<clip type="clip" version="3"><name type="string">OpenClip_20160108_120119_93</name></clip>
>>> oc.clip.tracks
<openclip.elements.Tracks object at 0x10252e910>
>>> oc.clip.versions
<openclip.elements.Versions object at 0x10252e950>
>>> oc.clip.tracks.track_list
[]
>>> oc.clip.versions.version_list
[]

Product Requirements (IMO) are (in order):

The following are my own requirements for this module, in no particular order. Some have already been satisfied.

  • to model openclip xml in an atomic building block fashion using python classes
  • to create working openclip xml documents from input or by parsing existing files
  • to safely retain/backup metadata in potentially destructive write operations
  • to have it intuitively and recursively create clip files from a tree using pyseq,lss,mls etc.
  • to introspect existing clip files and allow interactive wizard-style editing
  • to merge clip files
  • to change paths on clip files
  • to generate placeholder media for sequences that don’t exist

Future:

  • pluggable openclip module for use in maya, houdini, nuke, hiero, fcp?
  • truly open format
  • interactive wizard style component
  • qt/pyside

Tests

I use tox for testing and Travis CI (a distributed continuous integration service used to build and test projects hosted at GitHub).

Running the tests should be as easy as typing:

tox

(assuming you have tox and pytest installed of course.)

Dependencies

python-openclip uses a number of opensource packages.

  • Parse is the opposite of the python format command.
  • PySeq finds groups of items that follow a naming convention containing a numerical sequence.
  • timecode provides timecode manipulation functions.
  • colorama provides cross-platform colored terminal text in Python.
  • colorlog is a colored formatter for the python logging module.
  • Munch (previously bunch) is a Python dictionary that provides attribute-style access.

Author(s)

Maintainers

Contributors

The MIT License (MIT)

Copyright (c) 2016 Robert Moggach

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release History

Release History

0.0.12

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.11

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.10

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
openclip-0.0.12.tar.gz (20.3 kB) Copy SHA256 Checksum SHA256 Source Jan 10, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting