H
This can be accomplished by the
segment or the stream_segment muxers, depending on your input format. For example, to split a video file without recompression, you’d need something like: ffmpeg -i source.mov -c copy -map 0 -segment_time 15 -f segment target_%d.mov
The -f segment option tells ffmpeg to split the file to chunks of (roughly) equal duration. Roughly, because the video stream will be split at the nearest keyframe.The
-segment_time option specifies the target duration of each chunk, either in seconds or in hh:mm:ss (see time duration syntax).
The
%d placeholder in the target file name will be replaced with the sequential index of the chunk. You may use something like %04d for zero-padded indexes of 4 digits.


