计算mp3平均音量 [英] calculate mp3 average volume

查看:167
本文介绍了计算mp3平均音量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道mp3文件的平均音量,以便当我将其转换为mp3(以不同的比特率)时,我也可以缩放该音量,以对其进行归一化...

I need to know the average volume of an mp3 file so that when I convert it to mp3 (at a different bitrate) I can scale the volume too, to normalize it...

因此,我需要一个命令行工具/ruby​​库,该库提供了以dB为单位的平均音量.

Therefore I need a command line tool / ruby library that gives me the average volume in dB.

推荐答案

您可以使用sox(开放源代码命令行音频工具

You can use sox (an open source command line audio tool http://sox.sourceforge.net/sox.html) to normalize and transcode your files at the same time.

编辑

好像没有比特率选项.无论如何,如果LAME进行归一化,则sox可能会被杀掉.

Looks like it doesn't have options for bit-rate. Anyway, sox is probably overkill if LAME does normalization.

这篇关于计算mp3平均音量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆