Java 中的 MP3 编码 [英] MP3 Encoding in Java

查看:24
本文介绍了Java 中的 MP3 编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个 Java 的开源 API,它可以将 *.wav 和 *.au 格式编码为 MP3,反之亦然.

I need an OpenSource API in Java, which can encode *.wav and *.au formats to MP3 and vice-versa.

我已经评估了 Java Sound API 和 LameOnJ,但它们不符合我的要求并且不稳定, 分别.请推荐一款免费且独立于平台的软件.

I have evaluated Java Sound API and LameOnJ, but they do not meet my requirements and are not stable, respectively. Please suggest one that is free and platform independent.

推荐答案

可能还没有足够的答案,因为 MP3 格式要求解码器/编码器的作者从弗劳恩霍夫研究所获得许可.

There may not be an adequate answer for you, yet, as the MP3 format requires the authors of decoder/encoders to obtain a license from the Fraunhofer Institute.

我认为 LAME 库是从一个不尊重这些 IP 问题的国家/地区分发的,但要走到这一步需要大量的合法黑客.

I think the the LAME library is distributed from a country that does not respect these IP issues, but it took a considerably amount of legal hackery to get this far.

对于任何其他库 - 例如用 Java 编写的库,作者需要获得类似的许可.成本是一个问题 - 例如在开源项目中,这足以阻碍开始.

For any other libraries - for example one written in Java, the authors need to get a similar license. Where cost is an issue - e.g. in an Open Source project, then this is enough of a disincentive to starting.

有关详细信息,请参阅这篇维基百科文章.

For more details see this wikipedia article.

如果 LAME4J 对你来说不够稳定,那么恐怕你的选择可能是:

If LAME4J is not stable enough for you, then I'm afraid your options are probably:

  • 等待 Sun 许可核心 JRE 的格式.这个,我相信他们最近已经完成了,但我不知道任何发布日期(可能与 JavaFX 有关)
  • 用 Java 实现你自己的,并支付许可费用.我也不喜欢这个.
  • 通过 JNA 或 SWIG 为 LAME 编写您自己的 Java 包装器
  • 为 Lame4J 做出贡献.
  • 选择另一种格式.OGG 和 FLAC 相当不错,而且支持相对较好.

这篇关于Java 中的 MP3 编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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