level 1
ffmpeg -ss 2 -i SD20210615_145906.mp4 -c copy -t 5 out.mp4
最后是剪辑了原视频的第2秒到第5秒。但是整个视频时长有7秒。
2021年06月16日 10点06分
1
level 1
当-ss放在-i前,并且同时使用copy,表示保留该段视频。
官方文档:
-ss position (input/output)
When used as an input option (before -i), seeks in this input file to position. Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding and -accurate_seek is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when -noaccurate_seek is used, it will be preserved.
When used as an output option (before an output url), decodes but discards input until the timestamps reach position.
position must be a time duration specification, see (ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual.
2021年07月01日 06点07分
4