当前位置: 首页 > 知识库问答 >
问题:

如何在FFMPEG中按10秒等时长分割视频?[副本]

祁增
2023-03-14

我是FFMPEG的新手!我想分割视频,持续时间像3分钟。或者10秒以上。使用FFMPEG?请帮助我如何解决它。

共有1个答案

饶志
2023-03-14

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

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.
 类似资料:
  • 我已经在PC上使用pip ffprobe命令安装了ffprobe,并从这里安装了ffmpeg。 然而,我仍然在运行这里列出的代码时遇到麻烦。 我尝试使用下面的代码,但没有成功。 有人知道怎么了吗?我没有正确引用目录吗?是否需要确保和视频文件位于特定位置? 如果这个问题有点基本的话,我很抱歉。所有我需要的是能够迭代一组视频文件,并获得他们的开始时间和结束时间。 谢谢!

  • 我有两个视频文件,我想使用ffmpeg配置 initial.mp4视频: h264(高)(avc1/0x31637661), yuv420p(电视),720x720,1077 kb/s,15.98 fps,16 tbr,600 tbns,1200 tbc(默认) 结尾mp4视频:h264(高)(avc1/0x31637661),yuv420p(电视,bt470bg),720x720[SAR 1:1

  • 我们需要拆分一个大的直播WMV视频饲料的小块,所有的大小相同。我们制作了一个脚本,可以很好地执行此操作,除了一件事:视频块不是从关键帧开始的,所以当播放大多数视频块时,它们不会显示任何图像,直到最终到达原始视频的关键帧为止。 难道没有办法告诉ffmpeg让输出视频从一个关键帧开始吗? 下面是我们的命令行现在的样子: 等等...

  • 本文向大家介绍Java通过调用FFMPEG获取视频时长,包括了Java通过调用FFMPEG获取视频时长的使用技巧和注意事项,需要的朋友参考一下 FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。采用LGPL或GPL许可证。它提供了录制、转换以及流化音视频的完整解决方案。它包含了非常先进的音频/视频编解码库libavcodec,为了保证高可移植性和编解码质量,li

  • 我需要使用FFmpeg切割视频,我不能转码原始视频(因为性能的原因)。我在iPhone上的HEVC视频中遇到了一个问题:剪切视频的开头有滑移。 以下是我们在发行前如何转换视频: ffmpeg.exe-i original.mov-c:v copy-c:a aac-ss 4-y good.mp4 经过一些Googlen搜索,发现输入前的选项更快,但不太准确,而输入后和输出前的选项更慢,但更准确。 所