Export each minute of MP3 into separate WAV

一世执手 提交于 2019-12-21 20:46:06

问题


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.

Is this possible in a single ffmpeg command or would I have to run multiple iterations of ffmpeg with a the following values:

-ss is the startpoint in seconds. -t is the duration in seconds.


回答1:


You can use the segment muxer in ffmpeg:

ffmpeg -i input.mp3 -codec copy -map 0 -f segment -segment_time 60 output%03d.mp3

For a 4 minute input this results in:

$ ls -m1 output*.mp3
output000.mp3
output001.mp3
output002.mp3
output003.mp3

Since -codec copy enables stream copy mode re-encoding will be avoided. See the segment documentation for more information and examples.



来源:https://stackoverflow.com/questions/18509758/export-each-minute-of-mp3-into-separate-wav

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!