将每分钟的MP3导出到单独的WAV中 [英] Export each minute of MP3 into separate WAV
问题描述
这绝对是一个奇怪的问题,但我正在寻找一种方法,将60分钟的mp3混合内容拆分为60个1分钟长的独立wav文件,以与Echonest等音频指纹识别API一起使用.
This is definitely a strange question but I'm looking for a way to split an mp3 mix of 60 minutes into 60 separate 1 minute long wav files to use with an audio fingerprinting API like Echonest.
在单个ffmpeg命令中是否可行?或者我必须使用以下值运行ffmpeg的多次迭代:
Is this possible in a single ffmpeg command or would I have to run multiple iterations of ffmpeg with a the following values:
-ss是以秒为单位的起点. -t是持续时间(以秒为单位).
-ss is the startpoint in seconds. -t is the duration in seconds.
推荐答案
您可以在ffmpeg中使用段混合器:
You can use the segment muxer in ffmpeg:
ffmpeg -i input.mp3 -codec copy -map 0 -f segment -segment_time 60 output%03d.mp3
输入4分钟,结果为:
$ ls -m1 output*.mp3
output000.mp3
output001.mp3
output002.mp3
output003.mp3
由于-codec copy
启用了流复制模式,因此将避免重新编码.有关更多信息和示例,请参见细分文档.
Since -codec copy
enables stream copy mode re-encoding will be avoided. See the segment documentation for more information and examples.
这篇关于将每分钟的MP3导出到单独的WAV中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!