2
$\begingroup$

How do I get the filepath attribute from a sound strip of a video sequence ? I am talking about the sound strip that comes with a video file.

Sound strip : demo.001 bpy.data.scenes['Scene'].sequence_editor.sequences_all["demo.001"].filepath

==> 'SoundSequence' object has no attribute 'filepath'

I can get the filepath from the associated video strip.

Video strip : demo.avi bpy.data.scenes['Scene'].sequence_editor.sequences_all["demo.avi"].filepath

==> this works

$\endgroup$
2
$\begingroup$

You need to access the sound property of that strip which has the filepath property:

bpy.data.scenes['Scene'].sequence_editor.sequences_all["demo.001"].sound.filepath
$\endgroup$
  • $\begingroup$ Thanks Ray ! It works ! How did u know ?? $\endgroup$ – Nikos_VSE Nov 13 '16 at 19:17
  • $\begingroup$ Values in the api are more often than not, represented in the UI as well, which may give hints as to where it might be in the UI. In this case, the filepath in the UI is listed as a property of a sound object (looking at its python tooltip), so I then looked for a sound property on the sequence strip. $\endgroup$ – Ray Mairlot Nov 13 '16 at 19:26
  • $\begingroup$ Clever... well, thanks again ! I learnt two things today :-) $\endgroup$ – Nikos_VSE Nov 13 '16 at 19:33

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.