[英]How to segment mp4 with ffmpeg or avconv, fast, where times are specified?
I need to segment mp4 in specified pieces. 我需要将mp4分成指定部分。 They are all different durations. 它们都是不同的持续时间。 Example segmentation: 细分示例:
1 - 0:00:00 to 0:01:11
segment 2 - 0:01:11 to 0:04:24
segment 3 - 0:05:51 to 0:06:30
...
I already wrote a script extracting them one by one, but it is pretty slow. 我已经写了一个脚本,一个一个地提取它们,但是速度很慢。 I guess because it wastes a lot of time opening the file, decoding and seeking from the beginning. 我猜是因为从一开始就浪费大量时间打开文件,进行解码和查找。
ffmpeg has the option ffmpeg具有选项
- segment_times times
Specify a list of split points. times contains
a list of comma separated duration specifications,
in increasing order. See also the segment_time option.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.