4

I am looking for a way to link the video texture start frame with the audio start frame in the video sequencer.

My intention is as follows

  • Import multiple movies as Image plane in Blender

  • Then import the respective audio track in blender video sequencer. Align the audio track by matching the start frame in the video texture and video sequencer. This is a manual process. But I am ok with it. I am not sure how to link the start frame of video with the start frame of audio. - This is what I need.

  • Then animate camera pan and zoom and update the video start texture according to the animation manually.

  • Then I expect the audio start frame to be adjusted automatically - This is what I want to happen

I searched google and found that drivers in blender can be used for these purposes. But soon realized that there are no drivers for both the options. I also tried to create a custom property. But had no success.

Please suggest

  • Maybe related? http://blender.stackexchange.com/questions/47804/access-audio-strips-sample-data-in-python-for-a-cross-correlation – Samoth Mar 13 '16 at 21:01

1 Answers1

4

Here is a workaround solution

A custom property, named "audio" is added to the movie texture, with a value of the soundstrip name. Every time the script is run it updates the audio strip, pointed to by the audio key, to have the same frame_start as the tex.

import bpy

context = bpy.context
scene = context.scene
sequences = scene.sequence_editor.sequences_all
# all the textures with audio custom prop
textures = [t for t in bpy.data.textures if "audio" in t.keys()]

for t in textures:
    audio_strip = sequences.get(t["audio"])
    if audio_strip:
        audio_strip.frame_start = t.image_user.frame_start
batFINGER
  • 84,216
  • 10
  • 108
  • 233