0

I have some dashcam footage from a road trip I took recently with around 300 video files. I'd like to take the first 30 frames or approx 1 second of each of these video files as a kind of time lapse video. I'd like to do this using a Python script as manually importing and cutting the 300 clips would be extremely time consuming.

I have found the script here to import the files, but I can't figure out how to modify this cut the clips to just the first 1 sec of footage. How can I achieve this?

Commander92
  • 163
  • 5

1 Answers1

1

I think this should do the trick.

import bpy

seqs = bpy.context.sequences

for seq in seqs: start_frame = seq.frame_start new_end_frame = start_frame + 30 seq.frame_final_end = new_end_frame

bpy.ops.sequencer.gap_remove(all=True)

```

Jakemoyo
  • 4,375
  • 10
  • 20
  • I was able to resolve this by using this code to update the original script with this line of code

    ms.frame_final_end = frame_start + 30

    – Commander92 Apr 16 '22 at 13:04