4
$\begingroup$

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

$\endgroup$
4
$\begingroup$

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
$\endgroup$
  • $\begingroup$ That works for me. Brilliant $\endgroup$ – Fazil Abdul Lathif Mar 13 '16 at 13:58
  • $\begingroup$ I am now trying to use the texture path to load the audio from the same video and do the same. $\endgroup$ – Fazil Abdul Lathif Mar 13 '16 at 14:02
  • $\begingroup$ Thanks a lot for this. Its a good start for me to learn some Python coding in Blender. $\endgroup$ – Fazil Abdul Lathif Mar 13 '16 at 14:02

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.