0
$\begingroup$

I'm trying to construct a script to step through the active scene and:

1) find all the movie strips that the audio doesn't match the corresponding movie length

2) then add > effect strip > speed control to the movie strips that the, corresponding audio strip's frame length doesn't match.

3) not sure if this is possible, but would be nice to make the speed strip the same length of the audio strip. I think it would need to space out all the strips to give the script room to increase the movie strips length without bumping into the next strip along.

This is what I have so far, not sure why it doesn't work.

import bpy

for a in bpy.context.scene.sequence_editor.sequences:
    if a.type != 'SOUND':
        a.effect_strip_add(type='SPEED')
$\endgroup$
1
$\begingroup$

The type Sequences does not contain effect_strip_add , that's part of the sequences operators(bpy.ops). The correct way to add a strip(i.e. effect) is by using:

sequences.new_effect(name, type, channel, frame_start, frame_end=0, seq1=None, seq2=None, seq3=None)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.