Welcome to pyaaf’s documentation!

Python Bindings for the Advanced Authoring Format (AAF).

Basic Demo

import aaf

f = aaf.open("path/to/file.aaf", "r")

# get the main composition
main_compostion = f.storage.toplevel_mobs()[0]

# print the name of the composition
print main_compostion.name

# AAFObjects have properties that can be accessed like a dictionary
# print out the creation time
print main_compostion['CreationTime'].value

# video, audio and other track types are stored in slots
# on a mob object.

for slot in main_compostion.slots():
    segment = slot.segment
    print segment

Installing

The lastest release can be downloaded here.

Building From Source

First you need to download the AAF-devel-libs for your platform

http://sourceforge.net/projects/aaf/files/AAF-devel-libs/1.1.6

If your platform isn’t there then you’ll need to download the full AAF SDK and build it yourself.

Note

On Windows the prebuild AAF-devel-libs need the Microsoft Visual C++ 2010 Redistributable Package (x86, x64).

For Python <= 3.2 you will need the Visual C++ Compiler for Python 2.7 or Visual Studio 2008.

For Python >= 3.3 you will need the Windows 7 SDK or Visual Studio 2010. To setup the Windows SDK for python I’d recommend following this guide here.

To build inplace and test.

$ git clone https://github.com/markreidvfx/pyaaf.git
$ cd pyaaf
$ export AAF_ROOT=path/to/root/of/AAF-devel-libs
$ python setup.py build_ext --inplace
$ nosetest

Indices and tables

Table Of Contents

Next topic

aaf.storage

This Page