whi*_*ngs 68 ffmpeg audio trim
我有一个 FFmpeg 命令来修剪音频:
ffmpeg -ss 01:43:46 -t 00:00:44.30 -i input.mp3 output.mp3
Run Code Online (Sandbox Code Playgroud)
我使用此命令的问题是该选项-t需要从01:43:46 开始的持续时间(以秒为单位)。我想使用开始/停止时间修剪音频,例如在01:43:46和00:01:45.02 之间。
这可能吗?
Mia*_*ati 104
ffmpeg 似乎在文档中有一个新选项-to:
-to position (input/output)
Stop writing the output or reading the input at position. position must be a time duration specification, see (ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual.-to and -t are mutually exclusive and -t has priority.
Sample command with two time formats
ffmpeg -i file.mkv -ss 20 -to 40 -c copy file-2.mkv
ffmpeg -i file.mkv -ss 00:00:20 -to 00:00:40 -c copy file-2.mkv
Run Code Online (Sandbox Code Playgroud)
This should create a copy (file-2.mkv) of file.mkv from the 20 second mark to the 40 second mark.