4
$\begingroup$

I primarily use blender as a video sequence editor for existing movie clips. Generally I want to remove a few frames and then render the movie with the same output format as the movie clip that I am editing. I would like to programmatically set the output format based on the imported movie clips.

I have a movie clip selected in the video sequence editor and I would like to programmatically retrieve details on the clip such as the following (obtained using VLC):

enter image description here

How can I do this? I've figured out how the object is a MovieSequence, but I can't see how to drill into the details from there:

>>> mov = bpy.context.selected_sequences
>>> type(mov[0])
<class 'bpy.types.MovieSequence'>
>>> dir(mov[0])
['__doc__', '__module__', '__slots__', 'alpha_mode', 
'animation_offset_end', 'animation_offset_start', 'bl_rna', 
'blend_alpha', 'blend_type', 'channel', 'color_multiply', 
'color_saturation', 'colorspace_settings', 'crop', 'effect_fader', 
'elements', 'filepath', 'frame_duration', 'frame_final_duration', 
'frame_final_end', 'frame_final_start', 'frame_offset_end', 
'frame_offset_start', 'frame_start', 'frame_still_end', 
'frame_still_start', 'lock', 'modifiers', 'mpeg_preseek', 'mute', 'name', 
'proxy', 'rna_type', 'select', 'select_left_handle', 
'select_right_handle', 'speed_factor', 'stereo_3d_format', 
'stream_index', 'strip_elem_from_frame', 'strobe', 'swap', 'transform', 
'type', 'update', 'use_crop', 'use_default_fade', 'use_deinterlace', 
'use_flip_x', 'use_flip_y', 'use_float', 'use_linear_modifiers', 
'use_multiview', 'use_proxy', 'use_reverse_frames', 'use_translation', 
'views_format']

My end goal is to programmatically set the output format encoding.

$\endgroup$

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.