如何使用ffmpeg快速拆分批量视频? [英] How to split bulk video fast by using ffmpeg?

查看:139
本文介绍了如何使用ffmpeg快速拆分批量视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多视频,所以我想自动分割它们.它们将分为2部分:

I have a lot of videos, so I want to split them automatically. And they will be divided into 2 parts:

  • 第1部分:15分钟
  • 第2部分:其余部分

搜索了很多,但没有找到.请帮助.

Searched a lot, but did not find. Please, help.

推荐答案

使用 -ss -t 选项:

ffmpeg -i input -t 00:15:00 -codec copy output
ffmpeg -ss 00:15:00 -i input -codec copy output

FFmpeg文档:

   -ss position (input/output)
       When used as an input option (before "-i"), seeks in this input
       file to position. Note the 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 filename), decodes
       but discards input until the timestamps reach position.

       position may be either in seconds or in "hh:mm:ss[.xxx]" form.

   -t duration (output)
       Stop writing the output after its duration reaches duration.
       duration may be a number in seconds, or in "hh:mm:ss[.xxx]" form.

       -to and -t are mutually exclusive and -t has priority.

该示例使用-编解码器复制来使用流复制模式,而不是重新编码.

The example uses -codec copy to use stream copy mode instead of re-encoding.

这篇关于如何使用ffmpeg快速拆分批量视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆