【问题标题】:How to split video by duration like 10sec in FFmpeg? [duplicate]如何在FFmpeg中按持续时间(如10秒)分割视频? [复制]
【发布时间】:2019-05-31 18:01:46
【问题描述】:

我是 ffmpeg 的新手!我想分割持续时间为 3 分钟的视频。或更多到 10 秒。使用 ffmpeg? 请帮我解决它。

【问题讨论】:

  • 感谢您的回复!但就我而言,我不知道输入视频的确切持续时间是多少。现在我正在使用以下命令来分割视频 ffmpeg -i input.mp4 -c copy -map 0 -segment_time 30 -f segment -reset_timestamps 1 output"%03d.mp4 请帮助我如何解决!!!

标签: ffmpeg segment


【解决方案1】:

按顺序使用这些命令来分割视频。

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.

【讨论】:

  • 感谢您的回复!但就我而言,我不知道输入视频的确切持续时间是多少。现在我使用下面的命令来分割视频 ffmpeg -i input.mp4 -c copy -map 0 -segment_time 30 -f segment -reset_timestamps 1 output"%03d.mp4
猜你喜欢
  • 2014-02-26
  • 2016-12-17
  • 2016-06-08
  • 1970-01-01
  • 1970-01-01
  • 2020-12-11
  • 2022-11-14
  • 2011-09-21
  • 1970-01-01
相关资源
最近更新 更多