Link: https://trac.ffmpeg.org/wiki/Concatenate
ffmpeg -i "concat:input1.ts|input2.ts|input3.ts" -c copy output.ts
ffmpeg -i input1.mp4 -c copy intermediate1.ts
ffmpeg -i input2.mp4 -c copy intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy output.ts
Brief explanation of the options used in the command:
-i
: input-c copy
: use codec same codecs as inputffmpeg -i input.mp4 -t 00:05:00 output_part1.mp4
ffmpeg -i input.mp4 -t 00:05:00 -ss 00:05:00 output_part2.mp4
Brief explanation of the options used in the command:
-i
: Input file-t
: Duration of the output file-ss
: Start position of the output file (optional)Use additional scripting to get out chapter marker times, then use above
C. Splitting by Size:
ffmpeg -i input.mp4 -map 0 -c copy -segment_size 50M -segment_times 1 output_%03d.mp4
Brief explanation of the options used in the command:
-map 0
: Select the first stream (video and audio)-c copy
: Copy the stream without re-encoding
(faster)-segment_size
: Size of each output file segment-segment_times
: Number of segments to createoutput_%03d.mp4
: printf-style pattern for the output
filesUnless otherwise stated, our shows are released under a Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.
The HPR Website Design is released to the Public Domain.