I have figured out so far that you can cut a section from a video with avconv with a command like this (cuts from 1:00-3:00):
avconv -ss 00:01:00 -i "input.avi" -t 00:02:00 -c:v libx264 -crf 23 "output.mp4"
But how would I cut two (or more) sections from the video and combine them into one video? For example, taking 1:00-3:00 as above, plus 8:00-10:00, making a final 4 minute video.
I guess I can do them separately then concatenate them, but is there a simpler way?
Best Answer
I believe you will have to cut separate chunks, then concatenate them. Don't use
cat
for that, as timecodes will be all over the place.If the video chunks are
mp4
, usemp4box
(from thegpac
package) for concatenation: