博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ffmpeg视频切片_用ffmpeg切片视频
阅读量:2517 次
发布时间:2019-05-11

本文共 1592 字,大约阅读时间需要 5 分钟。

ffmpeg视频切片

Isolating a specified portion of a video is a very common task for those who work within the media, probably using nice GUI tools to slice clips from the full video.  I'm a developer, however, and know how amazing ffmpeg is so I prefer to do my basic video slicing from command line.

对于从事媒体工作的人来说,隔离视频的指定部分是一项非常常见的任务,可能使用不错的GUI工具从完整视频中切出片段。 但是,我是一名开发人员,并且知道ffmpeg有多么出色,所以我更喜欢从命令行进行基本视频切片。

Let's look at the following command and break it down:

让我们看一下下面的命令并将其分解:

# Creates 12 second video./ffmpeg -i input.mp4 -ss 00:00:05 -c copy -t 12 sliced-output.mp4

The -i obviously represents the input file, the ss represents the time to start the slicing at, and the -t represents the number of seconds from the ss to include within the slice.  I'm seeing result quality vary when it comes to -c copy; most times the quality is better with it, but on some rare occasions the quality is better without it.

-i显然表示输入文件, ss表示开始切片的时间, -t表示从ss开始包括在切片中的秒数。 我看到-c copy;结果质量有所不同-c copy; 在大多数情况下,使用它可以改善质量,但是在极少数情况下,不使用它可以改善质量。

If you prefer to explicitly cite the hour:minute:second mark which to cut to, use the -to option:

如果您希望明确引用要切入的hour:minute:second标记,请使用-to选项:

# Creates 2 second video./ffmpeg -i input.mp4 -ss 00:00:05 -c copy -to 00:00:07 sliced-output.mp4

User interfaces and apps are awesome when doing work manually but aren't always great to automate. Since ffmpeg is a command line utility, automating almost anything with video is reasonably easy if you take the time to learn the tool!

手动工作时,用户界面和应用程序很棒,但是自动化并不总是那么好。 由于ffmpeg是一个命令行实用程序,因此如果您花时间学习该工具,则几乎可以轻松地自动执行视频操作!

翻译自:

ffmpeg视频切片

转载地址:http://wfvwd.baihongyu.com/

你可能感兴趣的文章
python字符串格式化 %操作符 {}操作符---总结
查看>>
windows 不能在 本地计算机 启动 Apache
查看>>
iOS开发报duplicate symbols for architecture x86_64错误的问题
查看>>
Chap-6 6.4.2 堆和栈
查看>>
【Java学习笔记之九】java二维数组及其多维数组的内存应用拓展延伸
查看>>
C# MySql 连接
查看>>
sk_buff Structure
查看>>
oracle的级联更新、删除
查看>>
多浏览器开发需要注意的问题之一
查看>>
Maven配置
查看>>
HttpServletRequest /HttpServletResponse
查看>>
SAM4E单片机之旅——24、使用DSP库求向量数量积
查看>>
从远程库克隆库
查看>>
codeforces Unusual Product
查看>>
hdu4348 - To the moon 可持久化线段树 区间修改 离线处理
查看>>
springMVC中一个class中的多个方法
查看>>
cxx signal信号捕获
查看>>
《Android开发艺术探索》读书笔记——Cha3.2.3改变布局参数实现View的滑动
查看>>
python闭包与装饰器
查看>>
Acegi 源码解释
查看>>