I am new to video editing. I have a video of 30 minutes. I want to delete some part of it and keep some part. for example

  • 00:00:00 till 00:05:00 (keep)
  • 00:05:01 till 00:10:00 (delete)
  • 00:10:01 till 00:30:00 (keep)

I have many timestamps like above. What is the best quick way to do this?


1 Answer 1


I have done this sort of thing using ffmpeg and powershell core (both free software).

You can use any other scripting language to loop over ffmpeg once for each section of video that you want to keep. The ffmpeg command that you want looks like this:

ffmpeg -ss [start_time] -i [input_file] -to [end_time] [output_file]

So, and example would be:

ffmpeg -ss 00:10:01 -i source_vid.mp4 -to 00:30:00 output_vid_2.mp4

And if you have a whole lot of such pieces to cut in a batch, you can then use powershell or some other scripting language to loop through a list of pieces to cut:

$segment_list = @(
@{ id = "1"
   start_time = "00:00:00"
   end_time = "00:05:00"
@{ id = "2"
   start_time = "00:10:01"
   end_time = "00:30:00"

foreach($segment in $segment_list) {
   ffmpeg -ss $segment.start_time -i source_vid.mp4 -to $segment.end_time ("output_" + $segment.id + ".mp4")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.