1
$\begingroup$

I can't find head or tails in the information pulled from crossfades in the VSE. I even get negative numbers?

I need the in and out points inside the clips(what part of the clip to be used) and the in and out points where the clips should be located in the timeline - and that is for both clips of the transition. How do I do that?

Test script. You'll need a transition in the VSE to test it:

import bpy

seq_strips = bpy.context.scene.sequence_editor.sequences

for strip in reversed(seq_strips):

if strip.type in ['CROSS']:         
    print("INPUT_1:\n")        
    print("frame_final_end: "+str(strip.input_1.frame_final_end))
    print("frame_final_start: "+str(strip.input_1.frame_final_start))
    print("frame_start: "+str(strip.input_1.frame_start))
    print("frame_offset_start: "+str(strip.input_1.frame_offset_end))     
    print("frame_offset_end: "+str(strip.input_1.frame_offset_end))       
    print("frame_final_duration: "+str(strip.input_1.frame_final_duration))    
    print("frame_duration: "+str(strip.input_1.frame_duration)+"\n")      

    print("INPUT_2:\n")        
    print("frame_final_end: "+str(strip.input_2.frame_final_end))
    print("frame_final_start: "+str(strip.input_2.frame_final_start))
    print("frame_start: "+str(strip.input_2.frame_start))
    print("frame_offset_start: "+str(strip.input_2.frame_offset_end))        
    print("frame_offset_end: "+str(strip.input_2.frame_offset_end))       
    print("frame_final_duration: "+str(strip.input_2.frame_final_duration))         
    print("frame_duration: "+str(strip.input_2.frame_duration)+"\n")

    print("STRAIGHT:\n")         
    print("frame_final_end: "+str(strip.frame_final_end))
    print("frame_final_start: "+str(strip.frame_final_start))
    print("frame_start: "+str(strip.frame_start))
    print("frame_offset_start: "+str(strip.frame_offset_end))        
    print("frame_offset_end: "+str(strip.frame_offset_end))        
    print("frame_final_duration: "+str(strip.frame_final_duration)) 
    print("frame_duration: "+str(strip.frame_duration)+"\n")    

The script is based on this question: Pull clip info from crossfades/fades via python

$\endgroup$
  • $\begingroup$ Just by logic, when strip.input_1 is the left clip, then you just need to calculate strip.input_1.frame_final_end - strip.frame_final_start to get the in point inside of input_1... And correspondingly strip.frame_duration should be the out point inside of input_2. Right? (didn't test it) $\endgroup$ – Samoth Mar 26 '17 at 22:07
  • $\begingroup$ strip.frame_duration looks like it is delivering the duration of the transition. These two appear to deliver the right information for the in and out of the time line: b.recIn = TimeCode(strip.frame_final_start,edl_fps) b.recOut = TimeCode(strip.frame_final_end,edl_fps) But the inside clip in and out points are causing me trouble. Your suggestion gives strange values and even negative values. $\endgroup$ – tintwotin Mar 26 '17 at 22:55

Your Answer

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

Browse other questions tagged or ask your own question.