I'm not going to give you an example because I don't know the environment, but you can do that by creating a script that dynamically generates time-sensitive options.
This section describes how ffmpeg alone can be used.By limiting the entire range of the video with the time specification -ss/-t
and dividing it in the segment
format, I think it is close to specifying the number of times.Specifically
$ffmpeg-i input.ts-ss0-t 300-f segment-segment_time 60 output_%02d.ts
as shown in .In this case, split the opening five minutes every minute, or five times, regardless of the input.ts time.The rest is
$ffmpeg-i input.ts-ss 300 output_remain.ts
available on the .
However, splitting without encoding is often not exactly splitting due to the constraints of the video codec.If you need to keep it in exactly one minute, specify an option to re-encode the video.
See the document for details on each option and format.I hope this will be helpful.
© 2024 OneMinuteCode. All rights reserved.