Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to test out the retime test but cant find module parameter #49

Open
Shaunimsorry opened this issue Oct 14, 2018 · 2 comments
Open

Comments

@Shaunimsorry
Copy link

Shaunimsorry commented Oct 14, 2018

Hello!

Trying to try and read the retime information and speed information on an AAF with some 6 clips on the timeline [AAF is called test.aaf] this is my code, taken from the retime example:

`import aaf
import aaf.util
import aaf.mob
import aaf.define
import aaf.iterator
import aaf.dictionary
import aaf.storage
import aaf.base
import aaf.component

import unittest
import traceback

import os

import uuid

f = aaf.open('test.aaf', 'r')
comp = f.storage.toplevel_mobs()[0]

seqs = [item.segment for item in comp.slots()]
print seqs
op_group = seqs[0].components()[0]

speed_map = None
offset_map = None

speed_map = op_group.parameter['PARAM_SPEED_MAP_U']
offset_map = op_group.parameter['PARAM_SPEED_OFFSET_MAP_U']`

but all i get is

[<aaf.component.Timecode at 0x10e77a408>, <aaf.component.Pulldown at 0x10e77a380>, <aaf.component.Timecode at 0x10e77a490>, <aaf.component.Timecode at 0x10e77a518>, <aaf.component.Pulldown at 0x10e77a5a0>, <aaf.component.Pulldown at 0x10e77a628>, <aaf.component.Pulldown at 0x10e77a6b0>, <aaf.component.EdgeCode at 0x10e77a738>, <aaf.component.Sequence at 0x10e77a7c0>, <aaf.component.Sequence at 0x10e77a848>, <aaf.component.Sequence at 0x10e77a958>, <aaf.component.Pulldown at 0x10e77a8d0>]
Traceback (most recent call last):
  File "/Users/shaunansari/Desktop/pyaaf_test 2", line 23, in <module>
    op_group = seqs[0].components()[0]
AttributeError: 'aaf.component.Timecode' object has no attribute 'components'
[Finished in 0.4s with exit code 1]

not sure what im doing wrong, super new to this and very excited to start pulling and reading AAF's !
would love some help here trying to decant the speed and retime information from an AAF along with eventually scaling and transform information too.

@markreidvfx
Copy link
Owner

Sorry for the late reply, the sequence containing the operationGroup with the retime in your case looks like it's not at seqs[0]. Looks like its might be index 8,9,10 or 11. One of those
<aaf.component.Sequence> objects should hopefully contain the operationGroup your looking for.

@Shaunimsorry
Copy link
Author

Shaunimsorry commented Oct 23, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants