在 python 中均衡 mp3 文件的正确方法

Right way to equalize mp3 file in python

我目前正在编写一个小 python 脚本来均衡 MP3 文件。
我已经阅读了一些关于 MP3 文件格式的文档(在 https://en.wikipedia.org/wiki/ID3
我注意到在 ID3v2 格式中有一个 Equalization (EQUA, EQU2)
字段 使用 python 库诱变剂,我试图从 MP3 中提取这些信息,但该字段不存在。
无论 ID3 版本如何,均衡 MP3 文件的正确方法是什么?
预先感谢。小可爱

您可以采用两种高级方法:修改编码的音频流,或在其中放置描述所需更改的元数据。修改音频流是最兼容的,但通常不太理想。但是,ID3v1 没有此元数据的位置,只有 ID3v2.2 及更高版本可以。

根据均衡的含义,您可能希望将均衡信息存储在 EQA/EQUA/EQU2 frames, or a replay gain volume adjustment stored in the RVA/RVAD/RVA2 frames. Mutagen supports the linked frames, so all but EQA/EQUA. If you need them, it should be straightforward to add them from the information in the actual specification (see 4.12 on http://id3.org/id3v2.4.0-frames) 中。通过测试,他们可能会回馈到项目中。

请注意,与 Mutagen 搭档的玩家 Quod Libet 偏好 reading and storing replay gain information in a TXXX 帧。