欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

sox处理mp3_使用SoX将mp3文件拆分为TIME秒

发布时间:2025/3/11 编程问答 37 豆豆
生活随笔 收集整理的这篇文章主要介绍了 sox处理mp3_使用SoX将mp3文件拆分为TIME秒 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

I need to split mp3 file into slices TIME sec each. I've tried mp3splt, but it doesn't work for me if output is less than 1 minute.

Is it possible do do with:

sox file_in.mp3 file_out.mp3 trim START LENGTH

When I don't know mp3 file LENGTH

解决方案

You can run SoX like this:

sox file_in.mp3 file_out.mp3 trim 0 15 : newfile : restart

It will create a series of files with a 15-second chunk of the audio each. (Obviously, you may specify a value other than 15.) There is no need to know the total length.

Note that SoX, unlike mp3splt, will decode and reencode the audio (see generation loss). You should make sure to use at least SoX 14.4.0 because previous versions had a bug where audio got lost between chunks.

总结

以上是生活随笔为你收集整理的sox处理mp3_使用SoX将mp3文件拆分为TIME秒的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。