如何在FFmpeg中按时长(如10秒)分割视频?

时间:2019-01-05 10:50:03

标签: ffmpeg segment

我是ffmpeg的新手!我想分割3分钟左右的视频。或使用ffmpeg播放10秒以上? 请帮助我解决该问题。

1 个答案:

答案 0 :(得分:0)

依次使用这些命令分割视频。

ffmpeg -ss 00:00:00 -t 10 -i input.mov -vcodec copy -acodec copy output_part1.mov
ffmpeg -ss 00:00:10 -t 10 -i input.mov -vcodec copy -acodec copy output_part2.mov
ffmpeg -ss 00:00:20 -t 10 -i input.mov -vcodec copy -acodec copy output_part3.mov
ffmpeg -ss 00:00:30 -t 10 -i input.mov -vcodec copy -acodec copy output_part4.mov


-ss stands for start time,

-t is the length of final clip,

-i is the input file, in this case it's a file called 'input.mov'

-vcodec is the video codec used to encode the output file. 'copy' means we're using the 
 same codec as the input file.

-acodec is the audio codec. Like the video codec, we'll be using the same audio codec as the input file.

output.mov is the output file, you can rename this to any file name you choose.