如何使用ffmpeg将x3的mp3裁剪为x + n? [英] How to crop a mp3 from x to x+n using ffmpeg?
问题描述
在这个问题之后,我决定使用ffmpeg裁剪MP3.在另一个问题上,我发现了这样做的方法:
Following this question I decided to use ffmpeg to crop MP3s. On another question I found this way of doing it:
ffmpeg -t 30 -acodec copy -i inputfile.mp3 outputfile.mp3
问题是我不想在前30秒内进行裁剪,而是想从x裁剪为x + n,例如从30s裁剪为100s.我怎么去做呢?
The problem is that I don't want to crop the first 30 seconds, I want to crop from x to x+n, like from 30s to 100s. How would I go and do this?
我正在阅读ffmpeg的人,但这并不是很简单,特别是由于我只是发现ffmpeg的知识,而且我对音频/视频编辑软件不熟悉,因此任何指针都将不胜感激.
I'm reading the man for ffmpeg but this is not really straightforward, especially since I just discovered about ffmpeg and I'm not familiar with audio/video editing softwares, so any pointers would be appreciated.
推荐答案
看看-t和-ss参数.他们应该做你想做的事.
Take a look at the -t and -ss arguments. They should do what you want.
-t持续时间
-t duration
限制转码/捕获的视频 顺序为中指定的持续时间 秒. hh:mm:ss [.xxx]语法也是 支持的.
Restrict the transcoded/captured video sequence to the duration specified in seconds. hh:mm:ss[.xxx] syntax is also supported.
-ss位置'
以秒为单位搜索到给定的时间位置. hh:mm:ss [.xxx]语法也受支持.
Seek to given time position in seconds. hh:mm:ss[.xxx] syntax is also supported.
例如,ffmpeg -ss 30 -t 70 -i inputfile.mp3 -acodec copy outputfile.mp3
应该在您提到的范围(30s-100s)内起作用.
For example, ffmpeg -ss 30 -t 70 -i inputfile.mp3 -acodec copy outputfile.mp3
should do the trick for the range you mentioned (30s-100s).
这篇关于如何使用ffmpeg将x3的mp3裁剪为x + n?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!