0

I need to cut a video with a length of several minutes into many different videos, In all but the videos cut from the original video will have different short lengths. what do i need to do?

  • This is the code i use but it just cuts out videos of equal length:

ffmpeg -i input.mp4 -filter_complex "crop=1280:720:(in_w-1280)/2:(in_h-720)/2" -crf 21 -c:a copy -f segment -segment_time 18 -reset_timestamps 1 "%output%%%~na_%%03d.mp4"

alexdo
  • 123
  • 1
  • 3
  • 10
  • The `segment` muxer accepts a `-segment_times` argument: "set segment split time points" – Rotem Sep 16 '22 at 07:55
  • @Rotem i used it " -segment_time 18" the problem here is i want it to cut into different chunks not the fixed 18 seconds. – alexdo Sep 16 '22 at 08:15
  • `-segment_times` and `-segment_time` are not the same. `-segment_times` accepts a list of "time points". – Rotem Sep 16 '22 at 08:17
  • @Rotem when i use "-segment_time 18" instead of "-segment_times 18" it only splits into 2 videos, the first video it cuts the first 18 seconds, the rest is the whole original video... it doesn't split into many different videos. – alexdo Sep 16 '22 at 08:25
  • Look for `-segment_times` usage examples. – Rotem Sep 16 '22 at 08:30

0 Answers0