0
$\begingroup$

I have been trying to export a video from the sequence editor with markers that act as 'video cuts' in the VSE. I haven't had any luck with this and would appreciate some help.

This script from Render Videos From Marker Ranges? only for the 3D scene itself, not the VSE

$\endgroup$

1 Answer 1

0
$\begingroup$

Just had the same issue recently, and came up with this.

Once you have placed all the markers in your timeline (and ideally given them a meaningful name), configure all the output details for your video clips (resolution, framerate, output format and encoding, etc.). Then you can just copy the Python snippet below into a Text Editor window in Blender and click "Run Script":

import bpy

sorted_markers = sorted(bpy.data.scenes['Scene'].timeline_markers, key=lambda x: x.frame)
    
for i in range(0, len(sorted_markers)):
    bpy.data.scenes['Scene'].frame_start = sorted_markers[i].frame
    bpy.data.scenes['Scene'].frame_end = sorted_markers[i+1].frame
    
    # Your file path for saving the rendered video clips goes here
    bpy.data.scenes['Scene'].render.filepath = 'C:\\Users\\YourUsername\\MyVideos\\some_filename_prefix' + sorted_markers[i].name + 'some_filename_suffix'
    
    bpy.ops.render.render(animation=True)

This will generate a separate rendered video file for each segment of the timeline in between markers. Note that you need to include markers at the beginning and the end of your overall edit too for the script to work as intended.

I added the name of the start timeline marker for each clip as a variable to the filepath to get unique file names, but you can customize the filepath to your liking before running the script.

Lastly, once the script is running you will not get any render preview during the process, but trust me the script is running (you can check the progress by looking at the files generated in the set destination folder).

Hope this helps!

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .